abstract-image 3.1.3 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -21
- package/LICENSE +21 -21
- package/README.md +71 -71
- package/lib/__stories__/react-svg-export/example-1.stories.d.ts.map +1 -1
- package/lib/__stories__/react-svg-export/example-1.stories.js +1 -1
- package/lib/__stories__/react-svg-export/example-1.stories.js.map +1 -1
- package/lib/_tests_/exporters/svg-export-image.test.d.ts +2 -0
- package/lib/_tests_/exporters/svg-export-image.test.d.ts.map +1 -0
- package/lib/_tests_/exporters/svg-export-image.test.js +35 -0
- package/lib/_tests_/exporters/svg-export-image.test.js.map +1 -0
- package/lib/exporters/__tests__/dxf/export-test-def.d.ts +11 -0
- package/lib/exporters/__tests__/dxf/export-test-def.d.ts.map +1 -0
- package/lib/exporters/__tests__/dxf/export-test-def.js +6 -0
- package/lib/exporters/__tests__/dxf/export-test-def.js.map +1 -0
- package/lib/exporters/__tests__/dxf/export.test.d.ts +3 -0
- package/lib/exporters/__tests__/dxf/export.test.d.ts.map +1 -0
- package/lib/exporters/__tests__/dxf/export.test.js +17 -0
- package/lib/exporters/__tests__/dxf/export.test.js.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-ellipse.d.ts +3 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-ellipse.d.ts.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-ellipse.js +413 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-ellipse.js.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-group.d.ts +3 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-group.d.ts.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-group.js +160 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-group.js.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-line.d.ts +3 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-line.d.ts.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-line.js +89 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-line.js.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-polygon.d.ts +3 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-polygon.d.ts.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-polygon.js +123 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-polygon.js.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-polyline.d.ts +3 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-polyline.d.ts.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-polyline.js +113 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-polyline.js.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-rectangle.d.ts +3 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-rectangle.d.ts.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-rectangle.js +133 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-rectangle.js.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-text-growth-directions.d.ts +3 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-text-growth-directions.d.ts.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-text-growth-directions.js +172 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-text-growth-directions.js.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-text.d.ts +3 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-text.d.ts.map +1 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-text.js +97 -0
- package/lib/exporters/__tests__/dxf/test-defs/dxf2d-text.js.map +1 -0
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-ellipse.js +379 -379
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-group.d.ts.map +1 -1
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-group.js +124 -124
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-group.js.map +1 -1
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-line.js +55 -55
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-polygon.js +89 -89
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-polyline.js +79 -79
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-rectangle.js +99 -99
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-text-growth-directions.d.ts.map +1 -1
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-text-growth-directions.js +139 -139
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-text-growth-directions.js.map +1 -1
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-text.d.ts.map +1 -1
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-text.js +64 -64
- package/lib/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-text.js.map +1 -1
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-ellipse.js +24 -24
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-empty-text.d.ts.map +1 -1
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-empty-text.js +27 -27
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-empty-text.js.map +1 -1
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-group.d.ts.map +1 -1
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-group.js +32 -32
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-group.js.map +1 -1
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-line.js +20 -20
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-polygon.js +34 -34
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-polyline.js +26 -26
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-rectangle.js +20 -20
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-text-growth-directions.d.ts.map +1 -1
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-text-growth-directions.js +63 -63
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-text-growth-directions.js.map +1 -1
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-text.d.ts.map +1 -1
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-text.js +27 -27
- package/lib/exporters/__tests__/eps-export-image/test-defs/eps-text.js.map +1 -1
- package/lib/exporters/__tests__/exception/react-svg-direction-exception.test.js +2 -2
- package/lib/exporters/__tests__/exception/react-svg-direction-exception.test.js.map +1 -1
- package/lib/exporters/__tests__/exception/svg-direction-exception.test.js +2 -2
- package/lib/exporters/__tests__/exception/svg-direction-exception.test.js.map +1 -1
- package/lib/exporters/__tests__/export-test-def.d.ts +8 -0
- package/lib/exporters/__tests__/export-test-def.d.ts.map +1 -0
- package/lib/exporters/__tests__/export-test-def.js +3 -0
- package/lib/exporters/__tests__/export-test-def.js.map +1 -0
- package/lib/exporters/__tests__/export.test.d.ts +3 -0
- package/lib/exporters/__tests__/export.test.d.ts.map +1 -0
- package/lib/exporters/__tests__/export.test.js +18 -0
- package/lib/exporters/__tests__/export.test.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/export-test-def.d.ts +12 -0
- package/lib/exporters/__tests__/react-svg/export-test-def.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/export-test-def.js +6 -0
- package/lib/exporters/__tests__/react-svg/export-test-def.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/export.test.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/export.test.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/export.test.js +17 -0
- package/lib/exporters/__tests__/react-svg/export.test.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-binary-png.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-binary-png.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-binary-png.js +33 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-binary-png.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-binary.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-binary.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-binary.js +33 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-binary.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-callback.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-callback.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-callback.js +38 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-callback.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-ellipse.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-ellipse.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-ellipse.js +34 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-ellipse.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-empty-text.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-empty-text.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-empty-text.js +34 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-empty-text.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-group.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-group.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-group.js +37 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-group.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-line.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-line.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-line.js +34 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-line.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-polygon.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-polygon.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-polygon.js +40 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-polygon.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-polyline.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-polyline.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-polyline.js +42 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-polyline.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-rectangle.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-rectangle.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-rectangle.js +34 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-rectangle.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-subimage.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-subimage.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-subimage.js +33 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-subimage.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text-growth-directions.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text-growth-directions.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text-growth-directions.js +37 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text-growth-directions.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text-sub.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text-sub.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text-sub.js +34 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text-sub.js.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text.d.ts +3 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text.d.ts.map +1 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text.js +34 -0
- package/lib/exporters/__tests__/react-svg/test-defs/react-svg-text.js.map +1 -0
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-callback.d.ts.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-callback.js +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-callback.js.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-empty-text.d.ts.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-empty-text.js +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-empty-text.js.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-group.d.ts.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-group.js +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-group.js.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-subimage.d.ts.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-subimage.js +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-subimage.js.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text-growth-directions.d.ts.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text-growth-directions.js +4 -4
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text-growth-directions.js.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text-sub.d.ts.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text-sub.js +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text-sub.js.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text.d.ts.map +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text.js +1 -1
- package/lib/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text.js.map +1 -1
- package/lib/exporters/__tests__/svg/export-test-def.d.ts +11 -0
- package/lib/exporters/__tests__/svg/export-test-def.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/export-test-def.js +6 -0
- package/lib/exporters/__tests__/svg/export-test-def.js.map +1 -0
- package/lib/exporters/__tests__/svg/export.test.d.ts +3 -0
- package/lib/exporters/__tests__/svg/export.test.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/export.test.js +17 -0
- package/lib/exporters/__tests__/svg/export.test.js.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-ellipse.d.ts +3 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-ellipse.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-ellipse.js +34 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-ellipse.js.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-empty-text.d.ts +3 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-empty-text.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-empty-text.js +34 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-empty-text.js.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-group.d.ts +3 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-group.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-group.js +37 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-group.js.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-line.d.ts +3 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-line.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-line.js +34 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-line.js.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-polygon.d.ts +3 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-polygon.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-polygon.js +40 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-polygon.js.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-polyline.d.ts +3 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-polyline.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-polyline.js +42 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-polyline.js.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-rectangle.d.ts +3 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-rectangle.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-rectangle.js +34 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-rectangle.js.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text-growth-directions.d.ts +3 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text-growth-directions.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text-growth-directions.js +37 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text-growth-directions.js.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text-unknown-direction.d.ts +3 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text-unknown-direction.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text-unknown-direction.js +34 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text-unknown-direction.js.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text.d.ts +3 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text.d.ts.map +1 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text.js +34 -0
- package/lib/exporters/__tests__/svg/test-defs/svg-text.js.map +1 -0
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-empty-text.d.ts.map +1 -1
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-empty-text.js +1 -1
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-empty-text.js.map +1 -1
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-group.d.ts.map +1 -1
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-group.js +1 -1
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-group.js.map +1 -1
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-text-growth-directions.d.ts.map +1 -1
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-text-growth-directions.js +4 -4
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-text-growth-directions.js.map +1 -1
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-text.d.ts.map +1 -1
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-text.js +1 -1
- package/lib/exporters/__tests__/svg-export-image/test-defs/svg-text.js.map +1 -1
- package/lib/exporters/__tests__/test-defs/png-export-image.d.ts +3 -0
- package/lib/exporters/__tests__/test-defs/png-export-image.d.ts.map +1 -0
- package/lib/exporters/__tests__/test-defs/png-export-image.js +9 -0
- package/lib/exporters/__tests__/test-defs/png-export-image.js.map +1 -0
- package/lib/exporters/__tests__/test-defs/svg-export-image.d.ts +3 -0
- package/lib/exporters/__tests__/test-defs/svg-export-image.d.ts.map +1 -0
- package/lib/exporters/__tests__/test-defs/svg-export-image.js +54 -0
- package/lib/exporters/__tests__/test-defs/svg-export-image.js.map +1 -0
- package/lib/exporters/react-svg-export-image.js +2 -2
- package/lib/exporters/react-svg-export-image.js.map +1 -1
- package/lib/model/__tests__/color/test-defs/color-from-string-6-digits.d.ts +3 -0
- package/lib/model/__tests__/color/test-defs/color-from-string-6-digits.d.ts.map +1 -0
- package/lib/model/__tests__/color/test-defs/color-from-string-6-digits.js +66 -0
- package/lib/model/__tests__/color/test-defs/color-from-string-6-digits.js.map +1 -0
- package/lib/model/component.d.ts +3 -2
- package/lib/model/component.d.ts.map +1 -1
- package/lib/model/component.js +12 -11
- package/lib/model/component.js.map +1 -1
- package/package.json +2 -2
- package/src/__stories__/react-svg-export/example-1.stories.tsx +54 -53
- package/src/__stories__/svg-export/example-1.stories.tsx +42 -42
- package/src/exporters/__tests__/dxf2d-export-image/export-test-def.ts +11 -11
- package/src/exporters/__tests__/dxf2d-export-image/export.test.tsx +13 -13
- package/src/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-ellipse.ts +405 -405
- package/src/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-group.ts +166 -165
- package/src/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-line.ts +80 -80
- package/src/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-polygon.ts +114 -114
- package/src/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-polyline.ts +103 -103
- package/src/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-rectangle.ts +125 -125
- package/src/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-text-growth-directions.ts +214 -210
- package/src/exporters/__tests__/dxf2d-export-image/test-defs/dxf2d-text.ts +97 -96
- package/src/exporters/__tests__/eps-export-image/export-test-def.ts +11 -11
- package/src/exporters/__tests__/eps-export-image/export.test.tsx +13 -13
- package/src/exporters/__tests__/eps-export-image/test-defs/eps-ellipse.ts +50 -50
- package/src/exporters/__tests__/eps-export-image/test-defs/eps-empty-text.ts +60 -59
- package/src/exporters/__tests__/eps-export-image/test-defs/eps-group.ts +74 -73
- package/src/exporters/__tests__/eps-export-image/test-defs/eps-line.ts +45 -45
- package/src/exporters/__tests__/eps-export-image/test-defs/eps-polygon.ts +65 -65
- package/src/exporters/__tests__/eps-export-image/test-defs/eps-polyline.ts +58 -58
- package/src/exporters/__tests__/eps-export-image/test-defs/eps-rectangle.ts +46 -46
- package/src/exporters/__tests__/eps-export-image/test-defs/eps-text-growth-directions.ts +138 -134
- package/src/exporters/__tests__/eps-export-image/test-defs/eps-text.ts +60 -59
- package/src/exporters/__tests__/exception/png-unsupported.test.tsx +25 -25
- package/src/exporters/__tests__/exception/react-svg-direction-exception.test.tsx +65 -63
- package/src/exporters/__tests__/exception/svg-direction-exception.test.tsx +65 -63
- package/src/exporters/__tests__/png-export-image/export-test-def.ts +11 -11
- package/src/exporters/__tests__/png-export-image/export.test.tsx +13 -13
- package/src/exporters/__tests__/png-export-image/test-defs/png-createPNG.tsx +26 -26
- package/src/exporters/__tests__/react-svg-export-image/export-test-def.tsx +13 -13
- package/src/exporters/__tests__/react-svg-export-image/export.test.tsx +13 -13
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-binary-png.tsx +27 -27
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-binary.tsx +26 -26
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-callback.tsx +60 -59
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-ellipse.tsx +28 -28
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-empty-text.tsx +35 -34
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-group.tsx +44 -43
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-line.tsx +26 -26
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-polygon.tsx +32 -32
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-polyline.tsx +33 -33
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-rectangle.tsx +27 -27
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-subimage.tsx +36 -35
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text-growth-directions.tsx +80 -76
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text-sub.tsx +35 -34
- package/src/exporters/__tests__/react-svg-export-image/test-defs/react-svg-text.tsx +35 -34
- package/src/exporters/__tests__/svg-export-image/export-test-def.ts +11 -11
- package/src/exporters/__tests__/svg-export-image/export.test.tsx +13 -13
- package/src/exporters/__tests__/svg-export-image/test-defs/svg-binary.tsx +26 -26
- package/src/exporters/__tests__/svg-export-image/test-defs/svg-ellipse.ts +27 -27
- package/src/exporters/__tests__/svg-export-image/test-defs/svg-empty-text.ts +34 -33
- package/src/exporters/__tests__/svg-export-image/test-defs/svg-group.ts +44 -43
- package/src/exporters/__tests__/svg-export-image/test-defs/svg-line.ts +26 -26
- package/src/exporters/__tests__/svg-export-image/test-defs/svg-polygon.ts +32 -32
- package/src/exporters/__tests__/svg-export-image/test-defs/svg-polyline.ts +33 -33
- package/src/exporters/__tests__/svg-export-image/test-defs/svg-rectangle.ts +27 -27
- package/src/exporters/__tests__/svg-export-image/test-defs/svg-text-growth-directions.ts +80 -76
- package/src/exporters/__tests__/svg-export-image/test-defs/svg-text.ts +35 -34
- package/src/exporters/dxf2d-export-image.ts +218 -218
- package/src/exporters/eps-export-image.ts +154 -154
- package/src/exporters/index.ts +3 -3
- package/src/exporters/png-export-image.ts +12 -12
- package/src/exporters/react-svg-export-image.tsx +298 -298
- package/src/exporters/svg-export-image.ts +334 -334
- package/src/index.ts +11 -11
- package/src/model/__tests__/color/export-test-def.ts +13 -13
- package/src/model/__tests__/color/export.test.tsx +14 -14
- package/src/model/__tests__/color/test-defs/color-from-string.ts +46 -46
- package/src/model/__tests__/color/test-defs/color-to-string.ts +35 -35
- package/src/model/__tests__/color/test-defs/color-undefined-2.ts +8 -8
- package/src/model/__tests__/color/test-defs/color-undefined.ts +8 -8
- package/src/model/abstract-image.ts +25 -25
- package/src/model/color.ts +52 -52
- package/src/model/component.ts +266 -279
- package/src/model/index.ts +5 -5
- package/src/model/point.ts +11 -11
- package/src/model/size.ts +11 -11
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { ExportTestDef } from "../export-test-def";
|
|
2
|
-
import * as AbstractImage from "../../../../../src/index";
|
|
3
|
-
|
|
4
|
-
const components = [
|
|
5
|
-
AbstractImage.createPolyLine(
|
|
6
|
-
[
|
|
7
|
-
AbstractImage.createPoint(10, 40),
|
|
8
|
-
AbstractImage.createPoint(20, 30),
|
|
9
|
-
AbstractImage.createPoint(30, 40),
|
|
10
|
-
AbstractImage.createPoint(40, 30),
|
|
11
|
-
AbstractImage.createPoint(50, 40),
|
|
12
|
-
AbstractImage.createPoint(60, 30),
|
|
13
|
-
AbstractImage.createPoint(70, 40),
|
|
14
|
-
],
|
|
15
|
-
AbstractImage.black,
|
|
16
|
-
2
|
|
17
|
-
),
|
|
18
|
-
];
|
|
19
|
-
const image = AbstractImage.createAbstractImage(
|
|
20
|
-
AbstractImage.createPoint(0, 0),
|
|
21
|
-
AbstractImage.createSize(400, 400),
|
|
22
|
-
AbstractImage.white,
|
|
23
|
-
components
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
const eps = AbstractImage.epsExportImage(image);
|
|
27
|
-
|
|
28
|
-
export const test: ExportTestDef = {
|
|
29
|
-
name: "eps polyline",
|
|
30
|
-
abstractImage: eps,
|
|
31
|
-
expectedImage: `%!PS-Adobe-3.0 EPSF-3.0
|
|
32
|
-
%%BoundingBox: 0 0 400 400
|
|
33
|
-
/ellipse {7 dict begin
|
|
34
|
-
/endangle exch def
|
|
35
|
-
/startangle exch def
|
|
36
|
-
/yradius exch def
|
|
37
|
-
/xradius exch def
|
|
38
|
-
/yC exch def
|
|
39
|
-
/xC exch def
|
|
40
|
-
/savematrix matrix currentmatrix def
|
|
41
|
-
xC yC translate
|
|
42
|
-
xradius yradius scale
|
|
43
|
-
0 0 1 startangle endangle arc
|
|
44
|
-
savematrix setmatrix
|
|
45
|
-
end
|
|
46
|
-
} def
|
|
47
|
-
0 0 0 setrgbcolor
|
|
48
|
-
10 360 moveto
|
|
49
|
-
10 360 lineto
|
|
50
|
-
20 370 lineto
|
|
51
|
-
30 360 lineto
|
|
52
|
-
40 370 lineto
|
|
53
|
-
50 360 lineto
|
|
54
|
-
60 370 lineto
|
|
55
|
-
70 360 lineto
|
|
56
|
-
2 setlinewidth
|
|
57
|
-
stroke`,
|
|
58
|
-
};
|
|
1
|
+
import { ExportTestDef } from "../export-test-def";
|
|
2
|
+
import * as AbstractImage from "../../../../../src/index";
|
|
3
|
+
|
|
4
|
+
const components = [
|
|
5
|
+
AbstractImage.createPolyLine(
|
|
6
|
+
[
|
|
7
|
+
AbstractImage.createPoint(10, 40),
|
|
8
|
+
AbstractImage.createPoint(20, 30),
|
|
9
|
+
AbstractImage.createPoint(30, 40),
|
|
10
|
+
AbstractImage.createPoint(40, 30),
|
|
11
|
+
AbstractImage.createPoint(50, 40),
|
|
12
|
+
AbstractImage.createPoint(60, 30),
|
|
13
|
+
AbstractImage.createPoint(70, 40),
|
|
14
|
+
],
|
|
15
|
+
AbstractImage.black,
|
|
16
|
+
2
|
|
17
|
+
),
|
|
18
|
+
];
|
|
19
|
+
const image = AbstractImage.createAbstractImage(
|
|
20
|
+
AbstractImage.createPoint(0, 0),
|
|
21
|
+
AbstractImage.createSize(400, 400),
|
|
22
|
+
AbstractImage.white,
|
|
23
|
+
components
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
const eps = AbstractImage.epsExportImage(image);
|
|
27
|
+
|
|
28
|
+
export const test: ExportTestDef = {
|
|
29
|
+
name: "eps polyline",
|
|
30
|
+
abstractImage: eps,
|
|
31
|
+
expectedImage: `%!PS-Adobe-3.0 EPSF-3.0
|
|
32
|
+
%%BoundingBox: 0 0 400 400
|
|
33
|
+
/ellipse {7 dict begin
|
|
34
|
+
/endangle exch def
|
|
35
|
+
/startangle exch def
|
|
36
|
+
/yradius exch def
|
|
37
|
+
/xradius exch def
|
|
38
|
+
/yC exch def
|
|
39
|
+
/xC exch def
|
|
40
|
+
/savematrix matrix currentmatrix def
|
|
41
|
+
xC yC translate
|
|
42
|
+
xradius yradius scale
|
|
43
|
+
0 0 1 startangle endangle arc
|
|
44
|
+
savematrix setmatrix
|
|
45
|
+
end
|
|
46
|
+
} def
|
|
47
|
+
0 0 0 setrgbcolor
|
|
48
|
+
10 360 moveto
|
|
49
|
+
10 360 lineto
|
|
50
|
+
20 370 lineto
|
|
51
|
+
30 360 lineto
|
|
52
|
+
40 370 lineto
|
|
53
|
+
50 360 lineto
|
|
54
|
+
60 370 lineto
|
|
55
|
+
70 360 lineto
|
|
56
|
+
2 setlinewidth
|
|
57
|
+
stroke`,
|
|
58
|
+
};
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { ExportTestDef } from "../export-test-def";
|
|
2
|
-
import * as AbstractImage from "../../../../../src/index";
|
|
3
|
-
|
|
4
|
-
const components = [
|
|
5
|
-
AbstractImage.createRectangle(
|
|
6
|
-
AbstractImage.createPoint(10, 50),
|
|
7
|
-
AbstractImage.createPoint(50, 60),
|
|
8
|
-
AbstractImage.blue,
|
|
9
|
-
2,
|
|
10
|
-
AbstractImage.red
|
|
11
|
-
),
|
|
12
|
-
];
|
|
13
|
-
const image = AbstractImage.createAbstractImage(
|
|
14
|
-
AbstractImage.createPoint(0, 0),
|
|
15
|
-
AbstractImage.createSize(400, 400),
|
|
16
|
-
AbstractImage.white,
|
|
17
|
-
components
|
|
18
|
-
);
|
|
19
|
-
|
|
20
|
-
const eps = AbstractImage.epsExportImage(image);
|
|
21
|
-
|
|
22
|
-
export const test: ExportTestDef = {
|
|
23
|
-
name: "eps rectangle",
|
|
24
|
-
abstractImage: eps,
|
|
25
|
-
expectedImage: `%!PS-Adobe-3.0 EPSF-3.0
|
|
26
|
-
%%BoundingBox: 0 0 400 400
|
|
27
|
-
/ellipse {7 dict begin
|
|
28
|
-
/endangle exch def
|
|
29
|
-
/startangle exch def
|
|
30
|
-
/yradius exch def
|
|
31
|
-
/xradius exch def
|
|
32
|
-
/yC exch def
|
|
33
|
-
/xC exch def
|
|
34
|
-
/savematrix matrix currentmatrix def
|
|
35
|
-
xC yC translate
|
|
36
|
-
xradius yradius scale
|
|
37
|
-
0 0 1 startangle endangle arc
|
|
38
|
-
savematrix setmatrix
|
|
39
|
-
end
|
|
40
|
-
} def
|
|
41
|
-
1 0 0 setrgbcolor
|
|
42
|
-
10 340 40 10 rectfill
|
|
43
|
-
0 0 1 setrgbcolor
|
|
44
|
-
2 setlinewidth
|
|
45
|
-
10 340 40 10 rectstroke`,
|
|
46
|
-
};
|
|
1
|
+
import { ExportTestDef } from "../export-test-def";
|
|
2
|
+
import * as AbstractImage from "../../../../../src/index";
|
|
3
|
+
|
|
4
|
+
const components = [
|
|
5
|
+
AbstractImage.createRectangle(
|
|
6
|
+
AbstractImage.createPoint(10, 50),
|
|
7
|
+
AbstractImage.createPoint(50, 60),
|
|
8
|
+
AbstractImage.blue,
|
|
9
|
+
2,
|
|
10
|
+
AbstractImage.red
|
|
11
|
+
),
|
|
12
|
+
];
|
|
13
|
+
const image = AbstractImage.createAbstractImage(
|
|
14
|
+
AbstractImage.createPoint(0, 0),
|
|
15
|
+
AbstractImage.createSize(400, 400),
|
|
16
|
+
AbstractImage.white,
|
|
17
|
+
components
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
const eps = AbstractImage.epsExportImage(image);
|
|
21
|
+
|
|
22
|
+
export const test: ExportTestDef = {
|
|
23
|
+
name: "eps rectangle",
|
|
24
|
+
abstractImage: eps,
|
|
25
|
+
expectedImage: `%!PS-Adobe-3.0 EPSF-3.0
|
|
26
|
+
%%BoundingBox: 0 0 400 400
|
|
27
|
+
/ellipse {7 dict begin
|
|
28
|
+
/endangle exch def
|
|
29
|
+
/startangle exch def
|
|
30
|
+
/yradius exch def
|
|
31
|
+
/xradius exch def
|
|
32
|
+
/yC exch def
|
|
33
|
+
/xC exch def
|
|
34
|
+
/savematrix matrix currentmatrix def
|
|
35
|
+
xC yC translate
|
|
36
|
+
xradius yradius scale
|
|
37
|
+
0 0 1 startangle endangle arc
|
|
38
|
+
savematrix setmatrix
|
|
39
|
+
end
|
|
40
|
+
} def
|
|
41
|
+
1 0 0 setrgbcolor
|
|
42
|
+
10 340 40 10 rectfill
|
|
43
|
+
0 0 1 setrgbcolor
|
|
44
|
+
2 setlinewidth
|
|
45
|
+
10 340 40 10 rectstroke`,
|
|
46
|
+
};
|
|
@@ -1,134 +1,138 @@
|
|
|
1
|
-
import { ExportTestDef } from "../export-test-def";
|
|
2
|
-
import * as AbstractImage from "../../../../../src/index";
|
|
3
|
-
|
|
4
|
-
const components = [
|
|
5
|
-
AbstractImage.createText(
|
|
6
|
-
AbstractImage.createPoint(10, 10),
|
|
7
|
-
"Hello World",
|
|
8
|
-
"Arial",
|
|
9
|
-
12,
|
|
10
|
-
AbstractImage.black,
|
|
11
|
-
"bold",
|
|
12
|
-
0,
|
|
13
|
-
"center",
|
|
14
|
-
"left",
|
|
15
|
-
"up",
|
|
16
|
-
2,
|
|
17
|
-
AbstractImage.red
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
"uniform",
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
/
|
|
81
|
-
/
|
|
82
|
-
/
|
|
83
|
-
/
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
savematrix
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
0 0
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
(Hello World)
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
(Hello World)
|
|
111
|
-
grestore
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
grestore
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
grestore
|
|
134
|
-
|
|
1
|
+
import { ExportTestDef } from "../export-test-def";
|
|
2
|
+
import * as AbstractImage from "../../../../../src/index";
|
|
3
|
+
|
|
4
|
+
const components = [
|
|
5
|
+
AbstractImage.createText(
|
|
6
|
+
AbstractImage.createPoint(10, 10),
|
|
7
|
+
"Hello World",
|
|
8
|
+
"Arial",
|
|
9
|
+
12,
|
|
10
|
+
AbstractImage.black,
|
|
11
|
+
"bold",
|
|
12
|
+
0,
|
|
13
|
+
"center",
|
|
14
|
+
"left",
|
|
15
|
+
"up",
|
|
16
|
+
2,
|
|
17
|
+
AbstractImage.red,
|
|
18
|
+
false
|
|
19
|
+
),
|
|
20
|
+
AbstractImage.createText(
|
|
21
|
+
AbstractImage.createPoint(10, 30),
|
|
22
|
+
"Hello World",
|
|
23
|
+
"Arial",
|
|
24
|
+
12,
|
|
25
|
+
AbstractImage.black,
|
|
26
|
+
"bold",
|
|
27
|
+
0,
|
|
28
|
+
"center",
|
|
29
|
+
"uniform",
|
|
30
|
+
"uniform",
|
|
31
|
+
2,
|
|
32
|
+
AbstractImage.red,
|
|
33
|
+
false
|
|
34
|
+
),
|
|
35
|
+
AbstractImage.createText(
|
|
36
|
+
AbstractImage.createPoint(10, 50),
|
|
37
|
+
"Hello World",
|
|
38
|
+
"Arial",
|
|
39
|
+
12,
|
|
40
|
+
AbstractImage.black,
|
|
41
|
+
"bold",
|
|
42
|
+
0,
|
|
43
|
+
"left",
|
|
44
|
+
"right",
|
|
45
|
+
"down",
|
|
46
|
+
2,
|
|
47
|
+
AbstractImage.red,
|
|
48
|
+
false
|
|
49
|
+
),
|
|
50
|
+
AbstractImage.createText(
|
|
51
|
+
AbstractImage.createPoint(10, 70),
|
|
52
|
+
"Hello World",
|
|
53
|
+
"Arial",
|
|
54
|
+
12,
|
|
55
|
+
AbstractImage.black,
|
|
56
|
+
"bold",
|
|
57
|
+
0,
|
|
58
|
+
"right",
|
|
59
|
+
"right",
|
|
60
|
+
"down",
|
|
61
|
+
2,
|
|
62
|
+
AbstractImage.red,
|
|
63
|
+
false
|
|
64
|
+
),
|
|
65
|
+
];
|
|
66
|
+
const image = AbstractImage.createAbstractImage(
|
|
67
|
+
AbstractImage.createPoint(0, 0),
|
|
68
|
+
AbstractImage.createSize(400, 400),
|
|
69
|
+
AbstractImage.white,
|
|
70
|
+
components
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
const eps = AbstractImage.epsExportImage(image);
|
|
74
|
+
|
|
75
|
+
export const test: ExportTestDef = {
|
|
76
|
+
name: "eps text growth directions",
|
|
77
|
+
abstractImage: eps,
|
|
78
|
+
expectedImage: `%!PS-Adobe-3.0 EPSF-3.0
|
|
79
|
+
%%BoundingBox: 0 0 400 400
|
|
80
|
+
/ellipse {7 dict begin
|
|
81
|
+
/endangle exch def
|
|
82
|
+
/startangle exch def
|
|
83
|
+
/yradius exch def
|
|
84
|
+
/xradius exch def
|
|
85
|
+
/yC exch def
|
|
86
|
+
/xC exch def
|
|
87
|
+
/savematrix matrix currentmatrix def
|
|
88
|
+
xC yC translate
|
|
89
|
+
xradius yradius scale
|
|
90
|
+
0 0 1 startangle endangle arc
|
|
91
|
+
savematrix setmatrix
|
|
92
|
+
end
|
|
93
|
+
} def
|
|
94
|
+
0 0 0 setrgbcolor
|
|
95
|
+
gsave
|
|
96
|
+
/Arial findfont
|
|
97
|
+
12 scalefont setfont
|
|
98
|
+
10 390 moveto
|
|
99
|
+
(Hello World) stringwidth pop neg
|
|
100
|
+
0
|
|
101
|
+
rmoveto
|
|
102
|
+
0 rotate
|
|
103
|
+
(Hello World) show
|
|
104
|
+
grestore
|
|
105
|
+
0 0 0 setrgbcolor
|
|
106
|
+
gsave
|
|
107
|
+
/Arial findfont
|
|
108
|
+
12 scalefont setfont
|
|
109
|
+
10 370 moveto
|
|
110
|
+
(Hello World) stringwidth pop neg 0.5 mul
|
|
111
|
+
gsave (Hello World) true charpath pathbbox exch pop 3 -1 roll pop sub 0.5 mul grestore
|
|
112
|
+
rmoveto
|
|
113
|
+
0 rotate
|
|
114
|
+
(Hello World) show
|
|
115
|
+
grestore
|
|
116
|
+
0 0 0 setrgbcolor
|
|
117
|
+
gsave
|
|
118
|
+
/Arial findfont
|
|
119
|
+
12 scalefont setfont
|
|
120
|
+
10 350 moveto
|
|
121
|
+
0
|
|
122
|
+
gsave (Hello World) true charpath pathbbox exch pop 3 -1 roll pop sub grestore
|
|
123
|
+
rmoveto
|
|
124
|
+
0 rotate
|
|
125
|
+
(Hello World) show
|
|
126
|
+
grestore
|
|
127
|
+
0 0 0 setrgbcolor
|
|
128
|
+
gsave
|
|
129
|
+
/Arial findfont
|
|
130
|
+
12 scalefont setfont
|
|
131
|
+
10 330 moveto
|
|
132
|
+
0
|
|
133
|
+
gsave (Hello World) true charpath pathbbox exch pop 3 -1 roll pop sub grestore
|
|
134
|
+
rmoveto
|
|
135
|
+
0 rotate
|
|
136
|
+
(Hello World) show
|
|
137
|
+
grestore`,
|
|
138
|
+
};
|
|
@@ -1,59 +1,60 @@
|
|
|
1
|
-
import { ExportTestDef } from "../export-test-def";
|
|
2
|
-
import * as AbstractImage from "../../../../../src/index";
|
|
3
|
-
|
|
4
|
-
const components = [
|
|
5
|
-
AbstractImage.createText(
|
|
6
|
-
AbstractImage.createPoint(10, 10),
|
|
7
|
-
"Hello World",
|
|
8
|
-
"Arial",
|
|
9
|
-
12,
|
|
10
|
-
AbstractImage.black,
|
|
11
|
-
"bold",
|
|
12
|
-
0,
|
|
13
|
-
"center",
|
|
14
|
-
"right",
|
|
15
|
-
"down",
|
|
16
|
-
2,
|
|
17
|
-
AbstractImage.red
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
AbstractImage.
|
|
23
|
-
AbstractImage.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
/
|
|
36
|
-
/
|
|
37
|
-
/
|
|
38
|
-
/
|
|
39
|
-
/
|
|
40
|
-
/
|
|
41
|
-
/
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
1
|
+
import { ExportTestDef } from "../export-test-def";
|
|
2
|
+
import * as AbstractImage from "../../../../../src/index";
|
|
3
|
+
|
|
4
|
+
const components = [
|
|
5
|
+
AbstractImage.createText(
|
|
6
|
+
AbstractImage.createPoint(10, 10),
|
|
7
|
+
"Hello World",
|
|
8
|
+
"Arial",
|
|
9
|
+
12,
|
|
10
|
+
AbstractImage.black,
|
|
11
|
+
"bold",
|
|
12
|
+
0,
|
|
13
|
+
"center",
|
|
14
|
+
"right",
|
|
15
|
+
"down",
|
|
16
|
+
2,
|
|
17
|
+
AbstractImage.red,
|
|
18
|
+
false
|
|
19
|
+
),
|
|
20
|
+
];
|
|
21
|
+
const image = AbstractImage.createAbstractImage(
|
|
22
|
+
AbstractImage.createPoint(0, 0),
|
|
23
|
+
AbstractImage.createSize(400, 400),
|
|
24
|
+
AbstractImage.white,
|
|
25
|
+
components
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
const eps = AbstractImage.epsExportImage(image);
|
|
29
|
+
|
|
30
|
+
export const test: ExportTestDef = {
|
|
31
|
+
name: "eps text",
|
|
32
|
+
abstractImage: eps,
|
|
33
|
+
expectedImage: `%!PS-Adobe-3.0 EPSF-3.0
|
|
34
|
+
%%BoundingBox: 0 0 400 400
|
|
35
|
+
/ellipse {7 dict begin
|
|
36
|
+
/endangle exch def
|
|
37
|
+
/startangle exch def
|
|
38
|
+
/yradius exch def
|
|
39
|
+
/xradius exch def
|
|
40
|
+
/yC exch def
|
|
41
|
+
/xC exch def
|
|
42
|
+
/savematrix matrix currentmatrix def
|
|
43
|
+
xC yC translate
|
|
44
|
+
xradius yradius scale
|
|
45
|
+
0 0 1 startangle endangle arc
|
|
46
|
+
savematrix setmatrix
|
|
47
|
+
end
|
|
48
|
+
} def
|
|
49
|
+
0 0 0 setrgbcolor
|
|
50
|
+
gsave
|
|
51
|
+
/Arial findfont
|
|
52
|
+
12 scalefont setfont
|
|
53
|
+
10 390 moveto
|
|
54
|
+
0
|
|
55
|
+
gsave (Hello World) true charpath pathbbox exch pop 3 -1 roll pop sub grestore
|
|
56
|
+
rmoveto
|
|
57
|
+
0 rotate
|
|
58
|
+
(Hello World) show
|
|
59
|
+
grestore`,
|
|
60
|
+
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import * as AbstractImage from "../../../../src/index";
|
|
2
|
-
|
|
3
|
-
const pngEncoded =
|
|
4
|
-
"iVBORw0KGgoAAAANSUhEUgAAAMgAAACWCAIAAAAUvlBOAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAwaSURBVHhe7Z0/T9tcG4d5X8WWW0OU0MgFKRKKGnXojL8BUhFTN8asMLwLYmNmq1g6lJWRrVNFpXyDZO5QpYqQIkGj9EmUJ24t28NrJy6N49uxj+1DnPC7FOlxeKgJ9sV93+ePz/nPz3J1DYC0+a/7XwBSBWIBLkAswAWIBbgAsQAXIBbgAsQCXIBYgAsQC3ABYgEuQCzABYgFuACxABcgFuACxAJcgFiACxALcAFiAS5ALMAFiAW4ALEAFyAW4ALEAlyAWIALEAtwAU9Ch2GZdV37bI6+mmsNQ3e/OEYVpbU18c1z8UCS93KC+1UwJjWx6v3Ooea57gSipNp3QhAPNiLdifaoezwYNtx3fxClWv7lhRThRurd/d7UPxfz55vKUc59F4ZZH/Xf+396MKqYP90swrAJKYmld1/0hu5xVCRVLn4syhX3rQ9rsH/fC7qvamHnZj3kFtb7rUPNPZ5QK1Uv7CgTRlvvHk8byYIqlz4WC4G/1JNhgTWW3tDudjudS8t9P4tlzLm1jcGPwH+YCPOy29qNa5VNQ+sdj0z3zRNm4cW7fnbfOQlLoRT62b/ecJQcSzvp3J4Z7rvYNMzEp1h+stAq1K963bp7zILWTzVoaSf3d1fusQ+7PittN7eqduXw8Gpu7VyXSjWnhAezcBTLLoOmb8NP+zYU8qr7P2cYHvZjhJ8Ug5adAQOsEvPXtk+KciTJFW/hX8kJe1LhQin/LO80S3lVdL8ObB4xYtm3YV25KW/X3PdeNC08aDmNSi/aXaw0Okt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zABYgFuACxABcgFuACxAJcgFiACxALcAFiAS5ALMAFiAW4ALEAFyAW4ALEAlyAWIALEAtwAWIBLkAswAWIBbgAsQAXIBbgAsQCHFhb+z9FDDmDWJC9LAAAAABJRU5ErkJggg==";
|
|
5
|
-
|
|
6
|
-
const binaryImage = AbstractImage.createBinaryImage(
|
|
7
|
-
AbstractImage.createPoint(0, 0),
|
|
8
|
-
AbstractImage.createPoint(400, 400),
|
|
9
|
-
"png",
|
|
10
|
-
Buffer.from(pngEncoded, "base64")
|
|
11
|
-
);
|
|
12
|
-
const abstractImage = AbstractImage.createAbstractImage(
|
|
13
|
-
AbstractImage.createPoint(0, 0),
|
|
14
|
-
AbstractImage.createSize(400, 400),
|
|
15
|
-
AbstractImage.white,
|
|
16
|
-
[binaryImage, binaryImage]
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
describe("svg text unknown direction", () => {
|
|
20
|
-
it("should throw an exception", () => {
|
|
21
|
-
expect(() => {
|
|
22
|
-
const png = AbstractImage.createPNG(abstractImage);
|
|
23
|
-
}).toThrow("Not supported!");
|
|
24
|
-
});
|
|
25
|
-
});
|
|
1
|
+
import * as AbstractImage from "../../../../src/index";
|
|
2
|
+
|
|
3
|
+
const pngEncoded =
|
|
4
|
+
"iVBORw0KGgoAAAANSUhEUgAAAMgAAACWCAIAAAAUvlBOAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAwaSURBVHhe7Z0/T9tcG4d5X8WWW0OU0MgFKRKKGnXojL8BUhFTN8asMLwLYmNmq1g6lJWRrVNFpXyDZO5QpYqQIkGj9EmUJ24t28NrJy6N49uxj+1DnPC7FOlxeKgJ9sV93+ePz/nPz3J1DYC0+a/7XwBSBWIBLkAswAWIBbgAsQAXIBbgAsQCXIBYgAsQC3ABYgEuQCzABYgFuACxABcgFuACxAJcgFiACxALcAFiAS5ALMAFiAW4ALEAFyAW4ALEAlyAWIALEAtwAU9Ch2GZd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ptgHtLOg/nrmTZ/wKtZID4YkQ2l4jn1t9EY3O4/AbcyK1ZoNkw7D0aOf/QHIyY7CEebdHeU41Z/UF/p3ofsihWSDZPkQeoZV4ZnYOgPRg0S5wo3JSoh2m5pvcP71n63e6mb7SnD2pZ22e/Efmp+Qui0mfGrEzTXLRUyLFZQmeIgnW/Ez4PUU6lM/WF0mqZ7EySFTJ0TGsbwrHe7e//3fu/e351pelrN1bmwDHSyk2Wx7Lvin/o3JuVhHOYT0tkwYHinsl6ePBiYEDxXmCLE1D+blKczxDghnQ0DY4DzYODWdi2RGAExlewwywApiZWTZ9YacNbHCrgQ3u+UVJmeqDRhb8N3P8T5z7rYLnqfsp/5JL47oYol9odnhLd5fxCS5k1HyckXSrXp6MXW6LCv5Hlppxn0RHyucCqznfAPiWaFhIIV/RZDW9e+/NY+OXP3dO96cZKzWIMgvhPkqiQ++RX9APCS8RoLLCsQC3ABYgEuQCzABYgFuACxABcgFuACxAJcgFiACxALcAFiAS5ALMAFiAW4ALEAFyAW4ALEAlyAWIALEAtwAWIBLkAswAWIBbgAsQAXIBbgAsQCHFhb+z9FDDmDWJC9LAAAAABJRU5ErkJggg==";
|
|
5
|
+
|
|
6
|
+
const binaryImage = AbstractImage.createBinaryImage(
|
|
7
|
+
AbstractImage.createPoint(0, 0),
|
|
8
|
+
AbstractImage.createPoint(400, 400),
|
|
9
|
+
"png",
|
|
10
|
+
Buffer.from(pngEncoded, "base64")
|
|
11
|
+
);
|
|
12
|
+
const abstractImage = AbstractImage.createAbstractImage(
|
|
13
|
+
AbstractImage.createPoint(0, 0),
|
|
14
|
+
AbstractImage.createSize(400, 400),
|
|
15
|
+
AbstractImage.white,
|
|
16
|
+
[binaryImage, binaryImage]
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
describe("svg text unknown direction", () => {
|
|
20
|
+
it("should throw an exception", () => {
|
|
21
|
+
expect(() => {
|
|
22
|
+
const png = AbstractImage.createPNG(abstractImage);
|
|
23
|
+
}).toThrow("Not supported!");
|
|
24
|
+
});
|
|
25
|
+
});
|