Skip to content

Commit 69ef96f

Browse files
committed
Testing of AC1021
1 parent 15848b1 commit 69ef96f

File tree

10 files changed

+8094
-160
lines changed

10 files changed

+8094
-160
lines changed

Creator.php

Lines changed: 445 additions & 153 deletions
Large diffs are not rendered by default.

LineType.php

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
* @see https://pythonhosted.org/dxfwrite/entities/linepattern.html#linepattern
2323
*/
24-
class LineType {
24+
final class LineType {
2525

2626
const SOLID = 'CONTINUOUS';
2727
const CENTER = 'CENTER';
@@ -43,4 +43,31 @@ class LineType {
4343
const DIVIDEX2 = 'DIVIDEX2';
4444
const DIVIDE2 = 'DIVIDE2';
4545

46+
47+
public static $lines = [
48+
self::SOLID => ['Solid line', "73\n0\n40\n0.0"],
49+
self::CENTER => ['Center ____ _ ____ _ ____ _ ____ _ ____ _ ____', "73\n4\n40\n50.8\n49\n31.75\n74\n0\n49\n-6.35\n74\n0\n49\n6.35\n74\n0\n49\n-6.35\n74\n0"],
50+
self::CENTERX2 => ['Center (2x) ________ __ ________ __ _____', "73\n4\n40\n101.6\n49\n63.5\n74\n0\n49\n-12.7\n74\n0\n49\n12.7\n74\n0\n49\n-12.7\n74\n0"],
51+
self::CENTER2 => ['Center (.5x) ___ _ ___ _ ___ _ ___ _ ___ _ ___', "73\n4\n40\n28.575\n49\n19.05\n74\n0\n49\n-3.175\n74\n0\n49\n3.175\n74\n0\n49\n-3.175\n74\n0"],
52+
self::DASHED => ['Dashed _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _', "73\n2\n40\n19.05\n49\n12.7\n74\n0\n49\n-6.35\n74\n0"],
53+
self::DASHEDX2 => ['Dashed (2x) ____ ____ ____ ____ ____ ___', "73\n2\n40\n38.09\n49\n25.4\n74\n0\n49\n-12.7\n74\n0"],
54+
self::DASHED2 => ['Dashed (.5x) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _', "73\n2\n40\n9.5249\n49\n6.35\n74\n0\n49\n-3.175\n74\n0"],
55+
self::PHANTOM => ['Phantom ______ __ __ ______ __ __ ______', "73\n6\n40\n12.7\n49\n6.35\n74\n0\n49\n-1.27\n74\n0\n49\n1.27\n74\n0\n49\n-1.27\n74\n0\n49\n1.27\n74\n0\n49\n-1.27\n74\n0"],
56+
57+
// TODO wrong pattern
58+
self::PHANTOMX2 => ['Phantom (2x)____________ ____ ____ ____________', "73\n6\n40\n12.7\n49\n6.35\n74\n0\n49\n-1.27\n74\n0\n49\n1.27\n74\n0\n49\n-1.27\n74\n0\n49\n1.27\n74\n0\n49\n-1.27\n74\n0"],
59+
// TODO wrong pattern
60+
self::PHANTOM2 => ['Phantom (.5x) ___ _ _ ___ _ _ ___ _ _ ___ _ _ ___', "73\n6\n40\n12.7\n49\n6.35\n74\n0\n49\n-1.27\n74\n0\n49\n1.27\n74\n0\n49\n-1.27\n74\n0\n49\n1.27\n74\n0\n49\n-1.27\n74\n0"],
61+
62+
self::DASHDOT => ['Dash dot __ . __ . __ . __ . __ . __ . __ . __', "73\n4\n40\n25.4\n49\n12.7\n74\n0\n49\n-6.35\n74\n0\n49\n0\n74\n0\n49\n-6.35\n74\n0"],
63+
self::DASHDOTX2 => ['Dash dot (2x) ____ . ____ . ____ . ___', "73\n4\n40\n50.8\n49\n25.4\n74\n0\n49\n-12.7\n74\n0\n49\n0\n74\n0\n49\n-12.7\n74\n0"],
64+
self::DASHDOT2 => ['Dash dot (.5x) _._._._._._._._._._._._._._._.', "73\n4\n40\n12.7\n49\n6.35\n74\n0\n49\n-3.175\n74\n0\n49\n0\n74\n0\n49\n-3.175\n74\n0"],
65+
self::DOT => ['Dot . . . . . . . . . . . . . . . . . . . . . .', "73\n2\n40\n6.35\n49\n0\n74\n0\n49\n-6.35\n74\n0"],
66+
self::DOTX2 => ['Dot (2x) . . . . . . . . . . . . .', "73\n2\n40\n12.7\n49\n0\n74\n0\n49\n-12.7\n74\n0"],
67+
self::DOT2 => ['Dot (.5x) .....................................', "73\n2\n40\n3.175\n49\n0\n74\n0\n49\n-3.175\n74\n0"],
68+
self::DIVIDE => ['Divide ____ . . ____ . . ____ . . ____ . . ____', "73\n6\n40\n31.75\n49\n12.7\n74\n0\n49\n-6.35\n74\n0\n49\n0\n74\n0\n49\n-6.35\n74\n0\n49\n0\n74\n0\n49\n-6.35\n74\n0"],
69+
self::DIVIDEX2 => ['Divide (2x) ________ . . ________ . . _', "73\n6\n40\n63.5\n49\n25.4\n74\n0\n49\n-12.7\n74\n0\n49\n0\n74\n0\n49\n-12.7\n74\n0\n49\n0\n74\n0\n49\n-12.7\n74\n0"],
70+
self::DIVIDE2 => ['Divide (.5x) __..__..__..__..__..__..__..__.._', "73\n6\n40\n15.875\n49\n6.35\n74\n0\n49\n-3.175\n74\n0\n49\n0\n74\n0\n49\n-3.175\n74\n0\n49\n0\n74\n0\n49\n-3.175\n74\n0"],
71+
];
72+
4673
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ See "demo" directory of project.
5353
## Install by Composer
5454

5555
```
56-
composer require adamasantares/dxf
56+
composer require adamasantares/dxf "0.1.35"
5757
```
5858

5959
or
6060

6161
```
6262
"require": {
63-
"adamasantares/dxf": "0.1.36"
63+
"adamasantares/dxf": "0.1.35"
6464
}
6565
```
6666

demo/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
*.dxf

0 commit comments

Comments
 (0)