├── .gitignore ├── .swiftpm └── xcode │ └── package.xcworkspace │ └── contents.xcworkspacedata ├── .travis.yml ├── LICENSE ├── Package.swift ├── README.md ├── SVGView.podspec ├── SVGView.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ ├── SVGView.xcscheme │ └── SVGViewTests.xcscheme ├── SVGViewTests ├── BaseTestCase.swift ├── Info.plist ├── SVG11Tests.swift ├── SVG12Tests.swift ├── SVGRefGenerator.swift └── w3c │ ├── 1.1F2 │ ├── refs │ │ ├── color-prop-01-b.ref │ │ ├── color-prop-02-f.ref │ │ ├── color-prop-03-t.ref │ │ ├── color-prop-04-t.ref │ │ ├── color-prop-05-t.ref │ │ ├── coords-coord-01-t.ref │ │ ├── coords-coord-02-t.ref │ │ ├── coords-trans-01-b.ref │ │ ├── coords-trans-02-t.ref │ │ ├── coords-trans-03-t.ref │ │ ├── coords-trans-04-t.ref │ │ ├── coords-trans-05-t.ref │ │ ├── coords-trans-06-t.ref │ │ ├── coords-trans-07-t.ref │ │ ├── coords-trans-08-t.ref │ │ ├── coords-trans-09-t.ref │ │ ├── coords-trans-10-f.ref │ │ ├── coords-trans-11-f.ref │ │ ├── coords-trans-12-f.ref │ │ ├── coords-trans-13-f.ref │ │ ├── coords-trans-14-f.ref │ │ ├── coords-transformattr-01-f.ref │ │ ├── coords-transformattr-02-f.ref │ │ ├── coords-transformattr-03-f.ref │ │ ├── coords-transformattr-04-f.ref │ │ ├── coords-transformattr-05-f.ref │ │ ├── coords-units-02-b.ref │ │ ├── coords-units-03-b.ref │ │ ├── masking-opacity-01-b.ref │ │ ├── painting-control-02-f.ref │ │ ├── painting-control-03-f.ref │ │ ├── painting-fill-01-t.ref │ │ ├── painting-fill-02-t.ref │ │ ├── painting-fill-03-t.ref │ │ ├── painting-fill-04-t.ref │ │ ├── painting-fill-05-b.ref │ │ ├── painting-stroke-01-t.ref │ │ ├── painting-stroke-02-t.ref │ │ ├── painting-stroke-03-t.ref │ │ ├── painting-stroke-04-t.ref │ │ ├── painting-stroke-05-t.ref │ │ ├── painting-stroke-07-t.ref │ │ ├── painting-stroke-08-t.ref │ │ ├── painting-stroke-09-t.ref │ │ ├── paths-data-01-t.ref │ │ ├── paths-data-02-t.ref │ │ ├── paths-data-03-f.ref │ │ ├── paths-data-04-t.ref │ │ ├── paths-data-05-t.ref │ │ ├── paths-data-06-t.ref │ │ ├── paths-data-07-t.ref │ │ ├── paths-data-08-t.ref │ │ ├── paths-data-09-t.ref │ │ ├── paths-data-10-t.ref │ │ ├── paths-data-12-t.ref │ │ ├── paths-data-13-t.ref │ │ ├── paths-data-14-t.ref │ │ ├── paths-data-15-t.ref │ │ ├── paths-data-16-t.ref │ │ ├── paths-data-17-f.ref │ │ ├── paths-data-18-f.ref │ │ ├── paths-data-19-f.ref │ │ ├── paths-data-20-f.ref │ │ ├── pservers-grad-01-b.ref │ │ ├── pservers-grad-02-b.ref │ │ ├── pservers-grad-04-b.ref │ │ ├── pservers-grad-05-b.ref │ │ ├── pservers-grad-07-b.ref │ │ ├── pservers-grad-09-b.ref │ │ ├── render-elems-01-t.ref │ │ ├── render-elems-02-t.ref │ │ ├── render-elems-03-t.ref │ │ ├── shapes-circle-01-t.ref │ │ ├── shapes-circle-02-t.ref │ │ ├── shapes-ellipse-01-t.ref │ │ ├── shapes-ellipse-02-t.ref │ │ ├── shapes-ellipse-03-f.ref │ │ ├── shapes-grammar-01-f.ref │ │ ├── shapes-intro-01-t.ref │ │ ├── shapes-line-01-t.ref │ │ ├── shapes-line-02-f.ref │ │ ├── shapes-polygon-01-t.ref │ │ ├── shapes-polygon-02-t.ref │ │ ├── shapes-polygon-03-t.ref │ │ ├── shapes-polyline-01-t.ref │ │ ├── shapes-polyline-02-t.ref │ │ ├── shapes-rect-02-t.ref │ │ ├── shapes-rect-04-f.ref │ │ ├── shapes-rect-05-f.ref │ │ ├── shapes-rect-06-f.ref │ │ ├── struct-defs-01-t.ref │ │ ├── struct-frag-01-t.ref │ │ ├── struct-frag-06-t.ref │ │ ├── struct-group-01-t.ref │ │ ├── struct-image-01-t.ref │ │ ├── struct-image-04-t.ref │ │ ├── struct-use-03-t.ref │ │ ├── styling-class-01-f.ref │ │ ├── styling-css-01-b.ref │ │ ├── styling-pres-01-t.ref │ │ └── types-basic-01-f.ref │ └── svg │ │ ├── animate-dom-01-f.svg │ │ ├── animate-dom-02-f.svg │ │ ├── animate-elem-02-t.svg │ │ ├── animate-elem-03-t.svg │ │ ├── animate-elem-04-t.svg │ │ ├── animate-elem-05-t.svg │ │ ├── animate-elem-06-t.svg │ │ ├── animate-elem-07-t.svg │ │ ├── animate-elem-08-t.svg │ │ ├── animate-elem-09-t.svg │ │ ├── animate-elem-10-t.svg │ │ ├── animate-elem-11-t.svg │ │ ├── animate-elem-12-t.svg │ │ ├── animate-elem-13-t.svg │ │ ├── animate-elem-14-t.svg │ │ ├── animate-elem-15-t.svg │ │ ├── animate-elem-17-t.svg │ │ ├── animate-elem-19-t.svg │ │ ├── animate-elem-20-t.svg │ │ ├── animate-elem-21-t.svg │ │ ├── animate-elem-22-b.svg │ │ ├── animate-elem-23-t.svg │ │ ├── animate-elem-24-t.svg │ │ ├── animate-elem-25-t.svg │ │ ├── animate-elem-26-t.svg │ │ ├── animate-elem-27-t.svg │ │ ├── animate-elem-28-t.svg │ │ ├── animate-elem-29-b.svg │ │ ├── animate-elem-30-t.svg │ │ ├── animate-elem-31-t.svg │ │ ├── animate-elem-32-t.svg │ │ ├── animate-elem-33-t.svg │ │ ├── animate-elem-34-t.svg │ │ ├── animate-elem-35-t.svg │ │ ├── animate-elem-36-t.svg │ │ ├── animate-elem-37-t.svg │ │ ├── animate-elem-38-t.svg │ │ ├── animate-elem-39-t.svg │ │ ├── animate-elem-40-t.svg │ │ ├── animate-elem-41-t.svg │ │ ├── animate-elem-44-t.svg │ │ ├── animate-elem-46-t.svg │ │ ├── animate-elem-52-t.svg │ │ ├── animate-elem-53-t.svg │ │ ├── animate-elem-60-t.svg │ │ ├── animate-elem-61-t.svg │ │ ├── animate-elem-62-t.svg │ │ ├── animate-elem-63-t.svg │ │ ├── animate-elem-64-t.svg │ │ ├── animate-elem-65-t.svg │ │ ├── animate-elem-66-t.svg │ │ ├── animate-elem-67-t.svg │ │ ├── animate-elem-68-t.svg │ │ ├── animate-elem-69-t.svg │ │ ├── animate-elem-70-t.svg │ │ ├── animate-elem-77-t.svg │ │ ├── animate-elem-78-t.svg │ │ ├── animate-elem-80-t.svg │ │ ├── animate-elem-81-t.svg │ │ ├── animate-elem-82-t.svg │ │ ├── animate-elem-83-t.svg │ │ ├── animate-elem-84-t.svg │ │ ├── animate-elem-85-t.svg │ │ ├── animate-elem-86-t.svg │ │ ├── animate-elem-87-t.svg │ │ ├── animate-elem-88-t.svg │ │ ├── animate-elem-89-t.svg │ │ ├── animate-elem-90-b.svg │ │ ├── animate-elem-91-t.svg │ │ ├── animate-elem-92-t.svg │ │ ├── animate-interact-events-01-t.svg │ │ ├── animate-interact-pevents-01-t.svg │ │ ├── animate-interact-pevents-02-t.svg │ │ ├── animate-interact-pevents-03-t.svg │ │ ├── animate-interact-pevents-04-t.svg │ │ ├── animate-pservers-grad-01-b.svg │ │ ├── animate-script-elem-01-b.svg │ │ ├── animate-struct-dom-01-b.svg │ │ ├── color-prof-01-f.svg │ │ ├── color-prop-01-b.svg │ │ ├── color-prop-02-f.svg │ │ ├── color-prop-03-t.svg │ │ ├── color-prop-04-t.svg │ │ ├── color-prop-05-t.svg │ │ ├── conform-viewers-01-t.svgz │ │ ├── conform-viewers-02-f.svg │ │ ├── conform-viewers-03-f.svg │ │ ├── coords-coord-01-t.svg │ │ ├── coords-coord-02-t.svg │ │ ├── coords-dom-01-f.svg │ │ ├── coords-dom-02-f.svg │ │ ├── coords-dom-03-f.svg │ │ ├── coords-dom-04-f.svg │ │ ├── coords-trans-01-b.svg │ │ ├── coords-trans-02-t.svg │ │ ├── coords-trans-03-t.svg │ │ ├── coords-trans-04-t.svg │ │ ├── coords-trans-05-t.svg │ │ ├── coords-trans-06-t.svg │ │ ├── coords-trans-07-t.svg │ │ ├── coords-trans-08-t.svg │ │ ├── coords-trans-09-t.svg │ │ ├── coords-trans-10-f.svg │ │ ├── coords-trans-11-f.svg │ │ ├── coords-trans-12-f.svg │ │ ├── coords-trans-13-f.svg │ │ ├── coords-trans-14-f.svg │ │ ├── coords-transformattr-01-f.svg │ │ ├── coords-transformattr-02-f.svg │ │ ├── coords-transformattr-03-f.svg │ │ ├── coords-transformattr-04-f.svg │ │ ├── coords-transformattr-05-f.svg │ │ ├── coords-units-01-b.svg │ │ ├── coords-units-02-b.svg │ │ ├── coords-units-03-b.svg │ │ ├── coords-viewattr-01-b.svg │ │ ├── coords-viewattr-02-b.svg │ │ ├── coords-viewattr-03-b.svg │ │ ├── coords-viewattr-04-f.svg │ │ ├── extend-namespace-01-f.svg │ │ ├── filters-background-01-f.svg │ │ ├── filters-blend-01-b.svg │ │ ├── filters-color-01-b.svg │ │ ├── filters-color-02-b.svg │ │ ├── filters-composite-02-b.svg │ │ ├── filters-composite-03-f.svg │ │ ├── filters-composite-04-f.svg │ │ ├── filters-composite-05-f.svg │ │ ├── filters-comptran-01-b.svg │ │ ├── filters-conv-01-f.svg │ │ ├── filters-conv-02-f.svg │ │ ├── filters-conv-03-f.svg │ │ ├── filters-conv-04-f.svg │ │ ├── filters-conv-05-f.svg │ │ ├── filters-diffuse-01-f.svg │ │ ├── filters-displace-01-f.svg │ │ ├── filters-displace-02-f.svg │ │ ├── filters-example-01-b.svg │ │ ├── filters-felem-01-b.svg │ │ ├── filters-felem-02-f.svg │ │ ├── filters-gauss-01-b.svg │ │ ├── filters-gauss-02-f.svg │ │ ├── filters-gauss-03-f.svg │ │ ├── filters-image-01-b.svg │ │ ├── filters-image-02-b.svg │ │ ├── filters-image-03-f.svg │ │ ├── filters-image-04-f.svg │ │ ├── filters-image-05-f.svg │ │ ├── filters-light-01-f.svg │ │ ├── filters-light-02-f.svg │ │ ├── filters-light-03-f.svg │ │ ├── filters-light-04-f.svg │ │ ├── filters-light-05-f.svg │ │ ├── filters-morph-01-f.svg │ │ ├── filters-offset-01-b.svg │ │ ├── filters-offset-02-b.svg │ │ ├── filters-overview-01-b.svg │ │ ├── filters-overview-02-b.svg │ │ ├── filters-overview-03-b.svg │ │ ├── filters-specular-01-f.svg │ │ ├── filters-tile-01-b.svg │ │ ├── filters-turb-01-f.svg │ │ ├── filters-turb-02-f.svg │ │ ├── fonts-desc-01-t.svg │ │ ├── fonts-desc-02-t.svg │ │ ├── fonts-desc-03-t.svg │ │ ├── fonts-desc-04-t.svg │ │ ├── fonts-desc-05-t.svg │ │ ├── fonts-elem-01-t.svg │ │ ├── fonts-elem-02-t.svg │ │ ├── fonts-elem-03-b.svg │ │ ├── fonts-elem-04-b.svg │ │ ├── fonts-elem-05-t.svg │ │ ├── fonts-elem-06-t.svg │ │ ├── fonts-elem-07-b.svg │ │ ├── fonts-glyph-02-t.svg │ │ ├── fonts-glyph-03-t.svg │ │ ├── fonts-glyph-04-t.svg │ │ ├── fonts-kern-01-t.svg │ │ ├── fonts-overview-201-t.svg │ │ ├── imp-path-01-f.svg │ │ ├── interact-cursor-01-f.svg │ │ ├── interact-dom-01-b.svg │ │ ├── interact-events-01-b.svg │ │ ├── interact-events-02-b.svg │ │ ├── interact-events-202-f.svg │ │ ├── interact-events-203-t.svg │ │ ├── interact-order-01-b.svg │ │ ├── interact-order-02-b.svg │ │ ├── interact-order-03-b.svg │ │ ├── interact-pevents-01-b.svg │ │ ├── interact-pevents-03-b.svg │ │ ├── interact-pevents-04-t.svg │ │ ├── interact-pevents-05-b.svg │ │ ├── interact-pevents-07-t.svg │ │ ├── interact-pevents-08-f.svg │ │ ├── interact-pevents-09-f.svg │ │ ├── interact-pevents-10-f.svg │ │ ├── interact-pointer-01-t.svg │ │ ├── interact-pointer-02-t.svg │ │ ├── interact-pointer-03-t.svg │ │ ├── interact-pointer-04-f.svg │ │ ├── interact-zoom-01-t.svg │ │ ├── interact-zoom-02-t.svg │ │ ├── interact-zoom-03-t.svg │ │ ├── linking-a-01-b.svg │ │ ├── linking-a-03-b.svg │ │ ├── linking-a-04-t.svg │ │ ├── linking-a-05-t.svg │ │ ├── linking-a-07-t.svg │ │ ├── linking-a-08-t.svg │ │ ├── linking-a-09-b.svg │ │ ├── linking-a-10-f.svg │ │ ├── linking-frag-01-f.svg │ │ ├── linking-uri-01-b.svg │ │ ├── linking-uri-02-b.svg │ │ ├── linking-uri-03-t.svg │ │ ├── masking-filter-01-f.svg │ │ ├── masking-intro-01-f.svg │ │ ├── masking-mask-01-b.svg │ │ ├── masking-mask-02-f.svg │ │ ├── masking-opacity-01-b.svg │ │ ├── masking-path-01-b.svg │ │ ├── masking-path-02-b.svg │ │ ├── masking-path-03-b.svg │ │ ├── masking-path-04-b.svg │ │ ├── masking-path-05-f.svg │ │ ├── masking-path-06-b.svg │ │ ├── masking-path-07-b.svg │ │ ├── masking-path-08-b.svg │ │ ├── masking-path-09-b.svg │ │ ├── masking-path-10-b.svg │ │ ├── masking-path-11-b.svg │ │ ├── masking-path-12-f.svg │ │ ├── masking-path-13-f.svg │ │ ├── masking-path-14-f.svg │ │ ├── metadata-example-01-t.svg │ │ ├── painting-control-01-f.svg │ │ ├── painting-control-02-f.svg │ │ ├── painting-control-03-f.svg │ │ ├── painting-control-04-f.svg │ │ ├── painting-control-05-f.svg │ │ ├── painting-control-06-f.svg │ │ ├── painting-fill-01-t.svg │ │ ├── painting-fill-02-t.svg │ │ ├── painting-fill-03-t.svg │ │ ├── painting-fill-04-t.svg │ │ ├── painting-fill-05-b.svg │ │ ├── painting-marker-01-f.svg │ │ ├── painting-marker-02-f.svg │ │ ├── painting-marker-03-f.svg │ │ ├── painting-marker-04-f.svg │ │ ├── painting-marker-05-f.svg │ │ ├── painting-marker-06-f.svg │ │ ├── painting-marker-07-f.svg │ │ ├── painting-marker-properties-01-f.svg │ │ ├── painting-render-01-b.svg │ │ ├── painting-render-02-b.svg │ │ ├── painting-stroke-01-t.svg │ │ ├── painting-stroke-02-t.svg │ │ ├── painting-stroke-03-t.svg │ │ ├── painting-stroke-04-t.svg │ │ ├── painting-stroke-05-t.svg │ │ ├── painting-stroke-06-t.svg │ │ ├── painting-stroke-07-t.svg │ │ ├── painting-stroke-08-t.svg │ │ ├── painting-stroke-09-t.svg │ │ ├── painting-stroke-10-t.svg │ │ ├── paths-data-01-t.svg │ │ ├── paths-data-02-t.svg │ │ ├── paths-data-03-f.svg │ │ ├── paths-data-04-t.svg │ │ ├── paths-data-05-t.svg │ │ ├── paths-data-06-t.svg │ │ ├── paths-data-07-t.svg │ │ ├── paths-data-08-t.svg │ │ ├── paths-data-09-t.svg │ │ ├── paths-data-10-t.svg │ │ ├── paths-data-12-t.svg │ │ ├── paths-data-13-t.svg │ │ ├── paths-data-14-t.svg │ │ ├── paths-data-15-t.svg │ │ ├── paths-data-16-t.svg │ │ ├── paths-data-17-f.svg │ │ ├── paths-data-18-f.svg │ │ ├── paths-data-19-f.svg │ │ ├── paths-data-20-f.svg │ │ ├── paths-dom-01-f.svg │ │ ├── paths-dom-02-f.svg │ │ ├── pservers-grad-01-b.svg │ │ ├── pservers-grad-02-b.svg │ │ ├── pservers-grad-03-b.svg │ │ ├── pservers-grad-04-b.svg │ │ ├── pservers-grad-05-b.svg │ │ ├── pservers-grad-06-b.svg │ │ ├── pservers-grad-07-b.svg │ │ ├── pservers-grad-08-b.svg │ │ ├── pservers-grad-09-b.svg │ │ ├── pservers-grad-10-b.svg │ │ ├── pservers-grad-11-b.svg │ │ ├── pservers-grad-12-b.svg │ │ ├── pservers-grad-13-b.svg │ │ ├── pservers-grad-14-b.svg │ │ ├── pservers-grad-15-b.svg │ │ ├── pservers-grad-16-b.svg │ │ ├── pservers-grad-17-b.svg │ │ ├── pservers-grad-18-b.svg │ │ ├── pservers-grad-20-b.svg │ │ ├── pservers-grad-21-b.svg │ │ ├── pservers-grad-22-b.svg │ │ ├── pservers-grad-23-f.svg │ │ ├── pservers-grad-24-f.svg │ │ ├── pservers-grad-stops-01-f.svg │ │ ├── pservers-pattern-01-b.svg │ │ ├── pservers-pattern-02-f.svg │ │ ├── pservers-pattern-03-f.svg │ │ ├── pservers-pattern-04-f.svg │ │ ├── pservers-pattern-05-f.svg │ │ ├── pservers-pattern-06-f.svg │ │ ├── pservers-pattern-07-f.svg │ │ ├── pservers-pattern-08-f.svg │ │ ├── pservers-pattern-09-f.svg │ │ ├── render-elems-01-t.svg │ │ ├── render-elems-02-t.svg │ │ ├── render-elems-03-t.svg │ │ ├── render-elems-06-t.svg │ │ ├── render-elems-07-t.svg │ │ ├── render-elems-08-t.svg │ │ ├── render-groups-01-b.svg │ │ ├── render-groups-03-t.svg │ │ ├── script-handle-01-b.svg │ │ ├── script-handle-02-b.svg │ │ ├── script-handle-03-b.svg │ │ ├── script-handle-04-b.svg │ │ ├── script-specify-01-f.svg │ │ ├── script-specify-02-f.svg │ │ ├── shapes-circle-01-t.svg │ │ ├── shapes-circle-02-t.svg │ │ ├── shapes-ellipse-01-t.svg │ │ ├── shapes-ellipse-02-t.svg │ │ ├── shapes-ellipse-03-f.svg │ │ ├── shapes-grammar-01-f.svg │ │ ├── shapes-intro-01-t.svg │ │ ├── shapes-intro-02-f.svg │ │ ├── shapes-line-01-t.svg │ │ ├── shapes-line-02-f.svg │ │ ├── shapes-polygon-01-t.svg │ │ ├── shapes-polygon-02-t.svg │ │ ├── shapes-polygon-03-t.svg │ │ ├── shapes-polyline-01-t.svg │ │ ├── shapes-polyline-02-t.svg │ │ ├── shapes-rect-01-t.svg │ │ ├── shapes-rect-02-t.svg │ │ ├── shapes-rect-03-t.svg │ │ ├── shapes-rect-04-f.svg │ │ ├── shapes-rect-05-f.svg │ │ ├── shapes-rect-06-f.svg │ │ ├── shapes-rect-07-f.svg │ │ ├── struct-cond-01-t.svg │ │ ├── struct-cond-02-t.svg │ │ ├── struct-cond-03-t.svg │ │ ├── struct-cond-overview-02-f.svg │ │ ├── struct-cond-overview-03-f.svg │ │ ├── struct-cond-overview-04-f.svg │ │ ├── struct-cond-overview-05-f.svg │ │ ├── struct-defs-01-t.svg │ │ ├── struct-dom-01-b.svg │ │ ├── struct-dom-02-b.svg │ │ ├── struct-dom-03-b.svg │ │ ├── struct-dom-04-b.svg │ │ ├── struct-dom-05-b.svg │ │ ├── struct-dom-06-b.svg │ │ ├── struct-dom-07-f.svg │ │ ├── struct-dom-08-f.svg │ │ ├── struct-dom-11-f.svg │ │ ├── struct-dom-12-b.svg │ │ ├── struct-dom-13-f.svg │ │ ├── struct-dom-14-f.svg │ │ ├── struct-dom-15-f.svg │ │ ├── struct-dom-16-f.svg │ │ ├── struct-dom-17-f.svg │ │ ├── struct-dom-18-f.svg │ │ ├── struct-dom-19-f.svg │ │ ├── struct-dom-20-f.svg │ │ ├── struct-frag-01-t.svg │ │ ├── struct-frag-02-t.svg │ │ ├── struct-frag-03-t.svg │ │ ├── struct-frag-04-t.svg │ │ ├── struct-frag-05-t.svg │ │ ├── struct-frag-06-t.svg │ │ ├── struct-group-01-t.svg │ │ ├── struct-group-02-b.svg │ │ ├── struct-group-03-t.svg │ │ ├── struct-image-01-t.svg │ │ ├── struct-image-02-b.svg │ │ ├── struct-image-03-t.svg │ │ ├── struct-image-04-t.svg │ │ ├── struct-image-05-b.svg │ │ ├── struct-image-06-t.svg │ │ ├── struct-image-07-t.svg │ │ ├── struct-image-08-t.svg │ │ ├── struct-image-09-t.svg │ │ ├── struct-image-10-t.svg │ │ ├── struct-image-11-b.svg │ │ ├── struct-image-12-b.svg │ │ ├── struct-image-13-f.svg │ │ ├── struct-image-14-f.svg │ │ ├── struct-image-15-f.svg │ │ ├── struct-image-16-f.svg │ │ ├── struct-image-17-b.svg │ │ ├── struct-image-18-f.svg │ │ ├── struct-image-19-f.svg │ │ ├── struct-svg-01-f.svg │ │ ├── struct-svg-02-f.svg │ │ ├── struct-svg-03-f.svg │ │ ├── struct-symbol-01-b.svg │ │ ├── struct-use-01-t.svg │ │ ├── struct-use-03-t.svg │ │ ├── struct-use-04-b.svg │ │ ├── struct-use-05-b.svg │ │ ├── struct-use-06-b.svg │ │ ├── struct-use-07-b.svg │ │ ├── struct-use-08-b.svg │ │ ├── struct-use-09-b.svg │ │ ├── struct-use-10-f.svg │ │ ├── struct-use-11-f.svg │ │ ├── struct-use-12-f.svg │ │ ├── struct-use-13-f.svg │ │ ├── struct-use-14-f.svg │ │ ├── struct-use-15-f.svg │ │ ├── styling-class-01-f.svg │ │ ├── styling-css-01-b.svg │ │ ├── styling-css-02-b.svg │ │ ├── styling-css-03-b.svg │ │ ├── styling-css-04-f.svg │ │ ├── styling-css-05-b.svg │ │ ├── styling-css-06-b.svg │ │ ├── styling-css-07-f.svg │ │ ├── styling-css-08-f.svg │ │ ├── styling-css-09-f.svg │ │ ├── styling-css-10-f.svg │ │ ├── styling-elem-01-b.svg │ │ ├── styling-inherit-01-b.svg │ │ ├── styling-pres-01-t.svg │ │ ├── styling-pres-02-f.svg │ │ ├── styling-pres-03-f.svg │ │ ├── styling-pres-04-f.svg │ │ ├── styling-pres-05-f.svg │ │ ├── svgdom-over-01-f.svg │ │ ├── text-align-01-b.svg │ │ ├── text-align-02-b.svg │ │ ├── text-align-03-b.svg │ │ ├── text-align-04-b.svg │ │ ├── text-align-05-b.svg │ │ ├── text-align-06-b.svg │ │ ├── text-align-07-t.svg │ │ ├── text-align-08-b.svg │ │ ├── text-altglyph-01-b.svg │ │ ├── text-altglyph-02-b.svg │ │ ├── text-altglyph-03-b.svg │ │ ├── text-bidi-01-t.svg │ │ ├── text-deco-01-b.svg │ │ ├── text-dom-01-f.svg │ │ ├── text-dom-02-f.svg │ │ ├── text-dom-03-f.svg │ │ ├── text-dom-04-f.svg │ │ ├── text-dom-05-f.svg │ │ ├── text-fonts-01-t.svg │ │ ├── text-fonts-02-t.svg │ │ ├── text-fonts-03-t.svg │ │ ├── text-fonts-04-t.svg │ │ ├── text-fonts-05-f.svg │ │ ├── text-fonts-202-t.svg │ │ ├── text-fonts-203-t.svg │ │ ├── text-fonts-204-t.svg │ │ ├── text-intro-01-t.svg │ │ ├── text-intro-02-b.svg │ │ ├── text-intro-03-b.svg │ │ ├── text-intro-04-t.svg │ │ ├── text-intro-05-t.svg │ │ ├── text-intro-06-t.svg │ │ ├── text-intro-07-t.svg │ │ ├── text-intro-09-b.svg │ │ ├── text-intro-10-f.svg │ │ ├── text-intro-11-t.svg │ │ ├── text-intro-12-t.svg │ │ ├── text-path-01-b.svg │ │ ├── text-path-02-b.svg │ │ ├── text-spacing-01-b.svg │ │ ├── text-text-01-b.svg │ │ ├── text-text-03-b.svg │ │ ├── text-text-04-t.svg │ │ ├── text-text-05-t.svg │ │ ├── text-text-06-t.svg │ │ ├── text-text-07-t.svg │ │ ├── text-text-08-b.svg │ │ ├── text-text-09-t.svg │ │ ├── text-text-10-t.svg │ │ ├── text-text-11-t.svg │ │ ├── text-text-12-t.svg │ │ ├── text-tref-01-b.svg │ │ ├── text-tref-02-b.svg │ │ ├── text-tref-03-b.svg │ │ ├── text-tselect-01-b.svg │ │ ├── text-tselect-02-f.svg │ │ ├── text-tselect-03-f.svg │ │ ├── text-tspan-01-b.svg │ │ ├── text-tspan-02-b.svg │ │ ├── types-basic-01-f.svg │ │ ├── types-basic-02-f.svg │ │ ├── types-dom-01-b.svg │ │ ├── types-dom-02-f.svg │ │ ├── types-dom-03-b.svg │ │ ├── types-dom-04-b.svg │ │ ├── types-dom-05-b.svg │ │ ├── types-dom-06-f.svg │ │ ├── types-dom-07-f.svg │ │ ├── types-dom-08-f.svg │ │ ├── types-dom-svgfittoviewbox-01-f.svg │ │ ├── types-dom-svglengthlist-01-f.svg │ │ ├── types-dom-svgnumberlist-01-f.svg │ │ ├── types-dom-svgstringlist-01-f.svg │ │ └── types-dom-svgtransformable-01-f.svg │ └── 1.2T │ ├── refs │ ├── coords-trans-01-t.ref │ ├── coords-trans-02-t.ref │ ├── coords-trans-03-t.ref │ ├── coords-trans-04-t.ref │ ├── coords-trans-05-t.ref │ ├── coords-trans-06-t.ref │ ├── coords-trans-07-t.ref │ ├── coords-trans-08-t.ref │ ├── coords-trans-09-t.ref │ ├── paint-color-03-t.ref │ ├── paint-color-201-t.ref │ ├── paint-fill-04-t.ref │ ├── paint-fill-06-t.ref │ ├── paint-stroke-01-t.ref │ ├── paths-data-01-t.ref │ ├── paths-data-02-t.ref │ ├── render-elems-01-t.ref │ ├── render-elems-02-t.ref │ ├── render-elems-03-t.ref │ ├── shapes-circle-01-t.ref │ ├── shapes-ellipse-01-t.ref │ ├── shapes-line-01-t.ref │ ├── shapes-polygon-01-t.ref │ ├── shapes-polyline-01-t.ref │ ├── shapes-rect-02-t.ref │ ├── struct-defs-01-t.ref │ ├── struct-frag-01-t.ref │ └── struct-use-03-t.ref │ └── svg │ ├── animate-elem-02-t.svg │ ├── animate-elem-03-t.svg │ ├── animate-elem-04-t.svg │ ├── animate-elem-05-t.svg │ ├── animate-elem-06-t.svg │ ├── animate-elem-07-t.svg │ ├── animate-elem-08-t.svg │ ├── animate-elem-09-t.svg │ ├── animate-elem-10-t.svg │ ├── animate-elem-11-t.svg │ ├── animate-elem-12-t.svg │ ├── animate-elem-13-t.svg │ ├── animate-elem-14-t.svg │ ├── animate-elem-15-t.svg │ ├── animate-elem-17-t.svg │ ├── animate-elem-19-t.svg │ ├── animate-elem-20-t.svg │ ├── animate-elem-201-t.svg │ ├── animate-elem-202-t.svg │ ├── animate-elem-203-t.svg │ ├── animate-elem-204-t.svg │ ├── animate-elem-205-t.svg │ ├── animate-elem-206-t.svg │ ├── animate-elem-207-t.svg │ ├── animate-elem-208-t.svg │ ├── animate-elem-209-t.svg │ ├── animate-elem-21-t.svg │ ├── animate-elem-210-t.svg │ ├── animate-elem-211-t.svg │ ├── animate-elem-212-t.svg │ ├── animate-elem-213-t.svg │ ├── animate-elem-214-t.svg │ ├── animate-elem-215-t.svg │ ├── animate-elem-216-t.svg │ ├── animate-elem-217-t.svg │ ├── animate-elem-218-t.svg │ ├── animate-elem-219-t.svg │ ├── animate-elem-22-t.svg │ ├── animate-elem-220-t.svg │ ├── animate-elem-221-t.svg │ ├── animate-elem-222-t.svg │ ├── animate-elem-223-t.svg │ ├── animate-elem-224-t.svg │ ├── animate-elem-225-t.svg │ ├── animate-elem-226-t.svg │ ├── animate-elem-227-t.svg │ ├── animate-elem-23-t.svg │ ├── animate-elem-24-t.svg │ ├── animate-elem-25-t.svg │ ├── animate-elem-26-t.svg │ ├── animate-elem-27-t.svg │ ├── animate-elem-28-t.svg │ ├── animate-elem-29-t.svg │ ├── animate-elem-30-t.svg │ ├── animate-elem-31-t.svg │ ├── animate-elem-32-t.svg │ ├── animate-elem-33-t.svg │ ├── animate-elem-34-t.svg │ ├── animate-elem-35-t.svg │ ├── animate-elem-36-t.svg │ ├── animate-elem-37-t.svg │ ├── animate-elem-38-t.svg │ ├── animate-elem-39-t.svg │ ├── animate-elem-40-t.svg │ ├── animate-elem-41-t.svg │ ├── animate-elem-44-t.svg │ ├── animate-elem-46-t.svg │ ├── animate-elem-52-t.svg │ ├── animate-elem-53-t.svg │ ├── animate-elem-60-t.svg │ ├── animate-elem-61-t.svg │ ├── animate-elem-62-t.svg │ ├── animate-elem-63-t.svg │ ├── animate-elem-64-t.svg │ ├── animate-elem-65-t.svg │ ├── animate-elem-66-t.svg │ ├── animate-elem-67-t.svg │ ├── animate-elem-68-t.svg │ ├── animate-elem-69-t.svg │ ├── animate-elem-70-t.svg │ ├── animate-elem-77-t.svg │ ├── animate-elem-78-t.svg │ ├── animate-elem-80-t.svg │ ├── animate-elem-81-t.svg │ ├── animate-elem-82-t.svg │ ├── animate-elem-83-t.svg │ ├── animate-elem-84-t.svg │ ├── animate-elem-85-t.svg │ ├── animate-elem-86-t.svg │ ├── conf-reader-201-t.svg │ ├── conf-reader-202-t.svg │ ├── coords-constr-201-t.svg │ ├── coords-constr-202-t.svg │ ├── coords-constr-203-t.svg │ ├── coords-constr-204-t.svg │ ├── coords-coord-01-t.svg │ ├── coords-pAR-201-t.svg │ ├── coords-trans-01-t.svg │ ├── coords-trans-02-t.svg │ ├── coords-trans-03-t.svg │ ├── coords-trans-04-t.svg │ ├── coords-trans-05-t.svg │ ├── coords-trans-06-t.svg │ ├── coords-trans-07-t.svg │ ├── coords-trans-08-t.svg │ ├── coords-trans-09-t.svg │ ├── coords-units-01-t.svg │ ├── coords-units-201-t.svg │ ├── coords-viewattr-05-t.svg │ ├── extend-namespace-02-t.svg │ ├── fonts-desc-02-t.svg │ ├── fonts-desc-03-t.svg │ ├── fonts-desc-05-t.svg │ ├── fonts-elem-01-t.svg │ ├── fonts-elem-02-t.svg │ ├── fonts-elem-03-t.svg │ ├── fonts-elem-05-t.svg │ ├── fonts-elem-06-t.svg │ ├── fonts-elem-201-t.svg │ ├── fonts-glyph-02-t.svg │ ├── fonts-glyph-03-t.svg │ ├── fonts-glyph-04-t.svg │ ├── fonts-glyph-201-t.svg │ ├── fonts-glyph-202-t.svg │ ├── fonts-glyph-203-t.svg │ ├── fonts-kern-01-t.svg │ ├── fonts-overview-201-t.svg │ ├── interact-dom-02-t.svg │ ├── interact-event-201-t.svg │ ├── interact-event-202-t.svg │ ├── interact-event-203-t.svg │ ├── interact-event-204-t.svg │ ├── interact-focus-201-t.svg │ ├── interact-focus-202-t.svg │ ├── interact-focus-203-t.svg │ ├── interact-focus-204-t.svg │ ├── interact-focus-205-t.svg │ ├── interact-focus-206-t.svg │ ├── interact-focus-207-t.svg │ ├── interact-focus-208-t.svg │ ├── interact-focus-209-t.svg │ ├── interact-focus-210-t.svg │ ├── interact-focus-211-t.svg │ ├── interact-focus-212-t.svg │ ├── interact-order-04-t.svg │ ├── interact-order-05-t.svg │ ├── interact-order-06-t.svg │ ├── interact-pevents-01-t.svg │ ├── interact-pevents-02-t.svg │ ├── interact-pevents-05-t.svg │ ├── interact-pevents-06-t.svg │ ├── interact-pevents-07-t.svg │ ├── interact-pevents-08-t.svg │ ├── interact-zoom-01-t.svg │ ├── interact-zoom-02-t.svg │ ├── interact-zoom-03-t.svg │ ├── intro-compat-201-t.svg │ ├── jpeg-required-201-t.svg │ ├── jpeg-required-202-t.svg │ ├── jpeg-required-203-t.svg │ ├── jpeg-required-204-t.svg │ ├── jpeg-required-205-t.svg │ ├── jpeg-required-206-t.svg │ ├── jpeg-required-207-t.svg │ ├── jpeg-required-208-t.svg │ ├── jpeg-required-209-t.svg │ ├── jpeg-required-210-t.svg │ ├── linking-a-03-t.svg │ ├── linking-a-08-t.svg │ ├── linking-a-09-t.svg │ ├── linking-a-201-t.svg │ ├── linking-a-202-t.svg │ ├── linking-a-203-t.svg │ ├── linking-frag-201-t.svg │ ├── linking-frag-202-t.svg │ ├── linking-frag-203-t.svg │ ├── linking-frag-204-t.svg │ ├── linking-refs-201-t.svg │ ├── linking-refs-202-t.svg │ ├── linking-refs-203-t.svg │ ├── linking-refs-204-t.svg │ ├── linking-refs-205-t.svg │ ├── linking-refs-206-t.svg │ ├── linking-refs-207-t.svg │ ├── linking-uri-03-t.svg │ ├── media-alevel-201-t.svg │ ├── media-alevel-202-t.svg │ ├── media-alevel-203-t.svg │ ├── media-alevel-204-t.svg │ ├── media-alevel-205-t.svg │ ├── media-alevel-206-t.svg │ ├── media-alevel-207-t.svg │ ├── media-alevel-208-t.svg │ ├── media-anim-201-t.svg │ ├── media-anim-202-t.svg │ ├── media-anim-203-t.svg │ ├── media-anim-204-t.svg │ ├── media-anim-205-t.svg │ ├── media-anim-206-t.svg │ ├── media-anim-207-t.svg │ ├── media-anim-208-t.svg │ ├── media-anim-209-t.svg │ ├── media-anim-210-t.svg │ ├── media-anim-211-t.svg │ ├── media-anim-212-t.svg │ ├── media-anim-213-t.svg │ ├── media-audio-201-t.svg │ ├── media-audio-202-t.svg │ ├── media-audio-203-t.svg │ ├── media-audio-204-t.svg │ ├── media-audio-205-t.svg │ ├── media-audio-206-t.svg │ ├── media-audio-207-t.svg │ ├── media-audio-208-t.svg │ ├── media-audio-209-t.svg │ ├── media-audio-210-t.svg │ ├── media-audio-211-t.svg │ ├── media-audio-212-t.svg │ ├── media-audio-213-t.svg │ ├── media-audio-214-t.svg │ ├── media-audio-215-t.svg │ ├── media-audio-216-t.svg │ ├── media-audio-217-t.svg │ ├── media-sync-201-t.svg │ ├── media-video-201-t.svg │ ├── media-video-202-t.svg │ ├── media-video-203-t.svg │ ├── media-video-204-t.svg │ ├── media-video-205-t.svg │ ├── media-video-206-t.svg │ ├── media-video-207-t.svg │ ├── media-video-208-t.svg │ ├── media-video-209-t.svg │ ├── media-video-210-t.svg │ ├── media-video-211-t.svg │ ├── media-video-212-t.svg │ ├── media-video-213-t.svg │ ├── media-video-214-t.svg │ ├── media-video-215-t.svg │ ├── media-video-216-t.svg │ ├── media-video-217-t.svg │ ├── media-video-218-t.svg │ ├── media-video-219-t.svg │ ├── media-video-220-t.svg │ ├── media-video-221-t.svg │ ├── media-video-222-t.svg │ ├── media-video-223-t.svg │ ├── media-video-224-t.svg │ ├── metadata-example-01-t.svg │ ├── paint-color-01-t.svg │ ├── paint-color-03-t.svg │ ├── paint-color-04-t.svg │ ├── paint-color-05-t.svg │ ├── paint-color-201-t.svg │ ├── paint-fill-01-t.svg │ ├── paint-fill-02-t.svg │ ├── paint-fill-03-t.svg │ ├── paint-fill-04-t.svg │ ├── paint-fill-05-t.svg │ ├── paint-fill-06-t.svg │ ├── paint-grad-04-t.svg │ ├── paint-grad-05-t.svg │ ├── paint-grad-07-t.svg │ ├── paint-grad-08-t.svg │ ├── paint-grad-09-t.svg │ ├── paint-grad-11-t.svg │ ├── paint-grad-12-t.svg │ ├── paint-grad-15-t.svg │ ├── paint-grad-16-t.svg │ ├── paint-grad-17-t.svg │ ├── paint-grad-18-t.svg │ ├── paint-grad-19-t.svg │ ├── paint-grad-201-t.svg │ ├── paint-grad-202-t.svg │ ├── paint-grad-203-t.svg │ ├── paint-grad-204-t.svg │ ├── paint-grad-205-t.svg │ ├── paint-nsstroke-201-t.svg │ ├── paint-nsstroke-202-t.svg │ ├── paint-nsstroke-203-t.svg │ ├── paint-other-201-t.svg │ ├── paint-other-202-t.svg │ ├── paint-other-203-t.svg │ ├── paint-stroke-01-t.svg │ ├── paint-stroke-02-t.svg │ ├── paint-stroke-03-t.svg │ ├── paint-stroke-04-t.svg │ ├── paint-stroke-05-t.svg │ ├── paint-stroke-06-t.svg │ ├── paint-stroke-07-t.svg │ ├── paint-stroke-08-t.svg │ ├── paint-stroke-201-t.svg │ ├── paint-stroke-202-t.svg │ ├── paint-stroke-203-t.svg │ ├── paint-stroke-204-t.svg │ ├── paint-stroke-205-t.svg │ ├── paint-stroke-206-t.svg │ ├── paint-stroke-207-t.svg │ ├── paint-vfill-201-t.svg │ ├── paint-vfill-202-t.svg │ ├── paint-vfill-203-t.svg │ ├── paint-vfill-204-t.svg │ ├── paint-vfill-205-t.svg │ ├── paint-vfill-206-t.svg │ ├── paths-data-01-t.svg │ ├── paths-data-02-t.svg │ ├── paths-data-04-t.svg │ ├── paths-data-05-t.svg │ ├── paths-data-06-t.svg │ ├── paths-data-07-t.svg │ ├── paths-data-08-t.svg │ ├── paths-data-09-t.svg │ ├── paths-data-10-t.svg │ ├── paths-data-12-t.svg │ ├── paths-data-13-t.svg │ ├── paths-data-14-t.svg │ ├── paths-data-15-t.svg │ ├── render-elems-01-t.svg │ ├── render-elems-02-t.svg │ ├── render-elems-03-t.svg │ ├── render-elems-06-t.svg │ ├── render-elems-07-t.svg │ ├── render-elems-08-t.svg │ ├── render-groups-01-t.svg │ ├── render-groups-03-t.svg │ ├── script-element-201-t.svg │ ├── script-element-202-t.svg │ ├── script-element-203-t.svg │ ├── script-handle-05-t.svg │ ├── script-handle-06-t.svg │ ├── script-handle-07-t.svg │ ├── script-handle-08-t.svg │ ├── script-handle-201-t.svg │ ├── script-handle-202-t.svg │ ├── script-handler-201-t.svg │ ├── script-handler-202-t.svg │ ├── script-listener-201-t.svg │ ├── script-listener-202-t.svg │ ├── script-listener-203-t.svg │ ├── script-listener-204-t.svg │ ├── shapes-circle-01-t.svg │ ├── shapes-circle-02-t.svg │ ├── shapes-circle-03-t.svg │ ├── shapes-ellipse-01-t.svg │ ├── shapes-ellipse-02-t.svg │ ├── shapes-ellipse-03-t.svg │ ├── shapes-intro-01-t.svg │ ├── shapes-line-01-t.svg │ ├── shapes-line-02-t.svg │ ├── shapes-polygon-01-t.svg │ ├── shapes-polygon-02-t.svg │ ├── shapes-polyline-01-t.svg │ ├── shapes-polyline-02-t.svg │ ├── shapes-rect-01-t.svg │ ├── shapes-rect-02-t.svg │ ├── shapes-rect-03-t.svg │ ├── struct-class-201-t.svg │ ├── struct-common-201-t.svg │ ├── struct-cond-01-t.svg │ ├── struct-cond-02-t.svg │ ├── struct-cond-03-t.svg │ ├── struct-cond-204-t.svg │ ├── struct-cond-205-t.svg │ ├── struct-cond-206-t.svg │ ├── struct-cond-207-t.svg │ ├── struct-cond-208-t.svg │ ├── struct-cond-209-t.svg │ ├── struct-cond-210-t.svg │ ├── struct-cond-211-t.svg │ ├── struct-cond-212-t.svg │ ├── struct-cond-213-t.svg │ ├── struct-defs-01-t.svg │ ├── struct-defs-201-t.svg │ ├── struct-discard-201-t.svg │ ├── struct-discard-202-t.svg │ ├── struct-discard-203-t.svg │ ├── struct-discard-204-t.svg │ ├── struct-discard-205-t.svg │ ├── struct-discard-206-t.svg │ ├── struct-discard-207-t.svg │ ├── struct-discard-208-t.svg │ ├── struct-frag-01-t.svg │ ├── struct-frag-02-t.svg │ ├── struct-frag-03-t.svg │ ├── struct-frag-04-t.svg │ ├── struct-frag-05-t.svg │ ├── struct-frag-06-t.svg │ ├── struct-group-01-t.svg │ ├── struct-group-03-t.svg │ ├── struct-image-01-t.svg │ ├── struct-image-03-t.svg │ ├── struct-image-04-t.svg │ ├── struct-image-06-t.svg │ ├── struct-image-07-t.svg │ ├── struct-image-08-t.svg │ ├── struct-image-09-t.svg │ ├── struct-image-10-t.svg │ ├── struct-prefetch-201-t.svg │ ├── struct-progressive-201-t.svg │ ├── struct-progressive-202-t.svg │ ├── struct-progressive-203-t.svg │ ├── struct-progressive-204-t.svg │ ├── struct-svg-201-t.svg │ ├── struct-svg-202-t.svg │ ├── struct-svg-203-t.svg │ ├── struct-svg-204-t.svg │ ├── struct-use-01-t.svg │ ├── struct-use-03-t.svg │ ├── struct-use-09-t.svg │ ├── struct-use-201-t.svg │ ├── struct-use-202-t.svg │ ├── struct-use-203-t.svg │ ├── struct-use-204-t.svg │ ├── struct-use-205-t.svg │ ├── struct-use-206-t.svg │ ├── struct-use-207-t.svg │ ├── struct-use-208-t.svg │ ├── struct-use-209-t.svg │ ├── struct-use-210-t.svg │ ├── struct-use-recursion-01-t.svg │ ├── struct-use-recursion-02-t.svg │ ├── struct-use-recursion-03-t.svg │ ├── styling-inherit-01-t.svg │ ├── styling-inherit-02-t.svg │ ├── styling-inherit-03-t.svg │ ├── styling-pres-01-t.svg │ ├── text-align-01-t.svg │ ├── text-align-07-t.svg │ ├── text-align-08-t.svg │ ├── text-align-201-t.svg │ ├── text-align-202-t.svg │ ├── text-align-203-t.svg │ ├── text-align-204-t.svg │ ├── text-area-201-t.svg │ ├── text-area-202-t.svg │ ├── text-area-203-t.svg │ ├── text-area-204-t.svg │ ├── text-area-205-t.svg │ ├── text-area-206-t.svg │ ├── text-area-207-t.svg │ ├── text-area-208-t.svg │ ├── text-area-209-t.svg │ ├── text-area-210-t.svg │ ├── text-area-211-t.svg │ ├── text-area-212-t.svg │ ├── text-area-213-t.svg │ ├── text-area-220-t.svg │ ├── text-area-221-t.svg │ ├── text-area-222-t.svg │ ├── text-area-223-t.svg │ ├── text-area-224-t.svg │ ├── text-area-225-t.svg │ ├── text-edit-201-t.svg │ ├── text-fonts-01-t.svg │ ├── text-fonts-02-t.svg │ ├── text-fonts-03-t.svg │ ├── text-fonts-04-t.svg │ ├── text-fonts-202-t.svg │ ├── text-fonts-203-t.svg │ ├── text-intro-01-t.svg │ ├── text-intro-04-t.svg │ ├── text-intro-05-t.svg │ ├── text-intro-06-t.svg │ ├── text-intro-201-t.svg │ ├── text-layout-201-t.svg │ ├── text-text-04-t.svg │ ├── text-text-05-t.svg │ ├── text-text-06-t.svg │ ├── text-text-07-t.svg │ ├── text-text-08-t.svg │ ├── text-text-09-t.svg │ ├── text-tselect-03-t.svg │ ├── text-ws-01-t.svg │ ├── text-ws-02-t.svg │ ├── types-data-201-t.svg │ ├── types-data-202-t.svg │ ├── types-data-203-t.svg │ ├── types-data-204-t.svg │ ├── udom-conform-201-t.svg │ ├── udom-conform-202-t.svg │ ├── udom-dom-201-t.svg │ ├── udom-dom-202-t.svg │ ├── udom-dom-203-t.svg │ ├── udom-dom-204-t.svg │ ├── udom-dom-205-t.svg │ ├── udom-dom-206-t.svg │ ├── udom-dom-207-t.svg │ ├── udom-dom-208-t.svg │ ├── udom-dom-209-t.svg │ ├── udom-dom-210-t.svg │ ├── udom-dom-211-t.svg │ ├── udom-dom-212-t.svg │ ├── udom-dom-213-t.svg │ ├── udom-dom-215-t.svg │ ├── udom-event-201-t.svg │ ├── udom-event-202-t.svg │ ├── udom-event-203-t.svg │ ├── udom-event-204-t.svg │ ├── udom-event-205-t.svg │ ├── udom-event-206-t.svg │ ├── udom-event-207-t.svg │ ├── udom-event-208-t.svg │ ├── udom-event-209-t.svg │ ├── udom-event-210-t.svg │ ├── udom-event-211-t.svg │ ├── udom-event-212-t.svg │ ├── udom-event-213-t.svg │ ├── udom-event-220-t.svg │ ├── udom-event-230-t.svg │ ├── udom-glob-202-t.svg │ ├── udom-glob-203-t.svg │ ├── udom-glob-204-t.svg │ ├── udom-glob-205-t.svg │ ├── udom-node-201-t.svg │ ├── udom-node-202-t.svg │ ├── udom-node-203-t.svg │ ├── udom-node-204-t.svg │ ├── udom-over-01-t.svg │ ├── udom-smil-201-t.svg │ ├── udom-smil-202-t.svg │ ├── udom-smil-203-t.svg │ ├── udom-svg-201-t.svg │ ├── udom-svg-202-t.svg │ ├── udom-svg-203-t.svg │ ├── udom-svg-204-t.svg │ ├── udom-svg-205-t.svg │ ├── udom-svg-206-t.svg │ ├── udom-svg-207-t.svg │ ├── udom-svg-208-t.svg │ ├── udom-svg-209-t.svg │ ├── udom-svg-210-t.svg │ ├── udom-svg-211-t.svg │ ├── udom-svg-212-t.svg │ ├── udom-svg-213-t.svg │ ├── udom-svg-216-t.svg │ ├── udom-svg-217-t.svg │ ├── udom-svg-218-t.svg │ ├── udom-svg-219-t.svg │ ├── udom-svg-220-t.svg │ ├── udom-svg-221-t.svg │ ├── udom-svg-222-t.svg │ ├── udom-svg-223-t.svg │ ├── udom-svg-224-t.svg │ ├── udom-svg-225-t.svg │ ├── udom-svg-226-t.svg │ ├── udom-svg-227-t.svg │ ├── udom-svg-228-t.svg │ ├── udom-svg-229-t.svg │ ├── udom-svg-230-t.svg │ ├── udom-svg-231-t.svg │ ├── udom-svg-232-t.svg │ ├── udom-svg-233-t.svg │ ├── udom-svg-234-t.svg │ ├── udom-svg-235-t.svg │ ├── udom-svg-236-t.svg │ ├── udom-svg-237-t.svg │ ├── udom-svg-238-t.svg │ ├── udom-svg-239-t.svg │ ├── udom-svg-240-t.svg │ ├── udom-svg-241-t.svg │ ├── udom-svgcolor-201-t.svg │ ├── udom-svglocatable-201-t.svg │ ├── udom-svglocatable-202-t.svg │ ├── udom-svglocatable-203-t.svg │ ├── udom-svglocatable-204-t.svg │ ├── udom-svgmatrix-201-t.svg │ ├── udom-svgmatrix-202-t.svg │ ├── udom-svgmatrix-203-t.svg │ ├── udom-svgmatrix-204-t.svg │ ├── udom-svgmatrix-205-t.svg │ ├── udom-svgmatrix-206-t.svg │ ├── udom-svgmatrix-207-t.svg │ ├── udom-svgpath-201-t.svg │ ├── udom-svgpath-202-t.svg │ ├── udom-svgpoint-201-t.svg │ ├── udom-svgpoint-202-t.svg │ ├── udom-svgrect-201-t.svg │ ├── udom-svgtimedelement-201-t.svg │ ├── udom-svgtimedelement-202-t.svg │ ├── udom-svgtimedelement-203-t.svg │ ├── udom-svgtimedelement-204-t.svg │ ├── udom-svgtimedelement-205-t.svg │ ├── udom-textcontent-201-t.svg │ ├── udom-textcontent-202-t.svg │ ├── udom-traitaccess-201-t.svg │ ├── udom-traitaccess-202-t.svg │ ├── udom-traitaccess-203-t.svg │ ├── udom-traitaccess-204-t.svg │ ├── udom-traitaccess-205-t.svg │ ├── udom-traitaccess-206-t.svg │ └── udom-traitaccess-207-t.svg ├── Source ├── Info.plist ├── Model │ ├── Images │ │ ├── SVGDataImage.swift │ │ └── SVGURLImage.swift │ ├── Nodes │ │ ├── SVGGroup.swift │ │ ├── SVGImage.swift │ │ ├── SVGNode.swift │ │ ├── SVGShape.swift │ │ ├── SVGText.swift │ │ ├── SVGUserSpaceNode.swift │ │ └── SVGViewport.swift │ ├── Primitives │ │ ├── SVGColor.swift │ │ ├── SVGFont.swift │ │ ├── SVGGradient.swift │ │ ├── SVGLength.swift │ │ ├── SVGPaint.swift │ │ ├── SVGPreserveAspectRatio.swift │ │ └── SVGStroke.swift │ └── Shapes │ │ ├── SVGCircle.swift │ │ ├── SVGEllipse.swift │ │ ├── SVGLine.swift │ │ ├── SVGPath.swift │ │ ├── SVGPolygon.swift │ │ ├── SVGPolyline.swift │ │ └── SVGRect.swift ├── Parser │ ├── CSS │ │ └── CSSParser.swift │ ├── SVG │ │ ├── Attributes │ │ │ ├── SVGAttribute.swift │ │ │ ├── SVGFontSizeAttribute.swift │ │ │ └── SVGLengthAttribute.swift │ │ ├── Elements │ │ │ ├── SVGElementParser.swift │ │ │ ├── SVGImageParser.swift │ │ │ ├── SVGShapeParser.swift │ │ │ ├── SVGStructureParsers.swift │ │ │ └── SVGTextParser.swift │ │ ├── Primitives │ │ │ └── SVGLengthParser.swift │ │ ├── SVGConstants.swift │ │ ├── SVGContext.swift │ │ ├── SVGIndex.swift │ │ ├── SVGParser.swift │ │ ├── SVGParserBasics.swift │ │ ├── SVGParserExtensions.swift │ │ ├── SVGParserPrimitives.swift │ │ ├── SVGPathReader.swift │ │ ├── SVGView.swift │ │ └── Settings │ │ │ ├── SVGLinker.swift │ │ │ ├── SVGLogger.swift │ │ │ ├── SVGScreen.swift │ │ │ └── SVGSettings.swift │ └── XML │ │ ├── DOMParser.swift │ │ └── XMLNode.swift ├── SVGView.h ├── Serialization │ ├── Serializable.swift │ ├── Serializations.swift │ └── Serializer.swift └── UI │ ├── MBezierPath+Extension_macOS.swift │ └── UIExtensions.swift ├── script-test-cases.sh ├── w3c-coverage.md └── w3c-coverage.sh /.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: swift 2 | osx_image: xcode11.3 3 | 4 | branches: 5 | only: 6 | - main 7 | 8 | script: 9 | - set -o pipefail && xcodebuild -project SVGView.xcodeproj -scheme 'SVGView' -sdk iphonesimulator13.2 ONLY_ACTIVE_ARCH=NO -destination 'platform=iOS Simulator,OS=13.3,name=iPhone 11 Pro' | xcpretty; 10 | 11 | notifications: 12 | slack: exyte:rbHEfGcQnX1drc0KNL0HVudX 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 exyte 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.3 2 | 3 | import PackageDescription 4 | 5 | let package = Package( 6 | name: "SVGView", 7 | platforms: [ 8 | .macOS(.v11), 9 | .iOS(.v14), 10 | .watchOS(.v7) 11 | ], 12 | products: [ 13 | .library( 14 | name: "SVGView", 15 | targets: ["SVGView"] 16 | ) 17 | ], 18 | targets: [ 19 | .target( 20 | name: "SVGView", 21 | path: "Source", 22 | exclude: ["Info.plist"] 23 | ) 24 | ], 25 | swiftLanguageVersions: [.v5] 26 | ) 27 | -------------------------------------------------------------------------------- /SVGView.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "SVGView" 3 | s.version = "1.0.6" 4 | s.summary = "SVGParser created with SwiftUI." 5 | 6 | s.homepage = 'https://github.com/exyte/SVGView.git' 7 | s.license = 'MIT' 8 | s.author = { 'exyte' => 'info@exyte.com' } 9 | s.source = { :git => 'https://github.com/exyte/SVGView.git', :tag => s.version.to_s } 10 | s.social_media_url = 'https://exyte.com' 11 | 12 | s.platform = :ios 13 | s.platform = :osx 14 | 15 | s.ios.deployment_target = '14.0' 16 | s.osx.deployment_target = '11.0' 17 | 18 | s.requires_arc = true 19 | s.swift_version = '5.2' 20 | 21 | s.source_files = [ 22 | 'Source/**/*.h', 23 | 'Source/**/*.swift' 24 | ] 25 | end 26 | -------------------------------------------------------------------------------- /SVGView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SVGView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SVGView.xcodeproj/xcshareddata/xcschemes/SVGViewTests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 14 | 15 | 17 | 23 | 24 | 25 | 26 | 27 | 37 | 38 | 44 | 45 | 47 | 48 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /SVGViewTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/color-prop-01-b.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | contents: [ 10 | SVGGroup { 11 | contents: [ 12 | SVGCircle { cx: 130, cy: 80, r: 60, fill: "green" }, 13 | SVGCircle { 14 | cx: 350, 15 | cy: 80, 16 | r: 60, 17 | stroke: { fill: "green", width: 4 } 18 | } 19 | ] 20 | } 21 | ] 22 | }, 23 | SVGGroup { 24 | contents: [ 25 | SVGGroup { 26 | contents: [ 27 | SVGRect { x: 60, y: 215, width: 360, height: 80 } 28 | ] 29 | } 30 | ] 31 | }, 32 | SVGGroup { 33 | contents: [ 34 | SVGText { 35 | text: "fill", 36 | font: { name: "SVGFreeSansASCII,sans-serif", size: 30 }, 37 | fill: "black", 38 | transform: [1, 0, 0, 1, 120, 170] 39 | }, 40 | SVGText { 41 | text: "stroke", 42 | font: { name: "SVGFreeSansASCII,sans-serif", size: 30 }, 43 | fill: "black", 44 | transform: [1, 0, 0, 1, 310, 170] 45 | }, 46 | SVGText { 47 | text: "stop-color", 48 | font: { name: "SVGFreeSansASCII,sans-serif", size: 30 }, 49 | fill: "black", 50 | transform: [1, 0, 0, 1, 180, 205] 51 | } 52 | ] 53 | } 54 | ] 55 | }, 56 | SVGGroup { 57 | contents: [ 58 | SVGText { 59 | id: "revision", 60 | text: "$Revision: 1.8 $", 61 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 62 | fill: "black", 63 | transform: [1, 0, 0, 1, 10, 340] 64 | } 65 | ] 66 | }, 67 | SVGRect { 68 | id: "test-frame", 69 | x: 1, 70 | y: 1, 71 | width: 478, 72 | height: 358, 73 | stroke: { fill: "black" } 74 | } 75 | ] 76 | } 77 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/color-prop-05-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | contents: [ 10 | SVGRect { x: 120, y: 60, width: 150, height: 150, fill: "lime" } 11 | ] 12 | } 13 | ] 14 | }, 15 | SVGGroup { 16 | contents: [ 17 | SVGText { 18 | id: "revision", 19 | text: "$Revision: 1.6 $", 20 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 21 | fill: "black", 22 | transform: [1, 0, 0, 1, 10, 340] 23 | } 24 | ] 25 | }, 26 | SVGRect { 27 | id: "test-frame", 28 | x: 1, 29 | y: 1, 30 | width: 478, 31 | height: 358, 32 | stroke: { fill: "black" } 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/coords-coord-01-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | contents: [ 10 | SVGLine { 11 | x2: 150, 12 | fill: "black", 13 | stroke: { fill: "black", width: 5 } 14 | }, 15 | SVGLine { 16 | y2: 150, 17 | fill: "black", 18 | stroke: { fill: "black", width: 5 } 19 | } 20 | ] 21 | }, 22 | SVGGroup { 23 | contents: [ 24 | SVGRect { width: 15, height: 15, fill: "blue" }, 25 | SVGRect { x: 150, width: 15, height: 15, fill: "blue" }, 26 | SVGRect { y: 150, width: 15, height: 15, fill: "blue" } 27 | ] 28 | }, 29 | SVGGroup { 30 | contents: [ 31 | SVGRect { width: 10, height: 10, fill: "yellow" }, 32 | SVGRect { x: 150, width: 10, height: 10, fill: "yellow" }, 33 | SVGRect { y: 150, width: 10, height: 10, fill: "yellow" } 34 | ] 35 | } 36 | ] 37 | }, 38 | SVGGroup { 39 | contents: [ 40 | SVGText { 41 | id: "revision", 42 | text: "$Revision: 1.6 $", 43 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 44 | fill: "black", 45 | transform: [1, 0, 0, 1, 10, 340] 46 | } 47 | ] 48 | }, 49 | SVGRect { 50 | id: "test-frame", 51 | x: 1, 52 | y: 1, 53 | width: 478, 54 | height: 358, 55 | stroke: { fill: "black" } 56 | } 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/coords-coord-02-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | contents: [ 10 | SVGLine { 11 | x2: 150, 12 | fill: "black", 13 | stroke: { fill: "black", width: 5 } 14 | }, 15 | SVGLine { 16 | y2: 150, 17 | fill: "black", 18 | stroke: { fill: "black", width: 5 } 19 | } 20 | ] 21 | }, 22 | SVGGroup { 23 | contents: [ 24 | SVGRect { width: 15, height: 15, fill: "blue" }, 25 | SVGRect { x: 150, width: 15, height: 15, fill: "blue" }, 26 | SVGRect { y: 150, width: 15, height: 15, fill: "blue" } 27 | ] 28 | }, 29 | SVGGroup { 30 | contents: [ 31 | SVGRect { width: 10, height: 10, fill: "yellow" }, 32 | SVGRect { x: 150, width: 10, height: 10, fill: "yellow" }, 33 | SVGRect { y: 150, width: 10, height: 10, fill: "yellow" } 34 | ] 35 | } 36 | ] 37 | }, 38 | SVGGroup { 39 | contents: [ 40 | SVGText { 41 | id: "revision", 42 | text: "$Revision: 1.7 $", 43 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 44 | fill: "black", 45 | transform: [1, 0, 0, 1, 10, 340] 46 | } 47 | ] 48 | }, 49 | SVGRect { 50 | id: "test-frame", 51 | x: 1, 52 | y: 1, 53 | width: 478, 54 | height: 358, 55 | stroke: { fill: "black" } 56 | } 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/coords-trans-02-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1, 0, 0, 1, 0, 30], 10 | contents: [ 11 | SVGGroup { 12 | id: "elementary-transforms-test", 13 | transform: [1, 0, 0, 1, 0, 10], 14 | contents: [ 15 | SVGGroup { 16 | id: "elementary-transforms", 17 | transform: [2.5, 0, 0, 2.5, -30, 0], 18 | contents: [ 19 | SVGGroup { 20 | transform: [1, 0, 0, 1, 50, 50], 21 | contents: [ 22 | SVGRect { width: 20, height: 2, fill: "blue" }, 23 | SVGRect { width: 2, height: 20, fill: "red" } 24 | ] 25 | }, 26 | SVGGroup { 27 | transform: [0, -1, 1, 0, 150, 70], 28 | contents: [ 29 | SVGRect { width: 20, height: 2, fill: "blue" }, 30 | SVGRect { width: 2, height: 20, fill: "red" } 31 | ] 32 | } 33 | ] 34 | }, 35 | SVGGroup { 36 | id: "elementary-transforms-test-markers", 37 | transform: [2.5, 0, 0, 2.5, -30, 0], 38 | contents: [ 39 | SVGText { 40 | text: "translate (50, 50)", 41 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 42 | fill: "black", 43 | transform: [1, 0, 0, 1, 40, 40] 44 | }, 45 | SVGRect { x: 48, y: 48, width: 5, height: 5, fill: "black" }, 46 | SVGRect { x: 68, y: 48, width: 5, height: 5, fill: "blue" }, 47 | SVGRect { x: 48, y: 68, width: 5, height: 5, fill: "red" }, 48 | SVGText { 49 | text: "rotate(-90)", 50 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 51 | fill: "black", 52 | transform: [1, 0, 0, 1, 140, 40] 53 | }, 54 | SVGRect { x: 148, y: 68, width: 5, height: 5, fill: "black" }, 55 | SVGRect { x: 148, y: 48, width: 5, height: 5, fill: "blue" }, 56 | SVGRect { x: 168, y: 68, width: 5, height: 5, fill: "red" } 57 | ] 58 | } 59 | ] 60 | } 61 | ] 62 | } 63 | ] 64 | }, 65 | SVGGroup { 66 | contents: [ 67 | SVGText { 68 | id: "revision", 69 | text: "$Revision: 1.5 $", 70 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 71 | fill: "black", 72 | transform: [1, 0, 0, 1, 10, 340] 73 | } 74 | ] 75 | }, 76 | SVGRect { 77 | id: "test-frame", 78 | x: 1, 79 | y: 1, 80 | width: 478, 81 | height: 358, 82 | stroke: { fill: "black" } 83 | } 84 | ] 85 | } 86 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/coords-trans-03-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1, 0, 0, 1, 0, 30], 10 | contents: [ 11 | SVGGroup { 12 | id: "elementary-transforms-test", 13 | transform: [1, 0, 0, 1, 0, 10], 14 | contents: [ 15 | SVGGroup { 16 | id: "elementary-transforms", 17 | transform: [2.5, 0, 0, 2.5, -560, 0], 18 | contents: [ 19 | SVGGroup { 20 | transform: [1, 0, 1, 1, 250, 50], 21 | contents: [ 22 | SVGRect { width: 20, height: 2, fill: "blue" }, 23 | SVGRect { width: 2, height: 20, fill: "red" } 24 | ] 25 | }, 26 | SVGGroup { 27 | transform: [1, 1, 0, 1, 350, 50], 28 | contents: [ 29 | SVGRect { width: 20, height: 2, fill: "blue" }, 30 | SVGRect { width: 2, height: 20, fill: "red" } 31 | ] 32 | } 33 | ] 34 | }, 35 | SVGGroup { 36 | id: "elementary-transforms-test-markers", 37 | transform: [2.5, 0, 0, 2.5, -560, 0], 38 | contents: [ 39 | SVGText { 40 | text: "skew x (45)", 41 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 42 | fill: "black", 43 | transform: [1, 0, 0, 1, 240, 40] 44 | }, 45 | SVGRect { x: 248, y: 48, width: 5, height: 5, fill: "black" }, 46 | SVGRect { x: 268, y: 48, width: 5, height: 5, fill: "blue" }, 47 | SVGRect { x: 268, y: 68, width: 5, height: 5, fill: "red" }, 48 | SVGText { 49 | text: "skew y (45)", 50 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 51 | fill: "black", 52 | transform: [1, 0, 0, 1, 340, 40] 53 | }, 54 | SVGRect { x: 348, y: 48, width: 5, height: 5, fill: "black" }, 55 | SVGRect { x: 368, y: 68, width: 5, height: 5, fill: "blue" }, 56 | SVGRect { x: 348, y: 68, width: 5, height: 5, fill: "red" } 57 | ] 58 | } 59 | ] 60 | } 61 | ] 62 | } 63 | ] 64 | }, 65 | SVGGroup { 66 | contents: [ 67 | SVGText { 68 | id: "revision", 69 | text: "$Revision: 1.5 $", 70 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 71 | fill: "black", 72 | transform: [1, 0, 0, 1, 10, 340] 73 | } 74 | ] 75 | }, 76 | SVGRect { 77 | id: "test-frame", 78 | x: 1, 79 | y: 1, 80 | width: 478, 81 | height: 358, 82 | stroke: { fill: "black" } 83 | } 84 | ] 85 | } 86 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/coords-trans-04-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1, 0, 0, 1, 0, 30], 10 | contents: [ 11 | SVGGroup { 12 | id: "elementary-transforms-test", 13 | contents: [ 14 | SVGGroup { 15 | id: "elementary-transforms", 16 | transform: [2.5, 0, 0, 2.5, 60, 45], 17 | contents: [ 18 | SVGGroup { 19 | transform: [2, 0, 0, 2, 40, 10], 20 | contents: [ 21 | SVGRect { width: 20, height: 1, fill: "blue" }, 22 | SVGRect { width: 1, height: 20, fill: "red" } 23 | ] 24 | } 25 | ] 26 | }, 27 | SVGGroup { 28 | id: "elementary-transforms-test-markers", 29 | transform: [2.5, 0, 0, 2.5, -364, -230], 30 | contents: [ 31 | SVGText { 32 | text: "scale (2)", 33 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 34 | fill: "black", 35 | transform: [1, 0, 0, 1, 200, 110] 36 | }, 37 | SVGRect { x: 208, y: 118, width: 5, height: 5, fill: "black" }, 38 | SVGRect { x: 248, y: 118, width: 5, height: 5, fill: "blue" }, 39 | SVGRect { x: 208, y: 158, width: 5, height: 5, fill: "red" } 40 | ] 41 | } 42 | ] 43 | } 44 | ] 45 | } 46 | ] 47 | }, 48 | SVGGroup { 49 | contents: [ 50 | SVGText { 51 | id: "revision", 52 | text: "$Revision: 1.5 $", 53 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 54 | fill: "black", 55 | transform: [1, 0, 0, 1, 10, 340] 56 | } 57 | ] 58 | }, 59 | SVGRect { 60 | id: "test-frame", 61 | x: 1, 62 | y: 1, 63 | width: 478, 64 | height: 358, 65 | stroke: { fill: "black" } 66 | } 67 | ] 68 | } 69 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/coords-trans-05-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1, 0, 0, 1, 0, 30], 10 | contents: [ 11 | SVGGroup { 12 | id: "nested-transforms-test", 13 | contents: [ 14 | SVGGroup { 15 | id: "nested-transforms", 16 | transform: [1, 0, 0, 1, -90, -450], 17 | contents: [ 18 | SVGGroup { 19 | transform: [7.5, 0, 0, 5, 125.0000025, 525], 20 | contents: [ 21 | SVGRect { width: 20, height: 1, fill: "blue" }, 22 | SVGRect { width: 0.67, height: 20, fill: "red" } 23 | ] 24 | } 25 | ] 26 | }, 27 | SVGGroup { 28 | id: "nested-transforms-test-markers", 29 | transform: [2.5, 0, 0, 2.5, -90, -450], 30 | contents: [ 31 | SVGText { 32 | text: "scale(25, 95) - translate(2, 2)", 33 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 34 | fill: "black", 35 | transform: [1, 0, 0, 1, 40, 200] 36 | }, 37 | SVGRect { x: 48, y: 208, width: 5, height: 5, fill: "black" }, 38 | SVGRect { x: 108, y: 208, width: 5, height: 5, fill: "blue" }, 39 | SVGRect { x: 48, y: 248, width: 5, height: 5, fill: "red" } 40 | ] 41 | } 42 | ] 43 | } 44 | ] 45 | } 46 | ] 47 | }, 48 | SVGGroup { 49 | contents: [ 50 | SVGText { 51 | id: "revision", 52 | text: "$Revision: 1.5 $", 53 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 54 | fill: "black", 55 | transform: [1, 0, 0, 1, 10, 340] 56 | } 57 | ] 58 | }, 59 | SVGRect { 60 | id: "test-frame", 61 | x: 1, 62 | y: 1, 63 | width: 478, 64 | height: 358, 65 | stroke: { fill: "black" } 66 | } 67 | ] 68 | } 69 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/coords-trans-06-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1, 0, 0, 1, 0, 30], 10 | contents: [ 11 | SVGGroup { 12 | id: "nested-transforms-test", 13 | contents: [ 14 | SVGGroup { 15 | id: "nested-transforms", 16 | contents: [ 17 | SVGGroup { 18 | transform: [1, 0, 0, 1, -102, -450], 19 | contents: [ 20 | SVGGroup { 21 | transform: [7.5, 0, 0, 5, 0, 0], 22 | contents: [ 23 | SVGGroup { 24 | transform: [1, 0, 0, 1, 16.666667, 105], 25 | contents: [ 26 | SVGRect { width: 20, height: 1, fill: "blue" }, 27 | SVGRect { width: 0.67, height: 20, fill: "red" } 28 | ] 29 | } 30 | ] 31 | } 32 | ] 33 | } 34 | ] 35 | }, 36 | SVGGroup { 37 | id: "nested-transforms-test-markers", 38 | transform: [2.5, 0, 0, 2.5, -600, -450], 39 | contents: [ 40 | SVGText { 41 | text: "scale(25, 95) then translate(2, 2)", 42 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 43 | fill: "black", 44 | transform: [1, 0, 0, 1, 248, 200] 45 | }, 46 | SVGRect { x: 248, y: 208, width: 5, height: 5, fill: "black" }, 47 | SVGRect { x: 308, y: 208, width: 5, height: 5, fill: "blue" }, 48 | SVGRect { x: 248, y: 248, width: 5, height: 5, fill: "red" } 49 | ] 50 | } 51 | ] 52 | } 53 | ] 54 | } 55 | ] 56 | }, 57 | SVGGroup { 58 | contents: [ 59 | SVGText { 60 | id: "revision", 61 | text: "$Revision: 1.5 $", 62 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 63 | fill: "black", 64 | transform: [1, 0, 0, 1, 10, 340] 65 | } 66 | ] 67 | }, 68 | SVGRect { 69 | id: "test-frame", 70 | x: 1, 71 | y: 1, 72 | width: 478, 73 | height: 358, 74 | stroke: { fill: "black" } 75 | } 76 | ] 77 | } 78 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/coords-trans-07-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | id: "elementary-transforms-test", 10 | contents: [ 11 | SVGGroup { 12 | id: "object_1", 13 | transform: [0.8660254038, 0.5, -0.5, 0.8660254038, 123.2050807569, 186.6025403784], 14 | contents: [ 15 | SVGRect { width: 150, height: 5, fill: "green" }, 16 | SVGRect { width: 5, height: 50, fill: "red" } 17 | ] 18 | }, 19 | SVGText { 20 | text: "rotate+translate", 21 | font: { name: "SVGFreeSansASCII,sans-serif", size: 20 }, 22 | fill: "black", 23 | transform: [1, 0, 0, 1, 65, 185] 24 | }, 25 | SVGGroup { 26 | id: "object_2", 27 | transform: [0.8660254038, 0.5, -0.5, 0.8660254038, 200, 100], 28 | contents: [ 29 | SVGRect { width: 150, height: 5, fill: "blue" }, 30 | SVGRect { width: 5, height: 50, fill: "red" } 31 | ] 32 | }, 33 | SVGText { 34 | text: "translate+rotate", 35 | font: { name: "SVGFreeSansASCII,sans-serif", size: 20 }, 36 | fill: "black", 37 | transform: [1, 0, 0, 1, 150, 100] 38 | } 39 | ] 40 | } 41 | ] 42 | }, 43 | SVGGroup { 44 | contents: [ 45 | SVGText { 46 | id: "revision", 47 | text: "$Revision: 1.5 $", 48 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 49 | fill: "black", 50 | transform: [1, 0, 0, 1, 10, 340] 51 | } 52 | ] 53 | }, 54 | SVGRect { 55 | id: "test-frame", 56 | x: 1, 57 | y: 1, 58 | width: 478, 59 | height: 358, 60 | stroke: { fill: "black" } 61 | } 62 | ] 63 | } 64 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/coords-trans-08-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | id: "elementary-transforms-test", 10 | contents: [ 11 | SVGGroup { 12 | id: "object_1", 13 | transform: [2, 1, 1, 1, 0, 0], 14 | contents: [ 15 | SVGRect { width: 150, height: 5, fill: "blue" }, 16 | SVGRect { width: 5, height: 50, fill: "red" }, 17 | SVGRect { x: 150, width: 5, height: 50, fill: "black" }, 18 | SVGRect { y: 50, width: 150, height: 5, fill: "black" }, 19 | SVGEllipse { cx: 75, cy: 25, rx: 40, ry: 15, fill: "purple" } 20 | ] 21 | }, 22 | SVGText { 23 | text: "skewX(45)+skewY(45)", 24 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 25 | fill: "black", 26 | transform: [1, 0, 0, 1, 30, 16] 27 | }, 28 | SVGGroup { 29 | id: "object_2", 30 | transform: [1, 1, 1, 2, 200, 0], 31 | contents: [ 32 | SVGRect { width: 150, height: 5, fill: "blue" }, 33 | SVGRect { width: 5, height: 50, fill: "red" }, 34 | SVGRect { x: 150, width: 5, height: 50, fill: "black" }, 35 | SVGRect { y: 50, width: 150, height: 5, fill: "black" }, 36 | SVGEllipse { cx: 75, cy: 25, rx: 40, ry: 15, fill: "purple" } 37 | ] 38 | }, 39 | SVGText { 40 | text: "skewY(45)+skewX(45)", 41 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 42 | fill: "black", 43 | transform: [1, 0, 0, 1, 230, 16] 44 | } 45 | ] 46 | } 47 | ] 48 | }, 49 | SVGGroup { 50 | contents: [ 51 | SVGText { 52 | id: "revision", 53 | text: "$Revision: 1.5 $", 54 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 55 | fill: "black", 56 | transform: [1, 0, 0, 1, 10, 340] 57 | } 58 | ] 59 | }, 60 | SVGRect { 61 | id: "test-frame", 62 | x: 1, 63 | y: 1, 64 | width: 478, 65 | height: 358, 66 | stroke: { fill: "black" } 67 | } 68 | ] 69 | } 70 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/coords-transformattr-03-f.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGRect { x: 10, width: 100, height: 200, fill: "red" }, 9 | SVGRect { 10 | width: 100, 11 | height: 200, 12 | fill: "black", 13 | transform: [1, 0, 0, 1, 10, 0] 14 | }, 15 | SVGEllipse { cx: 170, cy: 100, rx: 50, ry: 100, fill: "red" }, 16 | SVGEllipse { 17 | cx: 160, 18 | cy: 100, 19 | rx: 50, 20 | ry: 100, 21 | fill: "black", 22 | transform: [1, 0, 0, 1, 10, 0] 23 | }, 24 | SVGLine { 25 | x1: 230, 26 | y1: 10, 27 | x2: 330, 28 | y2: 200, 29 | fill: "black", 30 | stroke: { fill: "red", width: 10 } 31 | }, 32 | SVGLine { 33 | x1: 220, 34 | y1: 10, 35 | x2: 320, 36 | y2: 200, 37 | fill: "black", 38 | stroke: { fill: "black", width: 10 }, 39 | transform: [1, 0, 0, 1, 10, 0] 40 | }, 41 | SVGPath { path: "M340,0 L440,0 L390,200 z", fill: "red" }, 42 | SVGPath { 43 | path: "M330,0 L430,0 L380,200 z", 44 | fill: "black", 45 | transform: [1, 0, 0, 1, 10, 0] 46 | } 47 | ] 48 | }, 49 | SVGGroup { 50 | contents: [ 51 | SVGText { 52 | id: "revision", 53 | text: "$Revision: 1.2 $", 54 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 55 | fill: "black", 56 | transform: [1, 0, 0, 1, 10, 340] 57 | } 58 | ] 59 | }, 60 | SVGRect { 61 | id: "test-frame", 62 | x: 1, 63 | y: 1, 64 | width: 478, 65 | height: 358, 66 | stroke: { fill: "black" } 67 | } 68 | ] 69 | } 70 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/coords-transformattr-04-f.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGRect { width: 100, height: 200, fill: "red" }, 9 | SVGRect { 10 | width: 50, 11 | height: 100, 12 | fill: "black", 13 | transform: [2, 0, 0, 2, 0, 0] 14 | }, 15 | SVGEllipse { cx: 160, cy: 100, rx: 50, ry: 100, fill: "red" }, 16 | SVGEllipse { 17 | cx: 80, 18 | cy: 50, 19 | rx: 25, 20 | ry: 50, 21 | fill: "black", 22 | transform: [2, 0, 0, 2, 0, 0] 23 | }, 24 | SVGLine { 25 | x1: 220, 26 | y1: 10, 27 | x2: 320, 28 | y2: 200, 29 | fill: "black", 30 | stroke: { fill: "red", width: 10 } 31 | }, 32 | SVGLine { 33 | x1: 110, 34 | y1: 5, 35 | x2: 160, 36 | y2: 100, 37 | fill: "black", 38 | stroke: { fill: "black", width: 5 }, 39 | transform: [2, 0, 0, 2, 0, 0] 40 | }, 41 | SVGPath { path: "M330,0 L430,0 L380,200 z", fill: "red" }, 42 | SVGPath { 43 | path: "M165,0 L215,0 L190,100 z", 44 | fill: "black", 45 | transform: [2, 0, 0, 2, 0, 0] 46 | } 47 | ] 48 | }, 49 | SVGGroup { 50 | contents: [ 51 | SVGText { 52 | id: "revision", 53 | text: "$Revision: 1.2 $", 54 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 55 | fill: "black", 56 | transform: [1, 0, 0, 1, 10, 340] 57 | } 58 | ] 59 | }, 60 | SVGRect { 61 | id: "test-frame", 62 | x: 1, 63 | y: 1, 64 | width: 478, 65 | height: 358, 66 | stroke: { fill: "black" } 67 | } 68 | ] 69 | } 70 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/coords-transformattr-05-f.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1, 0, 0, 1, 50, 15], 10 | contents: [ 11 | SVGGroup { 12 | transform: [0.9659258263, 0.2588190451, -0.2588190451, 0.9659258263, 0, 0], 13 | contents: [ 14 | SVGRect { x: 10, width: 100, height: 200, fill: "red" }, 15 | SVGEllipse { cx: 170, cy: 100, rx: 50, ry: 100, fill: "red" }, 16 | SVGLine { 17 | x1: 230, 18 | y1: 10, 19 | x2: 330, 20 | y2: 200, 21 | fill: "black", 22 | stroke: { fill: "red", width: 10 } 23 | }, 24 | SVGPath { path: "M340,0 L440,0 L390,200 z", fill: "red" } 25 | ] 26 | }, 27 | SVGGroup { 28 | transform: [0.9659258263, 0.2588190451, -0.2588190451, 0.9659258263, 0, 0], 29 | contents: [ 30 | SVGRect { 31 | width: 100, 32 | height: 200, 33 | fill: "black", 34 | transform: [1, 0, 0, 1, 10, 0] 35 | }, 36 | SVGEllipse { 37 | cx: 160, 38 | cy: 100, 39 | rx: 50, 40 | ry: 100, 41 | fill: "black", 42 | transform: [1, 0, 0, 1, 10, 0] 43 | }, 44 | SVGLine { 45 | x1: 220, 46 | y1: 10, 47 | x2: 320, 48 | y2: 200, 49 | fill: "black", 50 | stroke: { fill: "black", width: 10 }, 51 | transform: [1, 0, 0, 1, 10, 0] 52 | }, 53 | SVGPath { 54 | path: "M330,0 L430,0 L380,200 z", 55 | fill: "black", 56 | transform: [1, 0, 0, 1, 10, 0] 57 | } 58 | ] 59 | } 60 | ] 61 | } 62 | ] 63 | }, 64 | SVGGroup { 65 | contents: [ 66 | SVGText { 67 | id: "revision", 68 | text: "$Revision: 1.4 $", 69 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 70 | fill: "black", 71 | transform: [1, 0, 0, 1, 10, 340] 72 | } 73 | ] 74 | }, 75 | SVGRect { 76 | id: "test-frame", 77 | x: 1, 78 | y: 1, 79 | width: 478, 80 | height: 358, 81 | stroke: { fill: "black" } 82 | } 83 | ] 84 | } 85 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/painting-control-02-f.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGPath { 9 | path: "M100,100 L100,190", 10 | stroke: { fill: "orange", width: 20, dashes: [10, 20, 20] } 11 | }, 12 | SVGPath { 13 | path: "M100,190 L100,100", 14 | stroke: { fill: "black", width: 20, dashes: [10, 20, 20] } 15 | }, 16 | SVGPath { 17 | path: "M200,100 L200,190", 18 | stroke: { fill: "orange", width: 20, offset: 5, dashes: [10, 10, 10] } 19 | }, 20 | SVGPath { 21 | path: "M200,190 L200,100", 22 | stroke: { fill: "black", width: 20, offset: 5, dashes: [10, 10, 10] } 23 | } 24 | ] 25 | }, 26 | SVGGroup { 27 | contents: [ 28 | SVGText { 29 | id: "revision", 30 | text: "$Revision: 1.4 $", 31 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 32 | fill: "black", 33 | transform: [1, 0, 0, 1, 10, 340] 34 | } 35 | ] 36 | }, 37 | SVGRect { 38 | id: "test-frame", 39 | x: 1, 40 | y: 1, 41 | width: 478, 42 | height: 358, 43 | stroke: { fill: "black" } 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/painting-control-03-f.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGPath { 9 | path: "M20,100 L50,150 L100,200 L175,175 L150,150 z", 10 | fill: "red" 11 | }, 12 | SVGPath { 13 | path: "M20,100 L50,150 L100,200 L175,175 L150,150", 14 | fill: "black", 15 | stroke: { fill: "black" } 16 | }, 17 | SVGPolyline { 18 | points: [200, 100, 250, 150, 300, 200, 375, 175, 350, 150], 19 | fill: "red" 20 | }, 21 | SVGPolyline { 22 | points: [200, 100, 250, 150, 300, 200, 375, 175, 350, 150, 200, 100], 23 | fill: "black", 24 | stroke: { fill: "black" } 25 | } 26 | ] 27 | }, 28 | SVGGroup { 29 | contents: [ 30 | SVGText { 31 | id: "revision", 32 | text: "$Revision: 1.4 $", 33 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 34 | fill: "black", 35 | transform: [1, 0, 0, 1, 10, 340] 36 | } 37 | ] 38 | }, 39 | SVGRect { 40 | id: "test-frame", 41 | x: 1, 42 | y: 1, 43 | width: 478, 44 | height: 358, 45 | stroke: { fill: "black" } 46 | } 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/painting-fill-01-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGText { 9 | text: "Basic paint: fill properties.", 10 | font: { name: "SVGFreeSansASCII,sans-serif", size: 36 }, 11 | fill: "black", 12 | transform: [1, 0, 0, 1, 40, 42] 13 | }, 14 | SVGRect { 15 | id: "fill-01", 16 | x: 75, 17 | y: 70, 18 | width: 100, 19 | height: 160, 20 | stroke: { fill: "black" } 21 | }, 22 | SVGRect { 23 | id: "fill-02", 24 | x: 275, 25 | y: 70, 26 | width: 100, 27 | height: 160, 28 | fill: "green", 29 | stroke: { fill: "black" } 30 | }, 31 | SVGText { 32 | text: "fill=\"none\"", 33 | font: { name: "SVGFreeSansASCII,sans-serif", size: 36 }, 34 | fill: "black", 35 | transform: [1, 0, 0, 1, 75, 280] 36 | }, 37 | SVGText { 38 | text: "fill=\"green\"", 39 | font: { name: "SVGFreeSansASCII,sans-serif", size: 36 }, 40 | fill: "black", 41 | transform: [1, 0, 0, 1, 275, 280] 42 | } 43 | ] 44 | }, 45 | SVGGroup { 46 | contents: [ 47 | SVGText { 48 | id: "revision", 49 | text: "$Revision: 1.7 $", 50 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 51 | fill: "black", 52 | transform: [1, 0, 0, 1, 10, 340] 53 | } 54 | ] 55 | }, 56 | SVGRect { 57 | id: "test-frame", 58 | x: 1, 59 | y: 1, 60 | width: 478, 61 | height: 358, 62 | stroke: { fill: "black" } 63 | } 64 | ] 65 | } 66 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/painting-fill-02-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | contents: [ 10 | SVGText { 11 | text: "Basic paint: fill properties.", 12 | font: { name: "Arial", size: 36 }, 13 | fill: "black", 14 | transform: [1, 0, 0, 1, 30, 42] 15 | }, 16 | SVGText { 17 | text: "fill=\"currentColor\"", 18 | font: { name: "Arial", size: 36 }, 19 | fill: "black", 20 | transform: [1, 0, 0, 1, 100, 80] 21 | }, 22 | SVGRect { 23 | id: "fill-03", 24 | x: 75, 25 | y: 110, 26 | width: 100, 27 | height: 140, 28 | fill: "green", 29 | stroke: { fill: "black" } 30 | }, 31 | SVGRect { 32 | id: "fill-04", 33 | x: 275, 34 | y: 110, 35 | width: 100, 36 | height: 140, 37 | fill: "blue", 38 | stroke: { fill: "black" } 39 | }, 40 | SVGText { 41 | text: "green", 42 | font: { name: "Arial", size: 36 }, 43 | fill: "black", 44 | transform: [1, 0, 0, 1, 80, 280] 45 | }, 46 | SVGText { 47 | text: "blue", 48 | font: { name: "Arial", size: 36 }, 49 | fill: "black", 50 | transform: [1, 0, 0, 1, 290, 280] 51 | } 52 | ] 53 | } 54 | ] 55 | }, 56 | SVGGroup { 57 | contents: [ 58 | SVGText { 59 | id: "revision", 60 | text: "$Revision: 1.4 $", 61 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 62 | fill: "black", 63 | transform: [1, 0, 0, 1, 10, 340] 64 | } 65 | ] 66 | }, 67 | SVGRect { 68 | id: "test-frame", 69 | x: 1, 70 | y: 1, 71 | width: 478, 72 | height: 358, 73 | stroke: { fill: "black" } 74 | } 75 | ] 76 | } 77 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/painting-fill-03-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGText { 9 | text: "Basic paint: fill properties.", 10 | font: { name: "SVGFreeSansASCII,sans-serif", size: 36 }, 11 | fill: "black", 12 | transform: [1, 0, 0, 1, 30, 42] 13 | }, 14 | SVGPath { 15 | path: "M110,75 l50,160 l-130,-100 l160,0 l-130,100 z", 16 | fillRule: "evenodd", 17 | fill: "lime" 18 | }, 19 | SVGPath { 20 | path: "M365,75 l50,160 l-130,-100 l160,0 l-130,100 z", 21 | fill: "lime" 22 | }, 23 | SVGText { 24 | text: "fill-rule=\"evenodd\"", 25 | font: { name: "SVGFreeSansASCII,sans-serif", size: 24 }, 26 | fill: "black", 27 | transform: [1, 0, 0, 1, 10, 282] 28 | }, 29 | SVGText { 30 | text: "fill-rule=\"nonzero\"", 31 | font: { name: "SVGFreeSansASCII,sans-serif", size: 24 }, 32 | fill: "black", 33 | transform: [1, 0, 0, 1, 260, 282] 34 | } 35 | ] 36 | }, 37 | SVGGroup { 38 | contents: [ 39 | SVGText { 40 | id: "revision", 41 | text: "$Revision: 1.6 $", 42 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 43 | fill: "black", 44 | transform: [1, 0, 0, 1, 10, 340] 45 | } 46 | ] 47 | }, 48 | SVGRect { 49 | id: "test-frame", 50 | x: 1, 51 | y: 1, 52 | width: 478, 53 | height: 358, 54 | stroke: { fill: "black" } 55 | } 56 | ] 57 | } 58 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/painting-fill-04-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | id: "G1", 10 | transform: [1, 0, 0, 1, 120, 30], 11 | contents: [ 12 | SVGRect { 13 | width: 90, 14 | height: 70, 15 | fill: "blue", 16 | stroke: { fill: "purple", width: 5 } 17 | }, 18 | SVGRect { 19 | x: 100, 20 | width: 90, 21 | height: 70, 22 | fill: "blue", 23 | stroke: { fill: "purple", width: 5 } 24 | }, 25 | SVGRect { 26 | y: 80, 27 | width: 90, 28 | height: 70, 29 | fill: "yellow", 30 | stroke: { fill: "purple", width: 2 } 31 | }, 32 | SVGRect { 33 | x: 100, 34 | y: 80, 35 | width: 90, 36 | height: 70, 37 | fill: "blue", 38 | stroke: { fill: "yellow", width: 5 } 39 | }, 40 | SVGGroup { 41 | id: "G2", 42 | contents: [ 43 | SVGRect { 44 | y: 160, 45 | width: 90, 46 | height: 70, 47 | fill: "yellow", 48 | stroke: { fill: "purple", width: 5 } 49 | }, 50 | SVGRect { 51 | x: 100, 52 | y: 160, 53 | width: 90, 54 | height: 70, 55 | fill: "yellow", 56 | stroke: { fill: "purple", width: 5 } 57 | } 58 | ] 59 | } 60 | ] 61 | } 62 | ] 63 | }, 64 | SVGGroup { 65 | contents: [ 66 | SVGText { 67 | id: "revision", 68 | text: "$Revision: 1.6 $", 69 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 70 | fill: "black", 71 | transform: [1, 0, 0, 1, 10, 340] 72 | } 73 | ] 74 | }, 75 | SVGRect { 76 | id: "test-frame", 77 | x: 1, 78 | y: 1, 79 | width: 478, 80 | height: 358, 81 | stroke: { fill: "black" } 82 | } 83 | ] 84 | } 85 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/painting-fill-05-b.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGRect { 9 | x: 20, 10 | y: 20, 11 | width: 60, 12 | height: 60, 13 | fill: "0% blue", 14 | stroke: { fill: "black" } 15 | }, 16 | SVGRect { 17 | x: 50, 18 | y: 50, 19 | width: 60, 20 | height: 60, 21 | fill: "20% blue", 22 | stroke: { fill: "black" } 23 | }, 24 | SVGRect { 25 | x: 80, 26 | y: 80, 27 | width: 60, 28 | height: 60, 29 | fill: "40% blue", 30 | stroke: { fill: "black" } 31 | }, 32 | SVGRect { 33 | x: 110, 34 | y: 110, 35 | width: 60, 36 | height: 60, 37 | fill: "60% blue", 38 | stroke: { fill: "black" } 39 | }, 40 | SVGRect { 41 | x: 140, 42 | y: 140, 43 | width: 60, 44 | height: 60, 45 | fill: "80% blue", 46 | stroke: { fill: "black" } 47 | }, 48 | SVGRect { 49 | x: 170, 50 | y: 170, 51 | width: 60, 52 | height: 60, 53 | fill: "blue", 54 | stroke: { fill: "black" } 55 | }, 56 | SVGRect { 57 | x: 200, 58 | y: 20, 59 | width: 60, 60 | height: 60, 61 | fill: "0% blue", 62 | stroke: { fill: "black" } 63 | }, 64 | SVGRect { 65 | x: 230, 66 | y: 50, 67 | width: 60, 68 | height: 60, 69 | fill: "0% blue", 70 | stroke: { fill: "black" } 71 | }, 72 | SVGRect { 73 | x: 260, 74 | y: 80, 75 | width: 60, 76 | height: 60, 77 | fill: "0% blue", 78 | stroke: { fill: "black" } 79 | }, 80 | SVGRect { 81 | x: 290, 82 | y: 110, 83 | width: 60, 84 | height: 60, 85 | fill: "blue", 86 | stroke: { fill: "black" } 87 | }, 88 | SVGRect { 89 | x: 320, 90 | y: 140, 91 | width: 60, 92 | height: 60, 93 | fill: "blue", 94 | stroke: { fill: "black" } 95 | }, 96 | SVGRect { 97 | x: 350, 98 | y: 170, 99 | width: 60, 100 | height: 60, 101 | fill: "blue", 102 | stroke: { fill: "black" } 103 | } 104 | ] 105 | }, 106 | SVGGroup { 107 | contents: [ 108 | SVGText { 109 | id: "revision", 110 | text: "$Revision: 1.4 $", 111 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 112 | fill: "black", 113 | transform: [1, 0, 0, 1, 10, 340] 114 | } 115 | ] 116 | }, 117 | SVGRect { 118 | id: "test-frame", 119 | x: 1, 120 | y: 1, 121 | width: 478, 122 | height: 358, 123 | stroke: { fill: "black" } 124 | } 125 | ] 126 | } 127 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/painting-stroke-01-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGText { 9 | text: "Basic paint: stroke properties.", 10 | font: { name: "SVGFreeSansASCII,sans-serif", size: 36 }, 11 | fill: "black", 12 | transform: [1, 0, 0, 1, 10, 40] 13 | }, 14 | SVGRect { id: "stroke-01", x: 90, y: 70, width: 300, height: 50, fill: "blue" }, 15 | SVGRect { 16 | id: "stroke-02", 17 | x: 90, 18 | y: 190, 19 | width: 300, 20 | height: 50, 21 | fill: "blue", 22 | stroke: { fill: "green", width: 20 } 23 | }, 24 | SVGText { 25 | text: "stroke=\"none\"", 26 | font: { name: "SVGFreeSansASCII,sans-serif", size: 30 }, 27 | fill: "black", 28 | transform: [1, 0, 0, 1, 140, 150] 29 | }, 30 | SVGText { 31 | text: "stroke=\"green\"", 32 | font: { name: "SVGFreeSansASCII,sans-serif", size: 30 }, 33 | fill: "black", 34 | transform: [1, 0, 0, 1, 148, 280] 35 | } 36 | ] 37 | }, 38 | SVGGroup { 39 | contents: [ 40 | SVGText { 41 | id: "revision", 42 | text: "$Revision: 1.7 $", 43 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 44 | fill: "black", 45 | transform: [1, 0, 0, 1, 10, 340] 46 | } 47 | ] 48 | }, 49 | SVGRect { 50 | id: "test-frame", 51 | x: 1, 52 | y: 1, 53 | width: 478, 54 | height: 358, 55 | stroke: { fill: "black" } 56 | } 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/painting-stroke-02-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGText { 9 | text: "Basic paint: stroke properties.", 10 | font: { name: "SVGFreeSansASCII,sans-serif", size: 36 }, 11 | fill: "black", 12 | transform: [1, 0, 0, 1, 10, 40] 13 | }, 14 | SVGRect { 15 | id: "stroke-01", 16 | x: 90, 17 | y: 70, 18 | width: 300, 19 | height: 50, 20 | stroke: { fill: "blue", width: 20 } 21 | }, 22 | SVGRect { 23 | id: "stroke-02", 24 | x: 90, 25 | y: 190, 26 | width: 300, 27 | height: 50, 28 | stroke: { fill: "blue", width: 20, join: "round" } 29 | }, 30 | SVGText { 31 | text: "stroke-width=\"20\"", 32 | font: { name: "SVGFreeSansASCII,sans-serif", size: 40 }, 33 | fill: "black", 34 | transform: [1, 0, 0, 1, 120, 160] 35 | }, 36 | SVGText { 37 | text: "stroke-linejoin=\"round\"", 38 | font: { name: "SVGFreeSansASCII,sans-serif", size: 40 }, 39 | fill: "black", 40 | transform: [1, 0, 0, 1, 58, 290] 41 | } 42 | ] 43 | }, 44 | SVGGroup { 45 | contents: [ 46 | SVGText { 47 | id: "revision", 48 | text: "$Revision: 1.7 $", 49 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 50 | fill: "black", 51 | transform: [1, 0, 0, 1, 10, 340] 52 | } 53 | ] 54 | }, 55 | SVGRect { 56 | id: "test-frame", 57 | x: 1, 58 | y: 1, 59 | width: 478, 60 | height: 358, 61 | stroke: { fill: "black" } 62 | } 63 | ] 64 | } 65 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/painting-stroke-03-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGText { 9 | text: "Basic paint: stroke properties.", 10 | font: { name: "SVGFreeSansASCII,sans-serif", size: 36 }, 11 | fill: "black", 12 | transform: [1, 0, 0, 1, 10, 40] 13 | }, 14 | SVGPath { 15 | path: "M160,70 l200,20 l-200,20", 16 | stroke: { fill: "blue", width: 30, cap: "round" } 17 | }, 18 | SVGPath { 19 | path: "M160,190 l200,20 l-200,20", 20 | stroke: { fill: "blue", width: 30, miterLimit: 1 } 21 | }, 22 | SVGText { 23 | text: "stroke-linecap=\"round\"", 24 | font: { name: "SVGFreeSansASCII,sans-serif", size: 40 }, 25 | fill: "black", 26 | transform: [1, 0, 0, 1, 60, 160] 27 | }, 28 | SVGText { 29 | text: "stroke-miterlimit=\"1\"", 30 | font: { name: "SVGFreeSansASCII,sans-serif", size: 40 }, 31 | fill: "black", 32 | transform: [1, 0, 0, 1, 130, 280] 33 | } 34 | ] 35 | }, 36 | SVGGroup { 37 | contents: [ 38 | SVGText { 39 | id: "revision", 40 | text: "$Revision: 1.6 $", 41 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 42 | fill: "black", 43 | transform: [1, 0, 0, 1, 10, 340] 44 | } 45 | ] 46 | }, 47 | SVGRect { 48 | id: "test-frame", 49 | x: 1, 50 | y: 1, 51 | width: 478, 52 | height: 358, 53 | stroke: { fill: "black" } 54 | } 55 | ] 56 | } 57 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/painting-stroke-04-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGText { 9 | text: "Basic paint: stroke properties.", 10 | font: { name: "SVGFreeSansASCII,sans-serif", size: 36 }, 11 | fill: "black", 12 | transform: [1, 0, 0, 1, 10, 60] 13 | }, 14 | SVGPath { 15 | id: "stroke-7b", 16 | path: "M50,120 L430,120", 17 | stroke: { fill: "blue", width: 25, dashes: [10, 10] } 18 | }, 19 | SVGPath { 20 | id: "stroke-7c", 21 | path: "M50,140 L430,140", 22 | stroke: { fill: "black", width: 25, offset: 10, dashes: [10, 10] } 23 | }, 24 | SVGText { 25 | text: "stroke-dasharray=\"10, 10\"", 26 | font: { name: "SVGFreeSansASCII,sans-serif", size: 30 }, 27 | fill: "black", 28 | transform: [1, 0, 0, 1, 65, 210] 29 | }, 30 | SVGText { 31 | text: "stroke-dashoffset=\"10\"", 32 | font: { name: "SVGFreeSansASCII,sans-serif", size: 30 }, 33 | fill: "black", 34 | transform: [1, 0, 0, 1, 75, 260] 35 | } 36 | ] 37 | }, 38 | SVGGroup { 39 | contents: [ 40 | SVGText { 41 | id: "revision", 42 | text: "$Revision: 1.6 $", 43 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 44 | fill: "black", 45 | transform: [1, 0, 0, 1, 10, 340] 46 | } 47 | ] 48 | }, 49 | SVGRect { 50 | id: "test-frame", 51 | x: 1, 52 | y: 1, 53 | width: 478, 54 | height: 358, 55 | stroke: { fill: "black" } 56 | } 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/painting-stroke-07-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1.2, 0, 0, 1.2, 72, 36], 10 | contents: [ 11 | SVGPath { 12 | path: "M20,20 L200,30 L20,40", 13 | stroke: { fill: "black", width: 10, miterLimit: 20 } 14 | }, 15 | SVGPath { 16 | path: "M20,50 L200,60 L20,70", 17 | stroke: { fill: "black", width: 10, miterLimit: 18.1 } 18 | }, 19 | SVGPath { 20 | path: "M20,80 L200,90 L20,100", 21 | stroke: { fill: "black", width: 10, miterLimit: 17.9 } 22 | }, 23 | SVGPath { 24 | path: "M20,110 L200,120 L20,130", 25 | stroke: { fill: "black", width: 10, miterLimit: 17 } 26 | }, 27 | SVGPath { 28 | path: "M20,140 L200,150 L20,160", 29 | stroke: { fill: "black", width: 10 } 30 | }, 31 | SVGPath { 32 | path: "M20,170 L200,180 L20,190", 33 | stroke: { fill: "black", width: 10, miterLimit: 1 } 34 | } 35 | ] 36 | } 37 | ] 38 | }, 39 | SVGGroup { 40 | contents: [ 41 | SVGText { 42 | id: "revision", 43 | text: "$Revision: 1.1 $", 44 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 45 | fill: "black", 46 | transform: [1, 0, 0, 1, 10, 340] 47 | } 48 | ] 49 | }, 50 | SVGRect { 51 | id: "test-frame", 52 | x: 1, 53 | y: 1, 54 | width: 478, 55 | height: 358, 56 | stroke: { fill: "black" } 57 | } 58 | ] 59 | } 60 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/painting-stroke-08-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1.7, 0, 0, 1.7, 50, 0], 10 | contents: [ 11 | SVGCircle { cx: 200, cy: 20, r: 5, fill: "#FF6666" }, 12 | SVGCircle { cx: 200, cy: 40, r: 5, fill: "#FF6666" }, 13 | SVGCircle { cx: 200, cy: 60, r: 5, fill: "#FF6666" }, 14 | SVGCircle { cx: 200, cy: 80, r: 5, fill: "#FF6666" }, 15 | SVGCircle { cx: 200, cy: 80, r: 5, fill: "yellow" }, 16 | SVGCircle { cx: 200, cy: 100, r: 5, fill: "yellow" }, 17 | SVGCircle { cx: 200, cy: 120, r: 5, fill: "yellow" }, 18 | SVGCircle { cx: 200, cy: 140, r: 5, fill: "yellow" }, 19 | SVGCircle { cx: 200, cy: 160, r: 5, fill: "#66FF33" }, 20 | SVGCircle { cx: 200, cy: 180, r: 5, fill: "#66FF33" }, 21 | SVGCircle { cx: 200, cy: 200, r: 5, fill: "#66FF33" }, 22 | SVGPath { 23 | path: "M20,20 L200,20", 24 | stroke: { fill: "0% blue", width: 10 } 25 | }, 26 | SVGPath { 27 | path: "M20,40 L200,40", 28 | stroke: { fill: "0% blue", width: 10 } 29 | }, 30 | SVGPath { 31 | path: "M20,60 L200,60", 32 | stroke: { fill: "0% blue", width: 10 } 33 | }, 34 | SVGPath { 35 | path: "M20,80 L200,80", 36 | stroke: { fill: "20% blue", width: 10 } 37 | }, 38 | SVGPath { 39 | path: "M20,100 L200,100", 40 | stroke: { fill: "40% blue", width: 10 } 41 | }, 42 | SVGPath { 43 | path: "M20,120 L200,120", 44 | stroke: { fill: "60% blue", width: 10 } 45 | }, 46 | SVGPath { 47 | path: "M20,140 L200,140", 48 | stroke: { fill: "80% blue", width: 10 } 49 | }, 50 | SVGPath { 51 | path: "M20,160 L200,160", 52 | stroke: { fill: "blue", width: 10 } 53 | }, 54 | SVGPath { 55 | path: "M20,180 L200,180", 56 | stroke: { fill: "blue", width: 10 } 57 | }, 58 | SVGPath { 59 | path: "M20,200 L200,200", 60 | stroke: { fill: "blue", width: 10 } 61 | } 62 | ] 63 | } 64 | ] 65 | }, 66 | SVGGroup { 67 | contents: [ 68 | SVGText { 69 | id: "revision", 70 | text: "$Revision: 1.5 $", 71 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 72 | fill: "black", 73 | transform: [1, 0, 0, 1, 10, 340] 74 | } 75 | ] 76 | }, 77 | SVGRect { 78 | id: "test-frame", 79 | x: 1, 80 | y: 1, 81 | width: 478, 82 | height: 358, 83 | stroke: { fill: "black" } 84 | } 85 | ] 86 | } 87 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/painting-stroke-09-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGPath { 9 | path: "M50,120 h385", 10 | stroke: { fill: "black", width: 25, dashes: [25, 5, 5, 5] } 11 | } 12 | ] 13 | }, 14 | SVGGroup { 15 | contents: [ 16 | SVGText { 17 | id: "revision", 18 | text: "$Revision: 1.5 $", 19 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 20 | fill: "black", 21 | transform: [1, 0, 0, 1, 10, 340] 22 | } 23 | ] 24 | }, 25 | SVGRect { 26 | id: "test-frame", 27 | x: 1, 28 | y: 1, 29 | width: 478, 30 | height: 358, 31 | stroke: { fill: "black" } 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/paths-data-09-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGText { 9 | text: "Lines drawn with commands:", 10 | font: { name: "SVGFreeSansASCII,sans-serif", size: 24 }, 11 | fill: "black", 12 | transform: [1, 0, 0, 1, 75, 34] 13 | }, 14 | SVGText { 15 | text: "m and z", 16 | font: { name: "SVGFreeSansASCII,sans-serif", size: 24 }, 17 | fill: "black", 18 | transform: [1, 0, 0, 1, 180, 64] 19 | }, 20 | SVGGroup { 21 | transform: [1.8, 0, 0, 1.8, 0, -270], 22 | contents: [ 23 | SVGPath { 24 | id: "Triangle_stroke_mz", 25 | path: "m62,190 l51.96152,90 l-103.92304,0 l51.96152,-90 z m0,15 l38.97114,67.5 l-77.91228,0 l38.97114,-67.5 z", 26 | stroke: { fill: "black" } 27 | }, 28 | SVGRect { x: 60, y: 188, width: 4, height: 4, fill: "#40DD20" }, 29 | SVGRect { x: 111.96152, y: 278, width: 4, height: 4, fill: "#40DD20" }, 30 | SVGRect { x: 8.03848, y: 278, width: 4, height: 4, fill: "#40DD20" }, 31 | SVGRect { x: 60, y: 203, width: 4, height: 4, fill: "#40DD20" }, 32 | SVGRect { x: 98.97114, y: 270.5, width: 4, height: 4, fill: "#40DD20" }, 33 | SVGRect { x: 21.02886, y: 270.5, width: 4, height: 4, fill: "#40DD20" }, 34 | SVGPath { 35 | id: "Triangle_fill_mz", 36 | path: "m177,190 l51.96152,90 l-103.92304,0 l51.96152,-90 z m0,15 l38.97114,67.5 l-77.91228,0 l38.97114,-67.5 z", 37 | fillRule: "evenodd", 38 | fill: "#006000" 39 | }, 40 | SVGRect { x: 175, y: 188, width: 4, height: 4, fill: "#40DD20" }, 41 | SVGRect { x: 226.96152, y: 278, width: 4, height: 4, fill: "#40DD20" }, 42 | SVGRect { x: 123.03848, y: 278, width: 4, height: 4, fill: "#40DD20" }, 43 | SVGRect { x: 175, y: 203, width: 4, height: 4, fill: "#40DD20" }, 44 | SVGRect { x: 213.97114, y: 270.5, width: 4, height: 4, fill: "#40DD20" }, 45 | SVGRect { x: 136.02886, y: 270.5, width: 4, height: 4, fill: "#40DD20" } 46 | ] 47 | } 48 | ] 49 | }, 50 | SVGGroup { 51 | contents: [ 52 | SVGText { 53 | id: "revision", 54 | text: "$Revision: 1.6 $", 55 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 56 | fill: "black", 57 | transform: [1, 0, 0, 1, 10, 340] 58 | } 59 | ] 60 | }, 61 | SVGRect { 62 | id: "test-frame", 63 | x: 1, 64 | y: 1, 65 | width: 478, 66 | height: 358, 67 | stroke: { fill: "black" } 68 | } 69 | ] 70 | } 71 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/paths-data-12-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGPath { 9 | path: "M100,100 C100,20,200,20,200,100 S300,180,300,100", 10 | stroke: { fill: "black", width: 3 } 11 | }, 12 | SVGRect { x: 100, y: 100, width: 4, height: 4, fill: "blue" }, 13 | SVGRect { x: 200, y: 100, width: 4, height: 4, fill: "blue" }, 14 | SVGRect { x: 300, y: 100, width: 4, height: 4, fill: "blue" }, 15 | SVGPath { 16 | path: "M100,250 S200,200,200,250 S300,300,300,250", 17 | stroke: { fill: "black", width: 3 } 18 | }, 19 | SVGRect { x: 100, y: 250, width: 4, height: 4, fill: "blue" }, 20 | SVGRect { x: 200, y: 200, width: 4, height: 4, fill: "blue" }, 21 | SVGRect { x: 200, y: 250, width: 4, height: 4, fill: "blue" }, 22 | SVGRect { x: 200, y: 300, width: 4, height: 4, fill: "blue" }, 23 | SVGRect { x: 300, y: 300, width: 4, height: 4, fill: "blue" }, 24 | SVGRect { x: 300, y: 250, width: 4, height: 4, fill: "blue" } 25 | ] 26 | }, 27 | SVGGroup { 28 | contents: [ 29 | SVGText { 30 | id: "revision", 31 | text: "$Revision: 1.5 $", 32 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 33 | fill: "black", 34 | transform: [1, 0, 0, 1, 10, 340] 35 | } 36 | ] 37 | }, 38 | SVGRect { 39 | id: "test-frame", 40 | x: 1, 41 | y: 1, 42 | width: 478, 43 | height: 358, 44 | stroke: { fill: "black" } 45 | } 46 | ] 47 | } 48 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/paths-data-13-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGPath { 9 | path: "M240,56 H270 H300 H320 H400", 10 | fill: "black", 11 | stroke: { fill: "green", width: 5 } 12 | }, 13 | SVGPath { 14 | path: "M240,156 V180 V200 V260 V300", 15 | fill: "black", 16 | stroke: { fill: "blue", width: 5 } 17 | } 18 | ] 19 | }, 20 | SVGGroup { 21 | contents: [ 22 | SVGText { 23 | id: "revision", 24 | text: "$Revision: 1.5 $", 25 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 26 | fill: "black", 27 | transform: [1, 0, 0, 1, 10, 340] 28 | } 29 | ] 30 | }, 31 | SVGRect { 32 | id: "test-frame", 33 | x: 1, 34 | y: 1, 35 | width: 478, 36 | height: 358, 37 | stroke: { fill: "black" } 38 | } 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/paths-data-14-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1.8, 0, 0, 1.8, 0, 0], 10 | contents: [ 11 | SVGPath { 12 | path: "m62,56 l51.96152,90 l-103.92304,0 l51.96152,-90 z m0,15 l38.97114,67.5 l-77.91228,0 l38.97114,-67.5 z", 13 | stroke: { fill: "black" } 14 | }, 15 | SVGPath { 16 | path: "M177,56 L228.96152,146 L125.03848,146 L177,56 z M177,71 L215.97114,138.5 L138.02886,138.5 L177,71 z", 17 | fillRule: "evenodd", 18 | fill: "blue" 19 | } 20 | ] 21 | } 22 | ] 23 | }, 24 | SVGGroup { 25 | contents: [ 26 | SVGText { 27 | id: "revision", 28 | text: "$Revision: 1.6 $", 29 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 30 | fill: "black", 31 | transform: [1, 0, 0, 1, 10, 340] 32 | } 33 | ] 34 | }, 35 | SVGRect { 36 | id: "test-frame", 37 | x: 1, 38 | y: 1, 39 | width: 478, 40 | height: 358, 41 | stroke: { fill: "black" } 42 | } 43 | ] 44 | } 45 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/paths-data-15-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1.8, 0, 0, 1.8, 36, 90], 10 | contents: [ 11 | SVGPath { 12 | path: "M20,20 Q50,10,80,20 Q110,30,140,20 Q170,10,200,20", 13 | stroke: { fill: "purple", width: 3 } 14 | }, 15 | SVGPath { 16 | path: "M20,50 T50,50 T80,50", 17 | stroke: { fill: "blue", width: 3 } 18 | }, 19 | SVGPath { path: "M20,52 l-2,4 h4 z", fill: "black" }, 20 | SVGPath { path: "M50,52 l-2,4 h4 z", fill: "black" }, 21 | SVGPath { path: "M80,52 l-2,4 h4 z", fill: "black" } 22 | ] 23 | } 24 | ] 25 | }, 26 | SVGGroup { 27 | contents: [ 28 | SVGText { 29 | id: "revision", 30 | text: "$Revision: 1.6 $", 31 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 32 | fill: "black", 33 | transform: [1, 0, 0, 1, 10, 340] 34 | } 35 | ] 36 | }, 37 | SVGRect { 38 | id: "test-frame", 39 | x: 1, 40 | y: 1, 41 | width: 478, 42 | height: 358, 43 | stroke: { fill: "black" } 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/paths-data-16-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGText { 9 | text: "Test relative-ness of implicit lineto path commands", 10 | font: { name: "SVGFreeSansASCII,sans-serif", size: 13 }, 11 | fill: "black", 12 | transform: [1, 0, 0, 1, 10, 40] 13 | }, 14 | SVGGroup { 15 | contents: [ 16 | SVGPath { 17 | path: "M100,120 L160,220 L40,220 z", 18 | fill: "red", 19 | stroke: { fill: "red", width: 16, join: "round" } 20 | }, 21 | SVGPath { 22 | path: "M350,120 L410,220 L290,220 z", 23 | fill: "red", 24 | stroke: { fill: "red", width: 16, join: "round" } 25 | } 26 | ] 27 | }, 28 | SVGGroup { 29 | contents: [ 30 | SVGPath { 31 | path: "M100,120 L160,220 L40,220 z", 32 | fill: "gold", 33 | stroke: { fill: "black", width: 16, join: "round" } 34 | }, 35 | SVGPath { 36 | path: "m350,120 l60,100 l-120,0 z", 37 | fill: "gold", 38 | stroke: { fill: "black", width: 16, join: "round" } 39 | } 40 | ] 41 | } 42 | ] 43 | }, 44 | SVGGroup { 45 | contents: [ 46 | SVGText { 47 | id: "revision", 48 | text: "$Revision: 1.3 $", 49 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 50 | fill: "black", 51 | transform: [1, 0, 0, 1, 10, 340] 52 | } 53 | ] 54 | }, 55 | SVGRect { 56 | id: "test-frame", 57 | x: 1, 58 | y: 1, 59 | width: 478, 60 | height: 358, 61 | stroke: { fill: "black" } 62 | } 63 | ] 64 | } 65 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/paths-data-17-f.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGPath { 9 | path: "M50,50 L50,150 L150,150 L150,50 z", 10 | stroke: { fill: "red", width: 5 } 11 | }, 12 | SVGPath { 13 | path: "M50,50 L50,150 L150,150 L150,50 z", 14 | stroke: { fill: "black", width: 6 } 15 | }, 16 | SVGPath { 17 | path: "M250,50 L250,150 L350,150 L350,50 z", 18 | stroke: { fill: "red", width: 5 } 19 | }, 20 | SVGPath { 21 | path: "M250,50 L250,150 L350,150 L350,50 z", 22 | stroke: { fill: "black", width: 6 } 23 | } 24 | ] 25 | }, 26 | SVGGroup { 27 | contents: [ 28 | SVGText { 29 | id: "revision", 30 | text: "$Revision: 1.2 $", 31 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 32 | fill: "black", 33 | transform: [1, 0, 0, 1, 10, 340] 34 | } 35 | ] 36 | }, 37 | SVGRect { 38 | id: "test-frame", 39 | x: 1, 40 | y: 1, 41 | width: 478, 42 | height: 358, 43 | stroke: { fill: "black" } 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/paths-data-20-f.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGPath { 9 | path: "M120,120 h25 a25,25,0,1,0,-25,25 z", 10 | fill: "red", 11 | stroke: { fill: "lime" } 12 | }, 13 | SVGPath { path: "M120,120 h25 a25,25,0,1,0,-25,25 z", fill: "lime" }, 14 | SVGPath { 15 | path: "M200,120 h-25 a25,25,0,1,1,25,25 z", 16 | fill: "red", 17 | stroke: { fill: "lime" } 18 | }, 19 | SVGPath { path: "M200,120 h-25 a25,25,0,1,1,25,25 z", fill: "lime" }, 20 | SVGPath { 21 | path: "M280,120 h25 a25,25,0,1,0,-25,25 z", 22 | fill: "lime", 23 | stroke: { fill: "lime" } 24 | }, 25 | SVGPath { path: "M280,120 h25 z", fill: "red" }, 26 | SVGPath { 27 | path: "M360,120 h-25 a25,25,0,1,1,25,25 z", 28 | fill: "lime", 29 | stroke: { fill: "lime" } 30 | }, 31 | SVGPath { path: "M360,120 h-25 z", fill: "red" }, 32 | SVGPath { 33 | path: "M120,200 h25 a25,25,0,1,1,-25,-25 z", 34 | fill: "red", 35 | stroke: { fill: "lime" } 36 | }, 37 | SVGPath { path: "M120,200 h25 a25,25,0,1,1,-25,-25 z", fill: "lime" }, 38 | SVGPath { 39 | path: "M200,200 h-25 a25,25,0,1,0,25,-25 z", 40 | fill: "lime", 41 | stroke: { fill: "lime" } 42 | }, 43 | SVGPath { path: "M200,200 h-25 z", fill: "red" }, 44 | SVGPath { 45 | path: "M280,200 h25 a25,25,0,1,1,-25,-25 z", 46 | fill: "lime", 47 | stroke: { fill: "lime" } 48 | }, 49 | SVGPath { path: "M280,200 h25 z", fill: "red" }, 50 | SVGPath { 51 | path: "M360,200 h-25 a25,25,0,1,0,25,-25 z", 52 | fill: "lime", 53 | stroke: { fill: "lime" } 54 | }, 55 | SVGPath { path: "M360,200 h-25 z", fill: "red" } 56 | ] 57 | }, 58 | SVGGroup { 59 | contents: [ 60 | SVGText { 61 | id: "revision", 62 | text: "$Revision: 1.1 $", 63 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 64 | fill: "black", 65 | transform: [1, 0, 0, 1, 10, 340] 66 | } 67 | ] 68 | }, 69 | SVGRect { 70 | id: "test-frame", 71 | x: 1, 72 | y: 1, 73 | width: 478, 74 | height: 358, 75 | stroke: { fill: "black" } 76 | } 77 | ] 78 | } 79 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/pservers-grad-01-b.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGRect { x: 20, y: 20, width: 440, height: 80 }, 9 | SVGText { 10 | text: "Linear gradient.", 11 | font: { name: "SVGFreeSansASCII,sans-serif", size: 30 }, 12 | fill: "black", 13 | transform: [1, 0, 0, 1, 20, 130] 14 | }, 15 | SVGRect { x: 20, y: 150, width: 440, height: 80 }, 16 | SVGText { 17 | text: "Referencing gradient below.", 18 | font: { name: "SVGFreeSansASCII,sans-serif", size: 30 }, 19 | fill: "black", 20 | transform: [1, 0, 0, 1, 20, 260] 21 | } 22 | ] 23 | }, 24 | SVGGroup { 25 | contents: [ 26 | SVGText { 27 | id: "revision", 28 | text: "$Revision: 1.7 $", 29 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 30 | fill: "black", 31 | transform: [1, 0, 0, 1, 10, 340] 32 | } 33 | ] 34 | }, 35 | SVGRect { 36 | id: "test-frame", 37 | x: 1, 38 | y: 1, 39 | width: 478, 40 | height: 358, 41 | stroke: { fill: "black" } 42 | } 43 | ] 44 | } 45 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/pservers-grad-02-b.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGRect { x: 20, y: 20, width: 440, height: 80 }, 9 | SVGText { 10 | text: "Radial gradient.", 11 | font: { name: "SVGFreeSansASCII,sans-serif", size: 30 }, 12 | fill: "black", 13 | transform: [1, 0, 0, 1, 20, 130] 14 | }, 15 | SVGRect { x: 20, y: 150, width: 440, height: 80 }, 16 | SVGText { 17 | text: "Referencing gradient below.", 18 | font: { name: "SVGFreeSansASCII,sans-serif", size: 30 }, 19 | fill: "black", 20 | transform: [1, 0, 0, 1, 20, 260] 21 | } 22 | ] 23 | }, 24 | SVGGroup { 25 | contents: [ 26 | SVGText { 27 | id: "revision", 28 | text: "$Revision: 1.8 $", 29 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 30 | fill: "black", 31 | transform: [1, 0, 0, 1, 10, 340] 32 | } 33 | ] 34 | }, 35 | SVGRect { 36 | id: "test-frame", 37 | x: 1, 38 | y: 1, 39 | width: 478, 40 | height: 358, 41 | stroke: { fill: "black" } 42 | } 43 | ] 44 | } 45 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/pservers-grad-04-b.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGRect { x: 20, y: 20, width: 440, height: 80 }, 9 | SVGText { 10 | text: "Multi-color linear gradient.", 11 | font: { name: "SVGFreeSansASCII,sans-serif", size: 30 }, 12 | fill: "black", 13 | transform: [1, 0, 0, 1, 20, 130] 14 | }, 15 | SVGRect { x: 20, y: 150, width: 440, height: 80 }, 16 | SVGText { 17 | text: "Multi-color radial gradient.", 18 | font: { name: "SVGFreeSansASCII,sans-serif", size: 30 }, 19 | fill: "black", 20 | transform: [1, 0, 0, 1, 20, 260] 21 | } 22 | ] 23 | }, 24 | SVGGroup { 25 | contents: [ 26 | SVGText { 27 | id: "revision", 28 | text: "$Revision: 1.8 $", 29 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 30 | fill: "black", 31 | transform: [1, 0, 0, 1, 10, 340] 32 | } 33 | ] 34 | }, 35 | SVGRect { 36 | id: "test-frame", 37 | x: 1, 38 | y: 1, 39 | width: 478, 40 | height: 358, 41 | stroke: { fill: "black" } 42 | } 43 | ] 44 | } 45 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/pservers-grad-05-b.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGText { 9 | text: "Background", 10 | font: { name: "SVGFreeSansASCII,sans-serif", size: 60 }, 11 | fill: "aqua", 12 | transform: [1, 0, 0, 1, 70, 80] 13 | }, 14 | SVGRect { x: 20, y: 20, width: 440, height: 80 }, 15 | SVGText { 16 | text: "Background", 17 | font: { name: "SVGFreeSansASCII,sans-serif", size: 60 }, 18 | fill: "aqua", 19 | transform: [1, 0, 0, 1, 70, 210] 20 | }, 21 | SVGRect { x: 20, y: 150, width: 440, height: 80 } 22 | ] 23 | }, 24 | SVGGroup { 25 | contents: [ 26 | SVGText { 27 | id: "revision", 28 | text: "$Revision: 1.9 $", 29 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 30 | fill: "black", 31 | transform: [1, 0, 0, 1, 10, 340] 32 | } 33 | ] 34 | }, 35 | SVGRect { 36 | id: "test-frame", 37 | x: 1, 38 | y: 1, 39 | width: 478, 40 | height: 358, 41 | stroke: { fill: "black" } 42 | } 43 | ] 44 | } 45 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/pservers-grad-07-b.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1, 0, 0, 1.5, 0, 0], 10 | contents: [ 11 | SVGRect { x: 10, y: 10, width: 430, height: 60 }, 12 | SVGText { 13 | text: "Linear gradient filled rectangle", 14 | font: { name: "SVGFreeSansASCII,sans-serif", size: 24 }, 15 | fill: "black", 16 | transform: [1, 0, 0, 1, 10, 90] 17 | }, 18 | SVGRect { 19 | x: 25, 20 | y: 110, 21 | width: 400, 22 | height: 30, 23 | stroke: { width: 20 } 24 | }, 25 | SVGText { 26 | text: "Linear gradient on stroke of rectangle", 27 | font: { name: "SVGFreeSansASCII,sans-serif", size: 24 }, 28 | fill: "black", 29 | transform: [1, 0, 0, 1, 10, 170] 30 | } 31 | ] 32 | } 33 | ] 34 | }, 35 | SVGGroup { 36 | contents: [ 37 | SVGText { 38 | id: "revision", 39 | text: "$Revision: 1.8 $", 40 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 41 | fill: "black", 42 | transform: [1, 0, 0, 1, 10, 340] 43 | } 44 | ] 45 | }, 46 | SVGRect { 47 | id: "test-frame", 48 | x: 1, 49 | y: 1, 50 | width: 478, 51 | height: 358, 52 | stroke: { fill: "black" } 53 | } 54 | ] 55 | } 56 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/pservers-grad-09-b.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGText { 9 | text: "Testing gradientUnits attribute", 10 | font: { name: "SVGFreeSansASCII,sans-serif", size: 15 }, 11 | fill: "black", 12 | transform: [1, 0, 0, 1, 10, 25] 13 | }, 14 | SVGRect { x: 125, y: 35, width: 200, height: 50 }, 15 | SVGRect { x: 10, y: 125, width: 430, height: 50 }, 16 | SVGRect { width: 50, height: 430, transform: [0, -1, 1, 0, 10, 260] } 17 | ] 18 | }, 19 | SVGGroup { 20 | contents: [ 21 | SVGText { 22 | id: "revision", 23 | text: "$Revision: 1.9 $", 24 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 25 | fill: "black", 26 | transform: [1, 0, 0, 1, 10, 340] 27 | } 28 | ] 29 | }, 30 | SVGRect { 31 | id: "test-frame", 32 | x: 1, 33 | y: 1, 34 | width: 478, 35 | height: 358, 36 | stroke: { fill: "black" } 37 | } 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/render-elems-01-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1, 0, 0, 1, 30, 80], 10 | contents: [ 11 | SVGGroup { 12 | contents: [ 13 | SVGPath { 14 | path: "M60,0 l60,0 l60,60 l0,60 l-60,60 l-60,0 l-60,-60 l0,-60 z", 15 | fill: "green" 16 | } 17 | ] 18 | }, 19 | SVGGroup { 20 | transform: [1, 0, 0, 1, 200, 0], 21 | contents: [ 22 | SVGPath { 23 | path: "M60,0 l60,0 l60,60 l0,60 l-60,60 l-60,0 l-60,-60 l0,-60 z", 24 | fill: "black" 25 | } 26 | ] 27 | }, 28 | SVGText { 29 | text: "Shape fill", 30 | font: { name: "SVGFreeSansASCII,sans-serif", size: 28 }, 31 | fill: "black", 32 | transform: [1, 0, 0, 1, 130, -30] 33 | } 34 | ] 35 | } 36 | ] 37 | }, 38 | SVGGroup { 39 | contents: [ 40 | SVGText { 41 | id: "revision", 42 | text: "$Revision: 1.6 $", 43 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 44 | fill: "black", 45 | transform: [1, 0, 0, 1, 10, 340] 46 | } 47 | ] 48 | }, 49 | SVGRect { 50 | id: "test-frame", 51 | x: 1, 52 | y: 1, 53 | width: 478, 54 | height: 358, 55 | stroke: { fill: "black" } 56 | } 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/render-elems-02-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1, 0, 0, 1, 30, 80], 10 | contents: [ 11 | SVGGroup { 12 | contents: [ 13 | SVGPath { 14 | path: "M60,0 l60,0 l60,60 l0,60 l-60,60 l-60,0 l-60,-60 l0,-60 z", 15 | stroke: { fill: "green", width: 3 } 16 | } 17 | ] 18 | }, 19 | SVGGroup { 20 | transform: [1, 0, 0, 1, 200, 0], 21 | contents: [ 22 | SVGPath { 23 | path: "M60,0 l60,0 l60,60 l0,60 l-60,60 l-60,0 l-60,-60 l0,-60 z", 24 | stroke: { fill: "black", width: 9 } 25 | } 26 | ] 27 | }, 28 | SVGText { 29 | text: "Shape stroke", 30 | font: { name: "SVGFreeSansASCII,sans-serif", size: 28 }, 31 | fill: "black", 32 | transform: [1, 0, 0, 1, 110, -30] 33 | } 34 | ] 35 | } 36 | ] 37 | }, 38 | SVGGroup { 39 | contents: [ 40 | SVGText { 41 | id: "revision", 42 | text: "$Revision: 1.6 $", 43 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 44 | fill: "black", 45 | transform: [1, 0, 0, 1, 10, 340] 46 | } 47 | ] 48 | }, 49 | SVGRect { 50 | id: "test-frame", 51 | x: 1, 52 | y: 1, 53 | width: 478, 54 | height: 358, 55 | stroke: { fill: "black" } 56 | } 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/render-elems-03-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1, 0, 0, 1, 30, 80], 10 | contents: [ 11 | SVGGroup { 12 | contents: [ 13 | SVGPath { 14 | path: "M60,0 l60,0 l60,60 l0,60 l-60,60 l-60,0 l-60,-60 l0,-60 z", 15 | fill: "yellow", 16 | stroke: { fill: "green", width: 8 } 17 | } 18 | ] 19 | }, 20 | SVGGroup { 21 | transform: [1, 0, 0, 1, 200, 0], 22 | contents: [ 23 | SVGPath { 24 | path: "M60,0 l60,0 l60,60 l0,60 l-60,60 l-60,0 l-60,-60 l0,-60 z", 25 | fill: "blue", 26 | stroke: { fill: "black", width: 8 } 27 | } 28 | ] 29 | }, 30 | SVGText { 31 | text: "Shape fill and stroke", 32 | font: { name: "SVGFreeSansASCII,sans-serif", size: 28 }, 33 | fill: "black", 34 | transform: [1, 0, 0, 1, 70, -30] 35 | } 36 | ] 37 | } 38 | ] 39 | }, 40 | SVGGroup { 41 | contents: [ 42 | SVGText { 43 | id: "revision", 44 | text: "$Revision: 1.7 $", 45 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 46 | fill: "black", 47 | transform: [1, 0, 0, 1, 10, 340] 48 | } 49 | ] 50 | }, 51 | SVGRect { 52 | id: "test-frame", 53 | x: 1, 54 | y: 1, 55 | width: 478, 56 | height: 358, 57 | stroke: { fill: "black" } 58 | } 59 | ] 60 | } 61 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/shapes-circle-01-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGCircle { 9 | cx: 100, 10 | cy: 100, 11 | r: 50, 12 | stroke: { fill: "black" } 13 | }, 14 | SVGCircle { 15 | cx: 220, 16 | cy: 100, 17 | r: 35, 18 | fill: "green", 19 | stroke: { fill: "black" } 20 | }, 21 | SVGCircle { 22 | cx: 340, 23 | cy: 100, 24 | r: 20, 25 | fill: "black", 26 | stroke: { fill: "lime", width: 4 } 27 | }, 28 | SVGCircle { 29 | cx: 100, 30 | cy: 260, 31 | r: 20, 32 | fill: "yellow", 33 | stroke: { fill: "lime", width: 4 } 34 | }, 35 | SVGCircle { cx: 220, cy: 260, r: 35, fill: "blue" }, 36 | SVGCircle { 37 | cx: 340, 38 | cy: 260, 39 | r: 50, 40 | stroke: { fill: "green", width: 10 } 41 | } 42 | ] 43 | }, 44 | SVGGroup { 45 | contents: [ 46 | SVGText { 47 | id: "revision", 48 | text: "$Revision: 1.7 $", 49 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 50 | fill: "black", 51 | transform: [1, 0, 0, 1, 10, 340] 52 | } 53 | ] 54 | }, 55 | SVGRect { 56 | id: "test-frame", 57 | x: 1, 58 | y: 1, 59 | width: 478, 60 | height: 358, 61 | stroke: { fill: "black" } 62 | } 63 | ] 64 | } 65 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/shapes-circle-02-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | contents: [ 10 | SVGCircle { 11 | r: 50, 12 | fill: "green", 13 | stroke: { fill: "black" } 14 | }, 15 | SVGCircle { 16 | cy: 100, 17 | r: 50, 18 | fill: "green", 19 | stroke: { fill: "black" } 20 | }, 21 | SVGCircle { 22 | cx: 100, 23 | r: 50, 24 | fill: "green", 25 | stroke: { fill: "black" } 26 | }, 27 | SVGCircle { 28 | cx: 100, 29 | cy: 100, 30 | fill: "green", 31 | stroke: { fill: "black" } 32 | }, 33 | SVGCircle { 34 | cx: 100, 35 | cy: 100, 36 | r: 50, 37 | fill: "green", 38 | stroke: { fill: "black" } 39 | } 40 | ] 41 | } 42 | ] 43 | }, 44 | SVGGroup { 45 | contents: [ 46 | SVGText { 47 | id: "revision", 48 | text: "$Revision: 1.5 $", 49 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 50 | fill: "black", 51 | transform: [1, 0, 0, 1, 10, 340] 52 | } 53 | ] 54 | }, 55 | SVGRect { 56 | id: "test-frame", 57 | x: 1, 58 | y: 1, 59 | width: 478, 60 | height: 358, 61 | stroke: { fill: "black" } 62 | } 63 | ] 64 | } 65 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/shapes-ellipse-01-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGEllipse { 9 | id: "ellipse-01", 10 | cx: 50, 11 | cy: 75, 12 | rx: 30, 13 | ry: 50, 14 | stroke: { fill: "black" } 15 | }, 16 | SVGEllipse { id: "ellipse-02", cx: 160, cy: 75, rx: 30, ry: 50, fill: "green" }, 17 | SVGEllipse { 18 | id: "ellipse-03", 19 | cx: 270, 20 | cy: 80, 21 | rx: 35, 22 | ry: 35, 23 | stroke: { fill: "black" } 24 | }, 25 | SVGEllipse { id: "ellipse-04", cx: 370, cy: 80, rx: 35, ry: 35, fill: "green" }, 26 | SVGEllipse { 27 | id: "ellipse-05", 28 | cx: 50, 29 | cy: 220, 30 | rx: 30, 31 | ry: 50, 32 | stroke: { fill: "blue", width: 8 } 33 | }, 34 | SVGEllipse { 35 | id: "ellipse-06", 36 | cx: 160, 37 | cy: 220, 38 | rx: 30, 39 | ry: 50, 40 | fill: "lime", 41 | stroke: { fill: "blue", width: 8 } 42 | }, 43 | SVGEllipse { 44 | id: "ellipse-07", 45 | cx: 330, 46 | cy: 220, 47 | rx: 70, 48 | ry: 40, 49 | fill: "lime", 50 | stroke: { fill: "blue", width: 8 } 51 | } 52 | ] 53 | }, 54 | SVGGroup { 55 | contents: [ 56 | SVGText { 57 | id: "revision", 58 | text: "$Revision: 1.6 $", 59 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 60 | fill: "black", 61 | transform: [1, 0, 0, 1, 10, 340] 62 | } 63 | ] 64 | }, 65 | SVGRect { 66 | id: "test-frame", 67 | x: 1, 68 | y: 1, 69 | width: 478, 70 | height: 358, 71 | stroke: { fill: "black" } 72 | } 73 | ] 74 | } 75 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/shapes-ellipse-02-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | contents: [ 10 | SVGEllipse { 11 | rx: 100, 12 | ry: 50, 13 | fill: "blue", 14 | stroke: { fill: "black" } 15 | }, 16 | SVGEllipse { 17 | cx: 100, 18 | cy: 150, 19 | ry: 50, 20 | fill: "blue", 21 | stroke: { fill: "black" } 22 | }, 23 | SVGEllipse { 24 | cx: 200, 25 | cy: 50, 26 | rx: 100, 27 | fill: "blue", 28 | stroke: { fill: "black" } 29 | }, 30 | SVGEllipse { 31 | cx: 250, 32 | cy: 250, 33 | rx: 100, 34 | ry: 50, 35 | fill: "blue", 36 | stroke: { fill: "black" } 37 | } 38 | ] 39 | } 40 | ] 41 | }, 42 | SVGGroup { 43 | contents: [ 44 | SVGText { 45 | id: "revision", 46 | text: "$Revision: 1.6 $", 47 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 48 | fill: "black", 49 | transform: [1, 0, 0, 1, 10, 340] 50 | } 51 | ] 52 | }, 53 | SVGRect { 54 | id: "test-frame", 55 | x: 1, 56 | y: 1, 57 | width: 478, 58 | height: 358, 59 | stroke: { fill: "black" } 60 | } 61 | ] 62 | } 63 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/shapes-ellipse-03-f.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1, 0, 0, 1, 150, 150], 10 | contents: [ 11 | SVGLine { 12 | y1: -100, 13 | y2: 100, 14 | fill: "black", 15 | stroke: { fill: "black" } 16 | }, 17 | SVGLine { 18 | x1: -100, 19 | x2: 100, 20 | fill: "black", 21 | stroke: { fill: "black" } 22 | }, 23 | SVGEllipse { 24 | rx: 80, 25 | ry: 50, 26 | stroke: { fill: "black" } 27 | } 28 | ] 29 | }, 30 | SVGGroup { 31 | transform: [0.8660254038, -0.5, 0.5, 0.8660254038, 350, 150], 32 | contents: [ 33 | SVGLine { 34 | y1: -100, 35 | y2: 100, 36 | fill: "black", 37 | stroke: { fill: "black" } 38 | }, 39 | SVGLine { 40 | x1: -100, 41 | x2: 100, 42 | fill: "black", 43 | stroke: { fill: "black" } 44 | }, 45 | SVGEllipse { 46 | rx: 80, 47 | ry: 50, 48 | stroke: { fill: "black" } 49 | } 50 | ] 51 | } 52 | ] 53 | }, 54 | SVGGroup { 55 | contents: [ 56 | SVGText { 57 | id: "revision", 58 | text: "$Revision: 1.4 $", 59 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 60 | fill: "black", 61 | transform: [1, 0, 0, 1, 10, 340] 62 | } 63 | ] 64 | }, 65 | SVGRect { 66 | id: "test-frame", 67 | x: 1, 68 | y: 1, 69 | width: 478, 70 | height: 358, 71 | stroke: { fill: "black" } 72 | } 73 | ] 74 | } 75 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/shapes-grammar-01-f.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1, 0, 0, 1, 0, 400], 10 | contents: [ 11 | SVGGroup { 12 | contents: [ 13 | SVGPolyline { 14 | points: [270, -225, 300, -245, 320, -225, 340, -245, 280, -280, 390, -280, 420, -240, 280, -185], 15 | fill: "#339966", 16 | stroke: { fill: "#007700", width: 8 } 17 | }, 18 | SVGPolygon { 19 | points: [179, -185, 218, -203, 228, -245, 202, -279, 159, -280, 131, -247, 139, -205], 20 | fill: "#55FF99", 21 | stroke: { fill: "#007700", width: 8 } 22 | } 23 | ] 24 | }, 25 | SVGGroup { 26 | contents: [ 27 | SVGPolyline { 28 | points: [270, -225, 300, -245, 320, -225, 340, -245, 280, -280, 390, -280, 420, -240, 280, -185], 29 | stroke: { fill: "#33CC66", width: 3 } 30 | }, 31 | SVGPolygon { 32 | points: [179, -185, 218, -203, 228, -245, 202, -279, 159, -280, 131, -247, 139, -205], 33 | stroke: { fill: "#33CC66", width: 3 } 34 | } 35 | ] 36 | } 37 | ] 38 | } 39 | ] 40 | }, 41 | SVGGroup { 42 | contents: [ 43 | SVGText { 44 | id: "revision", 45 | text: "$Revision: 1.1 $", 46 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 47 | fill: "black", 48 | transform: [1, 0, 0, 1, 10, 340] 49 | } 50 | ] 51 | }, 52 | SVGRect { 53 | id: "test-frame", 54 | x: 1, 55 | y: 1, 56 | width: 478, 57 | height: 358, 58 | stroke: { fill: "black" } 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/shapes-line-02-f.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGLine { 9 | x1: 100, 10 | y1: 100, 11 | x2: 300, 12 | y2: 100, 13 | fill: "red", 14 | stroke: { fill: "black", width: 10 } 15 | }, 16 | SVGLine { 17 | x1: 100, 18 | y1: 100, 19 | x2: 300, 20 | y2: 100, 21 | fill: "red", 22 | stroke: { fill: "black", width: 10 }, 23 | transform: [0.9659258263, 0.2588190451, -0.2588190451, 0.9659258263, 0, 0] 24 | } 25 | ] 26 | }, 27 | SVGGroup { 28 | contents: [ 29 | SVGText { 30 | id: "revision", 31 | text: "$Revision: 1.4 $", 32 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 33 | fill: "black", 34 | transform: [1, 0, 0, 1, 10, 340] 35 | } 36 | ] 37 | }, 38 | SVGRect { 39 | id: "test-frame", 40 | x: 1, 41 | y: 1, 42 | width: 478, 43 | height: 358, 44 | stroke: { fill: "black" } 45 | } 46 | ] 47 | } 48 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/shapes-polygon-01-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGPolygon { 9 | id: "polygon-01", 10 | points: [59, 45, 95, 63, 108, 105, 82, 139, 39, 140, 11, 107, 19, 65], 11 | stroke: { fill: "black" } 12 | }, 13 | SVGPolygon { 14 | id: "polygon-02", 15 | points: [179, 45, 218, 63, 228, 105, 202, 139, 159, 140, 131, 107, 139, 65, 179, 45], 16 | fill: "blue" 17 | }, 18 | SVGPolygon { 19 | id: "polygon-03", 20 | points: [350, 45, 375, 80, 410, 95, 375, 110, 350, 145, 325, 120, 290, 95, 325, 70, 350, 45], 21 | fill: "blue", 22 | stroke: { fill: "black", width: 6 } 23 | }, 24 | SVGPolygon { 25 | id: "polygon-05", 26 | points: [59, 185, 98, 203, 108, 245, 82, 279, 39, 280, 11, 247, 19, 205, 59, 185], 27 | stroke: { fill: "blue", width: 8 } 28 | }, 29 | SVGPolygon { 30 | id: "polygon-06", 31 | points: [179, 185, 218, 203, 228, 245, 202, 279, 159, 280, 131, 247, 139, 205], 32 | fill: "lime", 33 | stroke: { fill: "blue", width: 8 } 34 | }, 35 | SVGPolygon { 36 | id: "polygon-07", 37 | points: [270, 225, 300, 245, 320, 225, 340, 245, 280, 280, 390, 280, 420, 240, 280, 185], 38 | stroke: { fill: "lime", width: 8 } 39 | } 40 | ] 41 | }, 42 | SVGGroup { 43 | contents: [ 44 | SVGText { 45 | id: "revision", 46 | text: "$Revision: 1.5 $", 47 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 48 | fill: "black", 49 | transform: [1, 0, 0, 1, 10, 340] 50 | } 51 | ] 52 | }, 53 | SVGRect { 54 | id: "test-frame", 55 | x: 1, 56 | y: 1, 57 | width: 478, 58 | height: 358, 59 | stroke: { fill: "black" } 60 | } 61 | ] 62 | } 63 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/shapes-polygon-03-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGPolyline { points: [80, 200, 80, 300, 150, 250, 80, 200], fill: "red" }, 9 | SVGPolyline { points: [80, 200, 80, 300, 150, 250, 80, 200], fill: "lime" }, 10 | SVGPolyline { points: [180, 200, 180, 300, 250, 250, 180, 200], fill: "red" }, 11 | SVGPolyline { points: [180, 200, 180, 300, 250, 250, 180, 200], fill: "lime" }, 12 | SVGPolygon { points: [80, 60, 80, 160, 150, 110], fill: "red" }, 13 | SVGPolygon { points: [80, 60, 80, 160, 150, 110], fill: "lime" }, 14 | SVGPolygon { points: [180, 60, 180, 160, 250, 110], fill: "red" }, 15 | SVGPolygon { points: [180, 60, 180, 160, 250, 110], fill: "lime" } 16 | ] 17 | }, 18 | SVGGroup { 19 | contents: [ 20 | SVGText { 21 | id: "revision", 22 | text: "$Revision: 1.1 $", 23 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 24 | fill: "black", 25 | transform: [1, 0, 0, 1, 10, 340] 26 | } 27 | ] 28 | }, 29 | SVGRect { 30 | id: "test-frame", 31 | x: 1, 32 | y: 1, 33 | width: 478, 34 | height: 358, 35 | stroke: { fill: "black" } 36 | } 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/shapes-polyline-01-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGPolyline { 9 | id: "polyline-01", 10 | points: [10, 50, 35, 150, 60, 50, 85, 150, 110, 50, 135, 150], 11 | stroke: { fill: "black" } 12 | }, 13 | SVGPolyline { 14 | id: "polyline-02", 15 | points: [220, 50, 267, 84, 249, 140, 190, 140, 172, 84, 220, 50], 16 | stroke: { fill: "blue", width: 8 } 17 | }, 18 | SVGPolyline { 19 | id: "polyline-03", 20 | points: [310, 50, 335, 150, 360, 50, 385, 150, 410, 50, 435, 150], 21 | fill: "blue", 22 | stroke: { fill: "lime", width: 4 } 23 | }, 24 | SVGPolyline { 25 | id: "polyline-04", 26 | points: [59, 185, 98, 203, 108, 245, 82, 279, 39, 280, 11, 247, 19, 205], 27 | stroke: { fill: "green", width: 8 } 28 | }, 29 | SVGPolyline { 30 | id: "polyline-05", 31 | points: [189, 185, 228, 203, 238, 245, 212, 279, 169, 280, 141, 247, 149, 205], 32 | fill: "lime", 33 | stroke: { fill: "blue", width: 8 } 34 | }, 35 | SVGPolyline { 36 | id: "polyline-06", 37 | points: [270, 225, 300, 245, 320, 225, 340, 245, 280, 280, 390, 280, 420, 240, 280, 185], 38 | fill: "fuchsia" 39 | } 40 | ] 41 | }, 42 | SVGGroup { 43 | contents: [ 44 | SVGText { 45 | id: "revision", 46 | text: "$Revision: 1.5 $", 47 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 48 | fill: "black", 49 | transform: [1, 0, 0, 1, 10, 340] 50 | } 51 | ] 52 | }, 53 | SVGRect { 54 | id: "test-frame", 55 | x: 1, 56 | y: 1, 57 | width: 478, 58 | height: 358, 59 | stroke: { fill: "black" } 60 | } 61 | ] 62 | } 63 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/shapes-rect-02-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | contents: [ 10 | SVGRect { 11 | y: 46, 12 | width: 50, 13 | height: 80, 14 | fill: "green", 15 | stroke: { fill: "black" } 16 | }, 17 | SVGRect { 18 | x: 130, 19 | width: 50, 20 | height: 80, 21 | fill: "green", 22 | stroke: { fill: "black" } 23 | }, 24 | SVGRect { 25 | x: 250, 26 | y: 46, 27 | height: 80, 28 | fill: "green", 29 | stroke: { fill: "black" } 30 | }, 31 | SVGRect { 32 | x: 350, 33 | y: 46, 34 | width: 50, 35 | fill: "green", 36 | stroke: { fill: "black" } 37 | }, 38 | SVGRect { 39 | x: 30, 40 | y: 196, 41 | width: 50, 42 | height: 80, 43 | rx: 20, 44 | ry: 20, 45 | fill: "green", 46 | stroke: { fill: "black" } 47 | }, 48 | SVGRect { 49 | x: 130, 50 | y: 196, 51 | width: 50, 52 | height: 80, 53 | rx: 20, 54 | ry: 20, 55 | fill: "green", 56 | stroke: { fill: "black" } 57 | } 58 | ] 59 | } 60 | ] 61 | }, 62 | SVGGroup { 63 | contents: [ 64 | SVGText { 65 | id: "revision", 66 | text: "$Revision: 1.5 $", 67 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 68 | fill: "black", 69 | transform: [1, 0, 0, 1, 10, 340] 70 | } 71 | ] 72 | }, 73 | SVGRect { 74 | id: "test-frame", 75 | x: 1, 76 | y: 1, 77 | width: 478, 78 | height: 358, 79 | stroke: { fill: "black" } 80 | } 81 | ] 82 | } 83 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/shapes-rect-04-f.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGRect { x: 25, y: 25, width: 200, height: 100, rx: 50, ry: 50, fill: "red" }, 9 | SVGRect { x: 25, y: 25, width: 200, height: 100, rx: 50, ry: 50, fill: "black" }, 10 | SVGRect { x: 275, y: 25, width: 200, height: 100, rx: 50, ry: 50, fill: "red" }, 11 | SVGRect { x: 275, y: 25, width: 200, height: 100, rx: 50, ry: 50, fill: "black" }, 12 | SVGRect { x: 150, y: 135, width: 200, height: 100, fill: "black" } 13 | ] 14 | }, 15 | SVGGroup { 16 | contents: [ 17 | SVGText { 18 | id: "revision", 19 | text: "$Revision: 1.4 $", 20 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 21 | fill: "black", 22 | transform: [1, 0, 0, 1, 10, 340] 23 | } 24 | ] 25 | }, 26 | SVGRect { 27 | id: "test-frame", 28 | x: 1, 29 | y: 1, 30 | width: 478, 31 | height: 358, 32 | stroke: { fill: "black" } 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/shapes-rect-05-f.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1, 0, 0, 1, 100, 100], 10 | contents: [ 11 | SVGRect { 12 | width: 75, 13 | height: 100, 14 | stroke: { fill: "orange", width: 10 } 15 | }, 16 | SVGLine { 17 | x2: 75, 18 | fill: "black", 19 | stroke: { fill: "black", width: 10, cap: "square" } 20 | }, 21 | SVGLine { 22 | y2: 100, 23 | fill: "black", 24 | stroke: { fill: "black", width: 10, cap: "square" } 25 | } 26 | ] 27 | }, 28 | SVGGroup { 29 | transform: [0.8660254038, -0.5, 0.8152074691, 0.6840402867, 100, 100], 30 | contents: [ 31 | SVGRect { 32 | x: 100, 33 | y: 100, 34 | width: 100, 35 | height: 100, 36 | stroke: { fill: "orange", width: 5 } 37 | }, 38 | SVGLine { 39 | x1: 100, 40 | y1: 100, 41 | x2: 100, 42 | y2: 200, 43 | fill: "black", 44 | stroke: { fill: "black", width: 5, cap: "square" } 45 | }, 46 | SVGLine { 47 | x1: 100, 48 | y1: 100, 49 | x2: 200, 50 | y2: 100, 51 | fill: "black", 52 | stroke: { fill: "black", width: 5, cap: "square" } 53 | } 54 | ] 55 | } 56 | ] 57 | }, 58 | SVGGroup { 59 | contents: [ 60 | SVGText { 61 | id: "revision", 62 | text: "$Revision: 1.3 $", 63 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 64 | fill: "black", 65 | transform: [1, 0, 0, 1, 10, 340] 66 | } 67 | ] 68 | }, 69 | SVGRect { 70 | id: "test-frame", 71 | x: 1, 72 | y: 1, 73 | width: 478, 74 | height: 358, 75 | stroke: { fill: "black" } 76 | } 77 | ] 78 | } 79 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/shapes-rect-06-f.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGRect { x: 25, y: 50, width: 200, height: 100, rx: 100, ry: 50, fill: "red" }, 9 | SVGRect { x: 25, y: 50, width: 200, height: 100, rx: 150, ry: 50, fill: "black" }, 10 | SVGRect { x: 25, y: 200, width: 200, height: 100, rx: 150, ry: 50, fill: "red" }, 11 | SVGRect { x: 25, y: 200, width: 200, height: 100, rx: 100, ry: 50, fill: "black" }, 12 | SVGRect { x: 275, y: 50, width: 200, height: 100, rx: 100, ry: 50, fill: "red" }, 13 | SVGRect { x: 275, y: 50, width: 200, height: 100, rx: 100, ry: 75, fill: "black" }, 14 | SVGRect { x: 275, y: 200, width: 200, height: 100, rx: 100, ry: 75, fill: "red" }, 15 | SVGRect { x: 275, y: 200, width: 200, height: 100, rx: 100, ry: 50, fill: "black" } 16 | ] 17 | }, 18 | SVGGroup { 19 | contents: [ 20 | SVGText { 21 | id: "revision", 22 | text: "$Revision: 1.3 $", 23 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 24 | fill: "black", 25 | transform: [1, 0, 0, 1, 10, 340] 26 | } 27 | ] 28 | }, 29 | SVGRect { 30 | id: "test-frame", 31 | x: 1, 32 | y: 1, 33 | width: 478, 34 | height: 358, 35 | stroke: { fill: "black" } 36 | } 37 | ] 38 | } 39 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/struct-defs-01-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGRect { x: 140, y: 80, width: 200, height: 200, fill: "lime" } 9 | ] 10 | }, 11 | SVGGroup { 12 | contents: [ 13 | SVGText { 14 | id: "revision", 15 | text: "$Revision: 1.4 $", 16 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 17 | fill: "black", 18 | transform: [1, 0, 0, 1, 10, 340] 19 | } 20 | ] 21 | }, 22 | SVGRect { 23 | id: "test-frame", 24 | x: 1, 25 | y: 1, 26 | width: 478, 27 | height: 358, 28 | stroke: { fill: "black" } 29 | } 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/struct-frag-01-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | contents: [ 4 | SVGGroup { id: "test-body-content" } 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/struct-group-01-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | id: "rects", 10 | contents: [ 11 | SVGRect { width: 240, height: 180, fill: "blue" }, 12 | SVGRect { x: 60, y: 45, width: 120, height: 90, fill: "green" }, 13 | SVGRect { x: 240, y: 180, width: 240, height: 180, fill: "blue" } 14 | ] 15 | }, 16 | SVGGroup { 17 | id: "singleG", 18 | contents: [ 19 | SVGRect { x: 240, width: 240, height: 180, fill: "black" } 20 | ] 21 | }, 22 | SVGGroup { 23 | id: "gratuitiousG", 24 | contents: [ 25 | SVGGroup { 26 | id: "yellowNrotate", 27 | transform: [0.9396926208, -0.3420201433, 0.3420201433, 0.9396926208, 0, 0], 28 | contents: [ 29 | SVGRect { y: 224, width: 40, height: 40, fill: "yellow" }, 30 | SVGRect { y: 280, width: 40, height: 40, fill: "yellow" } 31 | ] 32 | } 33 | ] 34 | } 35 | ] 36 | }, 37 | SVGGroup { 38 | contents: [ 39 | SVGText { 40 | id: "revision", 41 | text: "$Revision: 1.4 $", 42 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 43 | fill: "black", 44 | transform: [1, 0, 0, 1, 10, 340] 45 | } 46 | ] 47 | }, 48 | SVGRect { 49 | id: "test-frame", 50 | x: 1, 51 | y: 1, 52 | width: 478, 53 | height: 358, 54 | stroke: { fill: "black" } 55 | } 56 | ] 57 | } 58 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/struct-image-01-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGURLImage { 9 | id: "image1JPEG", 10 | src: "../images/struct-image-01.jpg", 11 | x: 240, 12 | width: 240, 13 | height: 150 14 | }, 15 | SVGURLImage { 16 | id: "image1PNG", 17 | src: "../images/struct-image-01.png", 18 | x: 240, 19 | y: 150, 20 | width: 240, 21 | height: 150 22 | } 23 | ] 24 | }, 25 | SVGGroup { 26 | contents: [ 27 | SVGText { 28 | id: "revision", 29 | text: "$Revision: 1.7 $", 30 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 31 | fill: "black", 32 | transform: [1, 0, 0, 1, 10, 340] 33 | } 34 | ] 35 | }, 36 | SVGRect { 37 | id: "test-frame", 38 | x: 1, 39 | y: 1, 40 | width: 478, 41 | height: 358, 42 | stroke: { fill: "black" } 43 | } 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/struct-use-03-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGText { 9 | text: "Reference", 10 | font: { name: "SVGFreeSansASCII,sans-serif", size: 18 }, 11 | textAnchor: "middle", 12 | fill: "black", 13 | transform: [1, 0, 0, 1, 120, 60] 14 | }, 15 | SVGText { 16 | text: "", 17 | font: { name: "SVGFreeSansASCII,sans-serif", size: 18 }, 18 | textAnchor: "middle", 19 | fill: "black", 20 | transform: [1, 0, 0, 1, 360, 60] 21 | }, 22 | SVGGroup { 23 | id: "reference", 24 | transform: [0.7071067812, 0.7071067812, -0.7071067812, 0.7071067812, 120, 99.2893218813], 25 | contents: [ 26 | SVGRect { 27 | width: 100, 28 | height: 100, 29 | fill: "aqua", 30 | stroke: { fill: "blue", width: 20 } 31 | } 32 | ] 33 | }, 34 | SVGGroup { 35 | transform: [1, 0, 0, 1, 240, 0], 36 | contents: [ 37 | SVGRect { 38 | width: 100, 39 | height: 100, 40 | fill: "aqua", 41 | stroke: { fill: "blue", width: 20 }, 42 | transform: [0.7071067812, 0.7071067812, -0.7071067812, 0.7071067812, 120, 99.2893218813] 43 | } 44 | ] 45 | } 46 | ] 47 | }, 48 | SVGGroup { 49 | contents: [ 50 | SVGText { 51 | id: "revision", 52 | text: "$Revision: 1.4 $", 53 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 54 | fill: "black", 55 | transform: [1, 0, 0, 1, 10, 340] 56 | } 57 | ] 58 | }, 59 | SVGRect { 60 | id: "test-frame", 61 | x: 1, 62 | y: 1, 63 | width: 478, 64 | height: 358, 65 | stroke: { fill: "black" } 66 | } 67 | ] 68 | } 69 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/styling-class-01-f.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | contents: [ 10 | SVGRect { x: 10, y: 10, width: 200, height: 100, fill: "blue" }, 11 | SVGRect { 12 | x: 215, 13 | y: 125, 14 | width: 200, 15 | height: 100, 16 | fill: "blue", 17 | stroke: { fill: "orange", width: 10 } 18 | } 19 | ] 20 | } 21 | ] 22 | }, 23 | SVGGroup { 24 | contents: [ 25 | SVGText { 26 | id: "revision", 27 | text: "$Revision: 1.2 $", 28 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 29 | fill: "black", 30 | transform: [1, 0, 0, 1, 10, 340] 31 | } 32 | ] 33 | }, 34 | SVGRect { 35 | id: "test-frame", 36 | x: 1, 37 | y: 1, 38 | width: 478, 39 | height: 358, 40 | stroke: { fill: "black" } 41 | } 42 | ] 43 | } 44 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/styling-css-01-b.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGText { 9 | text: "element selectors:", 10 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 11 | fill: "black", 12 | transform: [1, 0, 0, 1, 40, 36] 13 | }, 14 | SVGCircle { cx: 160, cy: 100, r: 30, fill: "green" }, 15 | SVGGroup { 16 | contents: [ 17 | SVGRect { x: 220, y: 80, width: 60, height: 40, fill: "green" } 18 | ] 19 | }, 20 | SVGPolygon { 21 | points: [300, 100, 320, 120, 340, 110, 360, 120, 390, 90, 340, 70], 22 | fill: "green" 23 | }, 24 | SVGGroup { 25 | transform: [1, 0, 0, 1, 0, 150], 26 | contents: [ 27 | SVGText { 28 | text: "class selectors:", 29 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 30 | fill: "black", 31 | transform: [1, 0, 0, 1, 40, 36] 32 | }, 33 | SVGGroup { 34 | contents: [ 35 | SVGCircle { cx: 160, cy: 100, r: 30, fill: "green" }, 36 | SVGRect { x: 220, y: 80, width: 60, height: 40, fill: "green" }, 37 | SVGPolygon { 38 | points: [300, 100, 320, 120, 340, 110, 360, 120, 390, 90, 340, 70], 39 | fill: "green" 40 | } 41 | ] 42 | } 43 | ] 44 | } 45 | ] 46 | }, 47 | SVGGroup { 48 | contents: [ 49 | SVGText { 50 | id: "revision", 51 | text: "$Revision: 1.6 $", 52 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 53 | fill: "black", 54 | transform: [1, 0, 0, 1, 10, 340] 55 | } 56 | ] 57 | }, 58 | SVGRect { 59 | id: "test-frame", 60 | x: 1, 61 | y: 1, 62 | width: 478, 63 | height: 358, 64 | stroke: { fill: "black" } 65 | } 66 | ] 67 | } 68 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/styling-pres-01-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGCircle { cx: 240, cy: 150, r: 80, fill: "blue" }, 9 | SVGRect { x: 140, y: 70, width: 200, height: 160, fill: "black" }, 10 | SVGRect { 11 | x: 140, 12 | y: 70, 13 | width: 200, 14 | height: 160, 15 | stroke: { fill: "lime", width: 4 } 16 | } 17 | ] 18 | }, 19 | SVGGroup { 20 | contents: [ 21 | SVGText { 22 | id: "revision", 23 | text: "$Revision: 1.5 $", 24 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 25 | fill: "black", 26 | transform: [1, 0, 0, 1, 10, 340] 27 | } 28 | ] 29 | }, 30 | SVGRect { 31 | id: "test-frame", 32 | x: 1, 33 | y: 1, 34 | width: 478, 35 | height: 358, 36 | stroke: { fill: "black" } 37 | } 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/refs/types-basic-01-f.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGPolyline { 9 | points: [20, 75, 380, 75], 10 | fill: "black", 11 | stroke: { fill: "#999999" } 12 | }, 13 | SVGPolyline { 14 | points: [20, 125, 380, 125], 15 | fill: "black", 16 | stroke: { fill: "#999999" } 17 | }, 18 | SVGRect { x: 50, y: 75, width: 300, height: 50, fill: "red" }, 19 | SVGPolyline { 20 | points: [50, 100, 150, 100], 21 | fill: "black", 22 | stroke: { fill: "#66FF33", width: 50 } 23 | }, 24 | SVGPolyline { 25 | points: [150, 100, 250, 100], 26 | fill: "black", 27 | stroke: { fill: "#66CC66", width: 50 } 28 | }, 29 | SVGPolyline { 30 | points: [250, 100, 350, 100], 31 | fill: "black", 32 | stroke: { fill: "#3399FF", width: 50 } 33 | }, 34 | SVGText { 35 | text: "Different forms of the type", 36 | font: { name: "SVGFreeSansASCII,sans-serif", size: 20 }, 37 | fill: "black", 38 | transform: [1, 0, 0, 1, 50, 200] 39 | }, 40 | SVGGroup { 41 | contents: [ 42 | SVGText { 43 | text: "50", 44 | font: { name: "SVGFreeSansASCII,sans-serif", size: 20 }, 45 | textAnchor: "middle", 46 | fill: "#555555", 47 | transform: [1, 0, 0, 1, 100, 110] 48 | }, 49 | SVGText { 50 | text: "5e1", 51 | font: { name: "SVGFreeSansASCII,sans-serif", size: 20 }, 52 | textAnchor: "middle", 53 | fill: "#555555", 54 | transform: [1, 0, 0, 1, 200, 110] 55 | }, 56 | SVGText { 57 | text: ".5e2", 58 | font: { name: "SVGFreeSansASCII,sans-serif", size: 20 }, 59 | textAnchor: "middle", 60 | fill: "#555555", 61 | transform: [1, 0, 0, 1, 300, 110] 62 | } 63 | ] 64 | } 65 | ] 66 | }, 67 | SVGGroup { 68 | contents: [ 69 | SVGText { 70 | id: "revision", 71 | text: "$Revision: 1.3 $", 72 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 73 | fill: "black", 74 | transform: [1, 0, 0, 1, 10, 340] 75 | } 76 | ] 77 | }, 78 | SVGRect { 79 | id: "test-frame", 80 | x: 1, 81 | y: 1, 82 | width: 478, 83 | height: 358, 84 | stroke: { fill: "black" } 85 | } 86 | ] 87 | } 88 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/svg/conform-viewers-01-t.svgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exyte/SVGView/86f6d742cccf5b64844b303d80ed1f75d02fbcce/SVGViewTests/w3c/1.1F2/svg/conform-viewers-01-t.svgz -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.1F2/svg/struct-frag-01-t.svg: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 |

18 | This is an empty SVG document. 19 |

20 | 21 | 22 |

23 | Run the test. No interaction required. 24 |

25 |
26 | 27 |

28 | Nothing should be rendered by the User Agent. 29 |

30 |
31 | 32 | $RCSfile: struct-frag-01-t.svg,v $ 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 49 | 50 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/refs/coords-trans-02-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1, 0, 0, 1, 0, 30], 10 | contents: [ 11 | SVGGroup { 12 | id: "elementary-transforms-test", 13 | transform: [1, 0, 0, 1, 0, 10], 14 | contents: [ 15 | SVGGroup { 16 | id: "elementary-transforms", 17 | transform: [2.5, 0, 0, 2.5, -30, 0], 18 | contents: [ 19 | SVGGroup { 20 | transform: [1, 0, 0, 1, 50, 50], 21 | contents: [ 22 | SVGRect { width: 20, height: 2, fill: "blue" }, 23 | SVGRect { width: 2, height: 20, fill: "red" } 24 | ] 25 | }, 26 | SVGGroup { 27 | transform: [0, -1, 1, 0, 150, 70], 28 | contents: [ 29 | SVGRect { width: 20, height: 2, fill: "blue" }, 30 | SVGRect { width: 2, height: 20, fill: "red" } 31 | ] 32 | } 33 | ] 34 | }, 35 | SVGGroup { 36 | id: "elementary-transforms-test-markers", 37 | transform: [2.5, 0, 0, 2.5, -30, 0], 38 | contents: [ 39 | SVGText { 40 | text: "translate (50, 50)", 41 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 42 | fill: "black", 43 | transform: [1, 0, 0, 1, 40, 40] 44 | }, 45 | SVGRect { x: 48, y: 48, width: 5, height: 5, fill: "black" }, 46 | SVGRect { x: 68, y: 48, width: 5, height: 5, fill: "blue" }, 47 | SVGRect { x: 48, y: 68, width: 5, height: 5, fill: "red" }, 48 | SVGText { 49 | text: "rotate(-90)", 50 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 51 | fill: "black", 52 | transform: [1, 0, 0, 1, 140, 40] 53 | }, 54 | SVGRect { x: 148, y: 68, width: 5, height: 5, fill: "black" }, 55 | SVGRect { x: 148, y: 48, width: 5, height: 5, fill: "blue" }, 56 | SVGRect { x: 168, y: 68, width: 5, height: 5, fill: "red" } 57 | ] 58 | } 59 | ] 60 | } 61 | ] 62 | } 63 | ] 64 | }, 65 | SVGGroup { 66 | contents: [ 67 | SVGText { 68 | id: "revision", 69 | text: "$Revision: 1.10 $", 70 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 71 | fill: "black", 72 | transform: [1, 0, 0, 1, 10, 340] 73 | } 74 | ] 75 | }, 76 | SVGRect { 77 | id: "test-frame", 78 | x: 1, 79 | y: 1, 80 | width: 478, 81 | height: 358, 82 | stroke: { fill: "black" } 83 | } 84 | ] 85 | } 86 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/refs/coords-trans-03-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1, 0, 0, 1, 0, 30], 10 | contents: [ 11 | SVGGroup { 12 | id: "elementary-transforms-test", 13 | transform: [1, 0, 0, 1, 0, 10], 14 | contents: [ 15 | SVGGroup { 16 | id: "elementary-transforms", 17 | transform: [2.5, 0, 0, 2.5, -560, 0], 18 | contents: [ 19 | SVGGroup { 20 | transform: [1, 0, 1, 1, 250, 50], 21 | contents: [ 22 | SVGRect { width: 20, height: 2, fill: "blue" }, 23 | SVGRect { width: 2, height: 20, fill: "red" } 24 | ] 25 | }, 26 | SVGGroup { 27 | transform: [1, 1, 0, 1, 350, 50], 28 | contents: [ 29 | SVGRect { width: 20, height: 2, fill: "blue" }, 30 | SVGRect { width: 2, height: 20, fill: "red" } 31 | ] 32 | } 33 | ] 34 | }, 35 | SVGGroup { 36 | id: "elementary-transforms-test-markers", 37 | transform: [2.5, 0, 0, 2.5, -560, 0], 38 | contents: [ 39 | SVGText { 40 | text: "skew x (45)", 41 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 42 | fill: "black", 43 | transform: [1, 0, 0, 1, 240, 40] 44 | }, 45 | SVGRect { x: 248, y: 48, width: 5, height: 5, fill: "black" }, 46 | SVGRect { x: 268, y: 48, width: 5, height: 5, fill: "blue" }, 47 | SVGRect { x: 268, y: 68, width: 5, height: 5, fill: "red" }, 48 | SVGText { 49 | text: "skew y (45)", 50 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 51 | fill: "black", 52 | transform: [1, 0, 0, 1, 340, 40] 53 | }, 54 | SVGRect { x: 348, y: 48, width: 5, height: 5, fill: "black" }, 55 | SVGRect { x: 368, y: 68, width: 5, height: 5, fill: "blue" }, 56 | SVGRect { x: 348, y: 68, width: 5, height: 5, fill: "red" } 57 | ] 58 | } 59 | ] 60 | } 61 | ] 62 | } 63 | ] 64 | }, 65 | SVGGroup { 66 | contents: [ 67 | SVGText { 68 | id: "revision", 69 | text: "$Revision: 1.9 $", 70 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 71 | fill: "black", 72 | transform: [1, 0, 0, 1, 10, 340] 73 | } 74 | ] 75 | }, 76 | SVGRect { 77 | id: "test-frame", 78 | x: 1, 79 | y: 1, 80 | width: 478, 81 | height: 358, 82 | stroke: { fill: "black" } 83 | } 84 | ] 85 | } 86 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/refs/coords-trans-04-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1, 0, 0, 1, 0, 30], 10 | contents: [ 11 | SVGGroup { 12 | id: "elementary-transforms-test", 13 | contents: [ 14 | SVGGroup { 15 | id: "elementary-transforms", 16 | transform: [2.5, 0, 0, 2.5, 60, 45], 17 | contents: [ 18 | SVGGroup { 19 | transform: [2, 0, 0, 2, 40, 10], 20 | contents: [ 21 | SVGRect { width: 20, height: 1, fill: "blue" }, 22 | SVGRect { width: 1, height: 20, fill: "red" } 23 | ] 24 | } 25 | ] 26 | }, 27 | SVGGroup { 28 | id: "elementary-transforms-test-markers", 29 | transform: [2.5, 0, 0, 2.5, -364, -230], 30 | contents: [ 31 | SVGText { 32 | text: "scale (2)", 33 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 34 | fill: "black", 35 | transform: [1, 0, 0, 1, 200, 110] 36 | }, 37 | SVGRect { x: 208, y: 118, width: 5, height: 5, fill: "black" }, 38 | SVGRect { x: 248, y: 118, width: 5, height: 5, fill: "blue" }, 39 | SVGRect { x: 208, y: 158, width: 5, height: 5, fill: "red" } 40 | ] 41 | } 42 | ] 43 | } 44 | ] 45 | } 46 | ] 47 | }, 48 | SVGGroup { 49 | contents: [ 50 | SVGText { 51 | id: "revision", 52 | text: "$Revision: 1.9 $", 53 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 54 | fill: "black", 55 | transform: [1, 0, 0, 1, 10, 340] 56 | } 57 | ] 58 | }, 59 | SVGRect { 60 | id: "test-frame", 61 | x: 1, 62 | y: 1, 63 | width: 478, 64 | height: 358, 65 | stroke: { fill: "black" } 66 | } 67 | ] 68 | } 69 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/refs/coords-trans-05-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1, 0, 0, 1, 0, 30], 10 | contents: [ 11 | SVGGroup { 12 | id: "nested-transforms-test", 13 | contents: [ 14 | SVGGroup { 15 | id: "nested-transforms", 16 | transform: [1, 0, 0, 1, -90, -450], 17 | contents: [ 18 | SVGGroup { 19 | transform: [7.5, 0, 0, 5, 125.0000025, 525], 20 | contents: [ 21 | SVGRect { width: 20, height: 1, fill: "blue" }, 22 | SVGRect { width: 0.67, height: 20, fill: "red" } 23 | ] 24 | } 25 | ] 26 | }, 27 | SVGGroup { 28 | id: "nested-transforms-test-markers", 29 | transform: [2.5, 0, 0, 2.5, -90, -450], 30 | contents: [ 31 | SVGText { 32 | text: "scale(25, 95) - translate(2, 2)", 33 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 34 | fill: "black", 35 | transform: [1, 0, 0, 1, 40, 200] 36 | }, 37 | SVGRect { x: 48, y: 208, width: 5, height: 5, fill: "black" }, 38 | SVGRect { x: 108, y: 208, width: 5, height: 5, fill: "blue" }, 39 | SVGRect { x: 48, y: 248, width: 5, height: 5, fill: "red" } 40 | ] 41 | } 42 | ] 43 | } 44 | ] 45 | } 46 | ] 47 | }, 48 | SVGGroup { 49 | contents: [ 50 | SVGText { 51 | id: "revision", 52 | text: "$Revision: 1.9 $", 53 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 54 | fill: "black", 55 | transform: [1, 0, 0, 1, 10, 340] 56 | } 57 | ] 58 | }, 59 | SVGRect { 60 | id: "test-frame", 61 | x: 1, 62 | y: 1, 63 | width: 478, 64 | height: 358, 65 | stroke: { fill: "black" } 66 | } 67 | ] 68 | } 69 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/refs/coords-trans-06-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1, 0, 0, 1, 0, 30], 10 | contents: [ 11 | SVGGroup { 12 | id: "nested-transforms-test", 13 | contents: [ 14 | SVGGroup { 15 | id: "nested-transforms", 16 | contents: [ 17 | SVGGroup { 18 | transform: [1, 0, 0, 1, -102, -450], 19 | contents: [ 20 | SVGGroup { 21 | transform: [7.5, 0, 0, 5, 0, 0], 22 | contents: [ 23 | SVGGroup { 24 | transform: [1, 0, 0, 1, 16.666667, 105], 25 | contents: [ 26 | SVGRect { width: 20, height: 1, fill: "blue" }, 27 | SVGRect { width: 0.67, height: 20, fill: "red" } 28 | ] 29 | } 30 | ] 31 | } 32 | ] 33 | } 34 | ] 35 | }, 36 | SVGGroup { 37 | id: "nested-transforms-test-markers", 38 | transform: [2.5, 0, 0, 2.5, -600, -450], 39 | contents: [ 40 | SVGText { 41 | text: "scale(25, 95) then translate(2, 2)", 42 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 43 | fill: "black", 44 | transform: [1, 0, 0, 1, 248, 200] 45 | }, 46 | SVGRect { x: 248, y: 208, width: 5, height: 5, fill: "black" }, 47 | SVGRect { x: 308, y: 208, width: 5, height: 5, fill: "blue" }, 48 | SVGRect { x: 248, y: 248, width: 5, height: 5, fill: "red" } 49 | ] 50 | } 51 | ] 52 | } 53 | ] 54 | } 55 | ] 56 | }, 57 | SVGGroup { 58 | contents: [ 59 | SVGText { 60 | id: "revision", 61 | text: "$Revision: 1.10 $", 62 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 63 | fill: "black", 64 | transform: [1, 0, 0, 1, 10, 340] 65 | } 66 | ] 67 | }, 68 | SVGRect { 69 | id: "test-frame", 70 | x: 1, 71 | y: 1, 72 | width: 478, 73 | height: 358, 74 | stroke: { fill: "black" } 75 | } 76 | ] 77 | } 78 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/refs/coords-trans-07-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | id: "object_1", 10 | transform: [0.8660254038, 0.5, -0.5, 0.8660254038, 123.2050807569, 186.6025403784], 11 | contents: [ 12 | SVGRect { width: 150, height: 5, fill: "green" }, 13 | SVGRect { width: 5, height: 50, fill: "red" } 14 | ] 15 | }, 16 | SVGText { 17 | text: "rotate+translate", 18 | font: { name: "SVGFreeSansASCII,sans-serif", size: 20 }, 19 | fill: "black", 20 | transform: [1, 0, 0, 1, 65, 185] 21 | }, 22 | SVGGroup { 23 | id: "object_2", 24 | transform: [0.8660254038, 0.5, -0.5, 0.8660254038, 200, 100], 25 | contents: [ 26 | SVGRect { width: 150, height: 5, fill: "blue" }, 27 | SVGRect { width: 5, height: 50, fill: "red" } 28 | ] 29 | }, 30 | SVGText { 31 | text: "translate+rotate", 32 | font: { name: "SVGFreeSansASCII,sans-serif", size: 20 }, 33 | fill: "black", 34 | transform: [1, 0, 0, 1, 150, 100] 35 | } 36 | ] 37 | }, 38 | SVGGroup { 39 | contents: [ 40 | SVGText { 41 | id: "revision", 42 | text: "$Revision: 1.4 $", 43 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 44 | fill: "black", 45 | transform: [1, 0, 0, 1, 10, 340] 46 | } 47 | ] 48 | }, 49 | SVGRect { 50 | id: "test-frame", 51 | x: 1, 52 | y: 1, 53 | width: 478, 54 | height: 358, 55 | stroke: { fill: "black" } 56 | } 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/refs/coords-trans-08-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | id: "object_1", 10 | transform: [2, 1, 1, 1, 0, 0], 11 | contents: [ 12 | SVGRect { width: 150, height: 5, fill: "blue" }, 13 | SVGRect { width: 5, height: 50, fill: "red" }, 14 | SVGRect { x: 150, width: 5, height: 50, fill: "black" }, 15 | SVGRect { y: 50, width: 150, height: 5, fill: "black" }, 16 | SVGEllipse { cx: 75, cy: 25, rx: 40, ry: 15, fill: "purple" } 17 | ] 18 | }, 19 | SVGText { 20 | text: "skewX(45)+skewY(45)", 21 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 22 | fill: "black", 23 | transform: [1, 0, 0, 1, 30, 16] 24 | }, 25 | SVGGroup { 26 | id: "object_2", 27 | transform: [1, 1, 1, 2, 200, 0], 28 | contents: [ 29 | SVGRect { width: 150, height: 5, fill: "blue" }, 30 | SVGRect { width: 5, height: 50, fill: "red" }, 31 | SVGRect { x: 150, width: 5, height: 50, fill: "black" }, 32 | SVGRect { y: 50, width: 150, height: 5, fill: "black" }, 33 | SVGEllipse { cx: 75, cy: 25, rx: 40, ry: 15, fill: "purple" } 34 | ] 35 | }, 36 | SVGText { 37 | text: "skewY(45)+skewX(45)", 38 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 39 | fill: "black", 40 | transform: [1, 0, 0, 1, 230, 16] 41 | } 42 | ] 43 | }, 44 | SVGGroup { 45 | contents: [ 46 | SVGText { 47 | id: "revision", 48 | text: "$Revision: 1.4 $", 49 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 50 | fill: "black", 51 | transform: [1, 0, 0, 1, 10, 340] 52 | } 53 | ] 54 | }, 55 | SVGRect { 56 | id: "test-frame", 57 | x: 1, 58 | y: 1, 59 | width: 478, 60 | height: 358, 61 | stroke: { fill: "black" } 62 | } 63 | ] 64 | } 65 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/refs/paint-fill-04-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | id: "G1", 10 | transform: [1, 0, 0, 1, 120, 30], 11 | contents: [ 12 | SVGRect { 13 | width: 90, 14 | height: 70, 15 | fill: "blue", 16 | stroke: { fill: "red", width: 5 } 17 | }, 18 | SVGRect { 19 | x: 100, 20 | width: 90, 21 | height: 70, 22 | fill: "blue", 23 | stroke: { fill: "red", width: 5 } 24 | }, 25 | SVGRect { 26 | y: 80, 27 | width: 90, 28 | height: 70, 29 | fill: "yellow", 30 | stroke: { fill: "red", width: 2 } 31 | }, 32 | SVGRect { 33 | x: 100, 34 | y: 80, 35 | width: 90, 36 | height: 70, 37 | fill: "blue", 38 | stroke: { fill: "yellow", width: 5 } 39 | }, 40 | SVGGroup { 41 | id: "G2", 42 | contents: [ 43 | SVGRect { 44 | y: 160, 45 | width: 90, 46 | height: 70, 47 | fill: "yellow", 48 | stroke: { fill: "red", width: 5 } 49 | }, 50 | SVGRect { 51 | x: 100, 52 | y: 160, 53 | width: 90, 54 | height: 70, 55 | fill: "yellow", 56 | stroke: { fill: "red", width: 5 } 57 | } 58 | ] 59 | } 60 | ] 61 | } 62 | ] 63 | }, 64 | SVGGroup { 65 | contents: [ 66 | SVGText { 67 | id: "revision", 68 | text: "$Revision: 1.6 $", 69 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 70 | fill: "black", 71 | transform: [1, 0, 0, 1, 10, 340] 72 | } 73 | ] 74 | }, 75 | SVGRect { 76 | id: "test-frame", 77 | x: 1, 78 | y: 1, 79 | width: 478, 80 | height: 358, 81 | stroke: { fill: "black" } 82 | } 83 | ] 84 | } 85 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/refs/paint-fill-06-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | id: "G1", 10 | transform: [1, 0, 0, 1, 120, 30], 11 | contents: [ 12 | SVGRect { 13 | width: 90, 14 | height: 70, 15 | fill: "blue", 16 | stroke: { fill: "red", width: 5 } 17 | }, 18 | SVGRect { 19 | x: 100, 20 | width: 90, 21 | height: 70, 22 | fill: "blue", 23 | stroke: { fill: "red", width: 5 } 24 | }, 25 | SVGRect { 26 | y: 80, 27 | width: 90, 28 | height: 70, 29 | fill: "60% yellow", 30 | stroke: { fill: "60% red", width: 2 } 31 | }, 32 | SVGRect { 33 | x: 100, 34 | y: 80, 35 | width: 90, 36 | height: 70, 37 | fill: "20% blue", 38 | stroke: { fill: "90% yellow", width: 5 } 39 | }, 40 | SVGGroup { 41 | id: "G2", 42 | contents: [ 43 | SVGRect { 44 | y: 160, 45 | width: 90, 46 | height: 70, 47 | fill: "yellow", 48 | stroke: { fill: "red", width: 5 } 49 | }, 50 | SVGRect { 51 | x: 100, 52 | y: 160, 53 | width: 90, 54 | height: 70, 55 | fill: "yellow", 56 | stroke: { fill: "red", width: 5 } 57 | } 58 | ] 59 | } 60 | ] 61 | } 62 | ] 63 | }, 64 | SVGGroup { 65 | contents: [ 66 | SVGText { 67 | id: "revision", 68 | text: "$Revision: 1.6 $", 69 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 70 | fill: "black", 71 | transform: [1, 0, 0, 1, 10, 340] 72 | } 73 | ] 74 | }, 75 | SVGRect { 76 | id: "test-frame", 77 | x: 1, 78 | y: 1, 79 | width: 478, 80 | height: 358, 81 | stroke: { fill: "black" } 82 | } 83 | ] 84 | } 85 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/refs/paint-stroke-01-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGText { 9 | text: "Basic paint: stroke properties.", 10 | font: { name: "SVGFreeSansASCII,sans-serif", size: 36 }, 11 | fill: "black", 12 | transform: [1, 0, 0, 1, 10, 40] 13 | }, 14 | SVGRect { id: "stroke-01", x: 90, y: 70, width: 300, height: 50, fill: "blue" }, 15 | SVGRect { 16 | id: "stroke-02", 17 | x: 90, 18 | y: 190, 19 | width: 300, 20 | height: 50, 21 | fill: "blue", 22 | stroke: { fill: "red", width: 20 } 23 | }, 24 | SVGText { 25 | text: "stroke=\"none\"", 26 | font: { name: "SVGFreeSansASCII,sans-serif", size: 40 }, 27 | fill: "black", 28 | transform: [1, 0, 0, 1, 140, 150] 29 | }, 30 | SVGText { 31 | text: "stroke=\"red\"", 32 | font: { name: "SVGFreeSansASCII,sans-serif", size: 40 }, 33 | fill: "black", 34 | transform: [1, 0, 0, 1, 148, 280] 35 | } 36 | ] 37 | }, 38 | SVGGroup { 39 | contents: [ 40 | SVGText { 41 | id: "revision", 42 | text: "$Revision: 1.6 $", 43 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 44 | fill: "black", 45 | transform: [1, 0, 0, 1, 10, 340] 46 | } 47 | ] 48 | }, 49 | SVGRect { 50 | id: "test-frame", 51 | x: 1, 52 | y: 1, 53 | width: 478, 54 | height: 358, 55 | stroke: { fill: "black" } 56 | } 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/refs/render-elems-01-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1, 0, 0, 1, 30, 80], 10 | contents: [ 11 | SVGGroup { 12 | contents: [ 13 | SVGPath { 14 | path: "M60,0 l60,0 l60,60 l0,60 l-60,60 l-60,0 l-60,-60 l0,-60 z", 15 | fill: "red" 16 | } 17 | ] 18 | }, 19 | SVGGroup { 20 | transform: [1, 0, 0, 1, 200, 0], 21 | contents: [ 22 | SVGPath { 23 | path: "M60,0 l60,0 l60,60 l0,60 l-60,60 l-60,0 l-60,-60 l0,-60 z", 24 | fill: "black" 25 | } 26 | ] 27 | }, 28 | SVGText { 29 | text: "Shape fill", 30 | font: { name: "SVGFreeSansASCII,sans-serif", size: 28 }, 31 | fill: "black", 32 | transform: [1, 0, 0, 1, 130, -30] 33 | } 34 | ] 35 | } 36 | ] 37 | }, 38 | SVGGroup { 39 | contents: [ 40 | SVGText { 41 | id: "revision", 42 | text: "$Revision: 1.8 $", 43 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 44 | fill: "black", 45 | transform: [1, 0, 0, 1, 10, 340] 46 | } 47 | ] 48 | }, 49 | SVGRect { 50 | id: "test-frame", 51 | x: 1, 52 | y: 1, 53 | width: 478, 54 | height: 358, 55 | stroke: { fill: "black" } 56 | } 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/refs/render-elems-02-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1, 0, 0, 1, 30, 80], 10 | contents: [ 11 | SVGGroup { 12 | contents: [ 13 | SVGPath { 14 | path: "M60,0 l60,0 l60,60 l0,60 l-60,60 l-60,0 l-60,-60 l0,-60 z", 15 | stroke: { fill: "red", width: 3 } 16 | } 17 | ] 18 | }, 19 | SVGGroup { 20 | transform: [1, 0, 0, 1, 200, 0], 21 | contents: [ 22 | SVGPath { 23 | path: "M60,0 l60,0 l60,60 l0,60 l-60,60 l-60,0 l-60,-60 l0,-60 z", 24 | stroke: { fill: "black", width: 9 } 25 | } 26 | ] 27 | }, 28 | SVGText { 29 | text: "Shape stroke", 30 | font: { name: "SVGFreeSansASCII,sans-serif", size: 28 }, 31 | fill: "black", 32 | transform: [1, 0, 0, 1, 110, -30] 33 | } 34 | ] 35 | } 36 | ] 37 | }, 38 | SVGGroup { 39 | contents: [ 40 | SVGText { 41 | id: "revision", 42 | text: "$Revision: 1.8 $", 43 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 44 | fill: "black", 45 | transform: [1, 0, 0, 1, 10, 340] 46 | } 47 | ] 48 | }, 49 | SVGRect { 50 | id: "test-frame", 51 | x: 1, 52 | y: 1, 53 | width: 478, 54 | height: 358, 55 | stroke: { fill: "black" } 56 | } 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/refs/render-elems-03-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGGroup { 9 | transform: [1, 0, 0, 1, 30, 80], 10 | contents: [ 11 | SVGGroup { 12 | contents: [ 13 | SVGPath { 14 | path: "M60,0 l60,0 l60,60 l0,60 l-60,60 l-60,0 l-60,-60 l0,-60 z", 15 | fill: "yellow", 16 | stroke: { fill: "red", width: 8 } 17 | } 18 | ] 19 | }, 20 | SVGGroup { 21 | transform: [1, 0, 0, 1, 200, 0], 22 | contents: [ 23 | SVGPath { 24 | path: "M60,0 l60,0 l60,60 l0,60 l-60,60 l-60,0 l-60,-60 l0,-60 z", 25 | fill: "blue", 26 | stroke: { fill: "black", width: 8 } 27 | } 28 | ] 29 | }, 30 | SVGText { 31 | text: "Shape fill and stroke", 32 | font: { name: "SVGFreeSansASCII,sans-serif", size: 28 }, 33 | fill: "black", 34 | transform: [1, 0, 0, 1, 70, -30] 35 | } 36 | ] 37 | } 38 | ] 39 | }, 40 | SVGGroup { 41 | contents: [ 42 | SVGText { 43 | id: "revision", 44 | text: "$Revision: 1.8 $", 45 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 46 | fill: "black", 47 | transform: [1, 0, 0, 1, 10, 340] 48 | } 49 | ] 50 | }, 51 | SVGRect { 52 | id: "test-frame", 53 | x: 1, 54 | y: 1, 55 | width: 478, 56 | height: 358, 57 | stroke: { fill: "black" } 58 | } 59 | ] 60 | } 61 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/refs/shapes-circle-01-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGText { 9 | text: "Testing the element with different fill, stroke and stroke-width attributes", 10 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 11 | textAnchor: "middle", 12 | fill: "black", 13 | transform: [1, 0, 0, 1, 240, 14] 14 | }, 15 | SVGCircle { 16 | cx: 100, 17 | cy: 100, 18 | r: 50, 19 | stroke: { fill: "black" } 20 | }, 21 | SVGCircle { 22 | cx: 220, 23 | cy: 100, 24 | r: 35, 25 | fill: "red", 26 | stroke: { fill: "black" } 27 | }, 28 | SVGCircle { 29 | cx: 340, 30 | cy: 100, 31 | r: 20, 32 | fill: "black", 33 | stroke: { fill: "lime", width: 4 } 34 | }, 35 | SVGCircle { 36 | cx: 100, 37 | cy: 260, 38 | r: 20, 39 | fill: "yellow", 40 | stroke: { fill: "lime", width: 4 } 41 | }, 42 | SVGCircle { cx: 220, cy: 260, r: 35, fill: "blue" }, 43 | SVGCircle { 44 | cx: 340, 45 | cy: 260, 46 | r: 50, 47 | stroke: { fill: "red", width: 10 } 48 | } 49 | ] 50 | }, 51 | SVGGroup { 52 | contents: [ 53 | SVGText { 54 | id: "revision", 55 | text: "$Revision: 1.10 $", 56 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 57 | fill: "black", 58 | transform: [1, 0, 0, 1, 10, 340] 59 | } 60 | ] 61 | }, 62 | SVGRect { 63 | id: "test-frame", 64 | x: 1, 65 | y: 1, 66 | width: 478, 67 | height: 358, 68 | stroke: { fill: "black" } 69 | } 70 | ] 71 | } 72 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/refs/shapes-ellipse-01-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGText { 9 | text: "Testing the element with various stroke and fill attributes", 10 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 11 | textAnchor: "middle", 12 | fill: "black", 13 | transform: [1, 0, 0, 1, 240, 14] 14 | }, 15 | SVGEllipse { 16 | id: "ellipse-01", 17 | cx: 50, 18 | cy: 75, 19 | rx: 30, 20 | ry: 50, 21 | stroke: { fill: "black" } 22 | }, 23 | SVGEllipse { id: "ellipse-02", cx: 160, cy: 75, rx: 30, ry: 50, fill: "red" }, 24 | SVGEllipse { 25 | id: "ellipse-03", 26 | cx: 270, 27 | cy: 80, 28 | rx: 35, 29 | ry: 35, 30 | stroke: { fill: "black" } 31 | }, 32 | SVGEllipse { id: "ellipse-04", cx: 370, cy: 80, rx: 35, ry: 35, fill: "red" }, 33 | SVGEllipse { 34 | id: "ellipse-05", 35 | cx: 50, 36 | cy: 220, 37 | rx: 30, 38 | ry: 50, 39 | stroke: { fill: "blue", width: 8 } 40 | }, 41 | SVGEllipse { 42 | id: "ellipse-06", 43 | cx: 160, 44 | cy: 220, 45 | rx: 30, 46 | ry: 50, 47 | fill: "lime", 48 | stroke: { fill: "blue", width: 8 } 49 | }, 50 | SVGEllipse { 51 | id: "ellipse-07", 52 | cx: 330, 53 | cy: 220, 54 | rx: 70, 55 | ry: 40, 56 | fill: "lime", 57 | stroke: { fill: "blue", width: 8 } 58 | } 59 | ] 60 | }, 61 | SVGGroup { 62 | contents: [ 63 | SVGText { 64 | id: "revision", 65 | text: "$Revision: 1.10 $", 66 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 67 | fill: "black", 68 | transform: [1, 0, 0, 1, 10, 340] 69 | } 70 | ] 71 | }, 72 | SVGRect { 73 | id: "test-frame", 74 | x: 1, 75 | y: 1, 76 | width: 478, 77 | height: 358, 78 | stroke: { fill: "black" } 79 | } 80 | ] 81 | } 82 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/refs/shapes-polygon-01-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGText { 9 | text: "Testing the element with different fill, stroke and stroke-width attributes", 10 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 11 | textAnchor: "middle", 12 | fill: "black", 13 | transform: [1, 0, 0, 1, 240, 14] 14 | }, 15 | SVGPolygon { 16 | id: "polygon-01", 17 | points: [59, 45, 95, 63, 108, 105, 82, 139, 39, 140, 11, 107, 19, 65], 18 | stroke: { fill: "black" } 19 | }, 20 | SVGPolygon { 21 | id: "polygon-02", 22 | points: [179, 45, 218, 63, 228, 105, 202, 139, 159, 140, 131, 107, 139, 65, 179, 45], 23 | fill: "red" 24 | }, 25 | SVGPolygon { 26 | id: "polygon-03", 27 | points: [350, 45, 375, 80, 410, 95, 375, 110, 350, 145, 325, 120, 290, 95, 325, 70, 350, 45], 28 | fill: "blue", 29 | stroke: { fill: "black", width: 6 } 30 | }, 31 | SVGPolygon { 32 | id: "polygon-05", 33 | points: [59, 185, 98, 203, 108, 245, 82, 279, 39, 280, 11, 247, 19, 205, 59, 185], 34 | stroke: { fill: "blue", width: 8 } 35 | }, 36 | SVGPolygon { 37 | id: "polygon-06", 38 | points: [179, 185, 218, 203, 228, 245, 202, 279, 159, 280, 131, 247, 139, 205], 39 | fill: "lime", 40 | stroke: { fill: "blue", width: 8 } 41 | }, 42 | SVGPolygon { 43 | id: "polygon-07", 44 | points: [270, 225, 300, 245, 320, 225, 340, 245, 280, 280, 390, 280, 420, 240, 280, 185], 45 | stroke: { fill: "lime", width: 8 } 46 | } 47 | ] 48 | }, 49 | SVGGroup { 50 | contents: [ 51 | SVGText { 52 | id: "revision", 53 | text: "$Revision: 1.9 $", 54 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 55 | fill: "black", 56 | transform: [1, 0, 0, 1, 10, 340] 57 | } 58 | ] 59 | }, 60 | SVGRect { 61 | id: "test-frame", 62 | x: 1, 63 | y: 1, 64 | width: 478, 65 | height: 358, 66 | stroke: { fill: "black" } 67 | } 68 | ] 69 | } 70 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/refs/shapes-polyline-01-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGText { 9 | text: "Testing the element with different fill, stroke and stroke-width attributes", 10 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 11 | textAnchor: "middle", 12 | fill: "black", 13 | transform: [1, 0, 0, 1, 240, 14] 14 | }, 15 | SVGPolyline { 16 | id: "polyline-01", 17 | points: [10, 50, 35, 150, 60, 50, 85, 150, 110, 50, 135, 150], 18 | stroke: { fill: "black" } 19 | }, 20 | SVGPolyline { 21 | id: "polyline-02", 22 | points: [220, 50, 267, 84, 249, 140, 190, 140, 172, 84, 220, 50], 23 | stroke: { fill: "blue", width: 8 } 24 | }, 25 | SVGPolyline { 26 | id: "polyline-03", 27 | points: [310, 50, 335, 150, 360, 50, 385, 150, 410, 50, 435, 150], 28 | fill: "blue", 29 | stroke: { fill: "lime", width: 4 } 30 | }, 31 | SVGPolyline { 32 | id: "polyline-04", 33 | points: [59, 185, 98, 203, 108, 245, 82, 279, 39, 280, 11, 247, 19, 205], 34 | stroke: { fill: "red", width: 8 } 35 | }, 36 | SVGPolyline { 37 | id: "polyline-05", 38 | points: [189, 185, 228, 203, 238, 245, 212, 279, 169, 280, 141, 247, 149, 205], 39 | fill: "lime", 40 | stroke: { fill: "blue", width: 8 } 41 | }, 42 | SVGPolyline { 43 | id: "polyline-06", 44 | points: [270, 225, 300, 245, 320, 225, 340, 245, 280, 280, 390, 280, 420, 240, 280, 185], 45 | fill: "fuchsia" 46 | } 47 | ] 48 | }, 49 | SVGGroup { 50 | contents: [ 51 | SVGText { 52 | id: "revision", 53 | text: "$Revision: 1.9 $", 54 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 55 | fill: "black", 56 | transform: [1, 0, 0, 1, 10, 340] 57 | } 58 | ] 59 | }, 60 | SVGRect { 61 | id: "test-frame", 62 | x: 1, 63 | y: 1, 64 | width: 478, 65 | height: 358, 66 | stroke: { fill: "black" } 67 | } 68 | ] 69 | } 70 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/refs/shapes-rect-02-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGText { 9 | text: "Testing the default values of attributes of the element", 10 | font: { name: "SVGFreeSansASCII,sans-serif", size: 12 }, 11 | textAnchor: "middle", 12 | fill: "black", 13 | transform: [1, 0, 0, 1, 240, 14] 14 | }, 15 | SVGGroup { 16 | contents: [ 17 | SVGRect { 18 | y: 46, 19 | width: 50, 20 | height: 80, 21 | fill: "50% blue", 22 | stroke: { fill: "black" } 23 | }, 24 | SVGRect { 25 | x: 130, 26 | width: 50, 27 | height: 80, 28 | fill: "50% blue", 29 | stroke: { fill: "black" } 30 | }, 31 | SVGRect { 32 | x: 250, 33 | y: 46, 34 | height: 80, 35 | fill: "50% blue", 36 | stroke: { fill: "black" } 37 | }, 38 | SVGRect { 39 | x: 350, 40 | y: 46, 41 | width: 50, 42 | fill: "50% blue", 43 | stroke: { fill: "black" } 44 | }, 45 | SVGRect { 46 | x: 30, 47 | y: 196, 48 | width: 50, 49 | height: 80, 50 | rx: 20, 51 | ry: 20, 52 | fill: "50% blue", 53 | stroke: { fill: "black" } 54 | }, 55 | SVGRect { 56 | x: 130, 57 | y: 196, 58 | width: 50, 59 | height: 80, 60 | rx: 20, 61 | ry: 20, 62 | fill: "50% blue", 63 | stroke: { fill: "black" } 64 | } 65 | ] 66 | } 67 | ] 68 | }, 69 | SVGGroup { 70 | contents: [ 71 | SVGText { 72 | id: "revision", 73 | text: "$Revision: 1.9 $", 74 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 75 | fill: "black", 76 | transform: [1, 0, 0, 1, 10, 340] 77 | } 78 | ] 79 | }, 80 | SVGRect { 81 | id: "test-frame", 82 | x: 1, 83 | y: 1, 84 | width: 478, 85 | height: 358, 86 | stroke: { fill: "black" } 87 | } 88 | ] 89 | } 90 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/refs/struct-defs-01-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGRect { x: 140, y: 80, width: 200, height: 200, fill: "red" } 9 | ] 10 | }, 11 | SVGGroup { 12 | contents: [ 13 | SVGText { 14 | id: "revision", 15 | text: "$Revision: 1.8 $", 16 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 17 | fill: "black", 18 | transform: [1, 0, 0, 1, 10, 340] 19 | } 20 | ] 21 | }, 22 | SVGRect { 23 | id: "test-frame", 24 | x: 1, 25 | y: 1, 26 | width: 478, 27 | height: 358, 28 | stroke: { fill: "black" } 29 | } 30 | ] 31 | } 32 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/refs/struct-frag-01-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | contents: [ 4 | SVGGroup { id: "test-body-content" } 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/refs/struct-use-03-t.ref: -------------------------------------------------------------------------------- 1 | SVGViewport { 2 | id: "svg-root", 3 | viewBox: { width: 480, height: 360 }, 4 | contents: [ 5 | SVGGroup { 6 | id: "test-body-content", 7 | contents: [ 8 | SVGText { 9 | text: "Reference", 10 | font: { name: "SVGFreeSansASCII,sans-serif", size: 18 }, 11 | textAnchor: "middle", 12 | fill: "black", 13 | transform: [1, 0, 0, 1, 120, 60] 14 | }, 15 | SVGText { 16 | text: "", 17 | font: { name: "SVGFreeSansASCII,sans-serif", size: 18 }, 18 | textAnchor: "middle", 19 | fill: "black", 20 | transform: [1, 0, 0, 1, 360, 60] 21 | }, 22 | SVGGroup { 23 | id: "reference", 24 | transform: [0.7071067812, 0.7071067812, -0.7071067812, 0.7071067812, 120, 99.2893218813], 25 | contents: [ 26 | SVGRect { 27 | width: 100, 28 | height: 100, 29 | fill: "#FADC00", 30 | stroke: { fill: "#C82828", width: 20 } 31 | } 32 | ] 33 | }, 34 | SVGGroup { 35 | transform: [1, 0, 0, 1, 240, 0], 36 | contents: [ 37 | SVGRect { 38 | width: 100, 39 | height: 100, 40 | fill: "#FADC00", 41 | stroke: { fill: "#C82828", width: 20 }, 42 | transform: [0.7071067812, 0.7071067812, -0.7071067812, 0.7071067812, 120, 99.2893218813] 43 | } 44 | ] 45 | } 46 | ] 47 | }, 48 | SVGGroup { 49 | contents: [ 50 | SVGText { 51 | id: "revision", 52 | text: "$Revision: 1.6 $", 53 | font: { name: "SVGFreeSansASCII,sans-serif", size: 32 }, 54 | fill: "black", 55 | transform: [1, 0, 0, 1, 10, 340] 56 | } 57 | ] 58 | }, 59 | SVGRect { 60 | id: "test-frame", 61 | x: 1, 62 | y: 1, 63 | width: 478, 64 | height: 358, 65 | stroke: { fill: "black" } 66 | } 67 | ] 68 | } 69 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/svg/intro-compat-201-t.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exyte/SVGView/86f6d742cccf5b64844b303d80ed1f75d02fbcce/SVGViewTests/w3c/1.2T/svg/intro-compat-201-t.svg -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/svg/jpeg-required-204-t.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 16 | 17 |

18 | Test greyscale baseline JPEG. 19 |

20 | 21 | 22 | $RCSfile: jpeg-required-204-t.svg,v $ 23 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | greyscale 36 | sequential 37 | 38 | 39 | $Revision: 1.5 $ 41 | 42 | 43 | 44 | 49 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/svg/jpeg-required-207-t.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 16 | 17 |

18 | Test RGB optimised JPEG with no chrominance subsampling, 4:4:4. 19 |

20 | 21 | 22 | $RCSfile: jpeg-required-207-t.svg,v $ 23 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | optimised 4:4:4 35 | sequential 36 | 37 | 38 | $Revision: 1.5 $ 40 | 41 | 42 | 43 | 48 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/svg/paint-vfill-205-t.svg: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 |

19 | Tests viewport-fill and viewport-fill-opacity. 20 | Output should match reference image. 21 |

22 | 23 | 24 | $RCSfile: paint-vfill-205-t.svg,v $ 25 | 26 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | $Revision: 1.5 $ 41 | 42 | 43 | 44 | 49 | -------------------------------------------------------------------------------- /SVGViewTests/w3c/1.2T/svg/struct-frag-01-t.svg: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 |

18 | This is an empty SVG document. 19 |

20 | 21 | 22 |

23 | Run the test. No interaction required. 24 |

25 |
26 | 27 |

28 | Nothing should be rendered by the User Agent. 29 |

30 |
31 | 32 | $RCSfile: struct-frag-01-t.svg,v $ 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 49 | 50 | -------------------------------------------------------------------------------- /Source/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /Source/Model/Images/SVGDataImage.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SVGDataImage.swift 3 | // SVGView 4 | // 5 | // Created by Alisa Mylnikova on 10/06/2021. 6 | // 7 | 8 | import SwiftUI 9 | import Combine 10 | 11 | public class SVGDataImage: SVGImage, ObservableObject { 12 | 13 | @Published public var data: Data 14 | 15 | public init(x: CGFloat = 0, y: CGFloat = 0, width: CGFloat = 0, height: CGFloat = 0, data: Data) { 16 | self.data = data 17 | super.init(x: x, y: y, width: width, height: height) 18 | } 19 | 20 | override func serialize(_ serializer: Serializer) { 21 | serializer.add("data", "\(data.base64EncodedString())") 22 | super.serialize(serializer) 23 | } 24 | 25 | public func contentView() -> some View { 26 | SVGDataImageView(model: self) 27 | } 28 | } 29 | 30 | struct SVGDataImageView: View { 31 | 32 | #if os(OSX) 33 | @ViewBuilder 34 | private var image: Image? { 35 | if let nsImage = NSImage(data: model.data) { 36 | Image(nsImage: nsImage) 37 | } 38 | } 39 | #else 40 | @ViewBuilder 41 | private var image: Image? { 42 | if let uiImage = UIImage(data: model.data) { 43 | Image(uiImage: uiImage) 44 | } 45 | } 46 | #endif 47 | 48 | @ObservedObject var model: SVGDataImage 49 | 50 | public var body: some View { 51 | image 52 | .frame(width: model.width, height: model.height) 53 | .position(x: model.x, y: model.y) 54 | .offset(x: model.width/2, y: model.height/2) 55 | .applyNodeAttributes(model: model) 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Source/Model/Images/SVGURLImage.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SVGURLImage.swift 3 | // SVGView 4 | // 5 | // Created by Alisa Mylnikova on 22/09/2021. 6 | // 7 | 8 | import SwiftUI 9 | 10 | public class SVGURLImage: SVGImage, ObservableObject { 11 | 12 | public let src: String 13 | public let data: Data? 14 | 15 | public init(x: CGFloat = 0, y: CGFloat = 0, width: CGFloat = 0, height: CGFloat = 0, src: String, data: Data?) { 16 | self.src = src 17 | self.data = data 18 | super.init(x: x, y: y, width: width, height: height) 19 | } 20 | 21 | override func serialize(_ serializer: Serializer) { 22 | serializer.add("src", src) 23 | super.serialize(serializer) 24 | } 25 | 26 | public func contentView() -> some View { 27 | SVGUrlImageView(model: self) 28 | } 29 | } 30 | 31 | struct SVGUrlImageView: View { 32 | 33 | @ObservedObject var model: SVGURLImage 34 | 35 | #if os(OSX) 36 | @ViewBuilder 37 | private var image: Image? { 38 | if let data = model.data, let nsImage = NSImage(data: data) { 39 | Image(nsImage: nsImage) 40 | } 41 | } 42 | #else 43 | @ViewBuilder 44 | private var image: Image? { 45 | if let data = model.data, let uiImage = UIImage(data: data) { 46 | Image(uiImage: uiImage) 47 | } 48 | } 49 | #endif 50 | 51 | public var body: some View { 52 | image 53 | .frame(width: model.width, height: model.height) 54 | .position(x: model.x, y: model.y) 55 | .offset(x: model.width/2, y: model.height/2) 56 | .applyNodeAttributes(model: model) 57 | } 58 | } 59 | 60 | -------------------------------------------------------------------------------- /Source/Model/Nodes/SVGGroup.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | import Combine 3 | 4 | public class SVGGroup: SVGNode, ObservableObject { 5 | 6 | @Published public var contents: [SVGNode] = [] 7 | 8 | public init(contents: [SVGNode], transform: CGAffineTransform = .identity, opaque: Bool = true, opacity: Double = 1, clip: SVGUserSpaceNode? = nil, mask: SVGNode? = nil) { 9 | super.init(transform: transform, opaque: opaque, opacity: opacity, clip: clip, mask: mask) 10 | self.contents = contents 11 | } 12 | 13 | override public func bounds() -> CGRect { 14 | contents.map { $0.bounds() }.reduce(contents.first?.bounds() ?? CGRect.zero) { $0.union($1) } 15 | } 16 | 17 | override public func getNode(byId id: String) -> SVGNode? { 18 | if let node = super.getNode(byId: id) { 19 | return node 20 | } 21 | for node in contents { 22 | if let node = node.getNode(byId: id) { 23 | return node 24 | } 25 | } 26 | return .none 27 | } 28 | 29 | override func serialize(_ serializer: Serializer) { 30 | super.serialize(serializer) 31 | serializer.add("contents", contents) 32 | } 33 | 34 | public func contentView() -> some View { 35 | SVGGroupView(model: self) 36 | } 37 | } 38 | 39 | struct SVGGroupView: View { 40 | 41 | @ObservedObject var model: SVGGroup 42 | 43 | public var body: some View { 44 | ZStack { 45 | ForEach(0.. some View { 29 | SVGTextView(model: self) 30 | } 31 | } 32 | 33 | struct SVGTextView: View { 34 | 35 | @ObservedObject var model: SVGText 36 | 37 | public var body: some View { 38 | if let stroke = model.stroke, let fill = model.fill { 39 | ZStack { 40 | // TODO: just a temporary fix, should be replaced with a better solution 41 | let hw = stroke.width / 2 42 | filledText(fill: stroke.fill).offset(x: hw, y: hw) 43 | filledText(fill: stroke.fill).offset(x: -hw, y: -hw) 44 | filledText(fill: stroke.fill).offset(x: -hw, y: hw) 45 | filledText(fill: stroke.fill).offset(x: hw, y: -hw) 46 | filledText(fill: fill) 47 | } 48 | } else { 49 | filledText(fill: model.fill) 50 | } 51 | } 52 | 53 | private func filledText(fill: SVGPaint?) -> some View { 54 | Text(model.text) 55 | .font(model.font?.toSwiftUI()) 56 | .lineLimit(1) 57 | .alignmentGuide(.leading) { d in d[model.textAnchor] } 58 | .alignmentGuide(VerticalAlignment.top) { d in d[VerticalAlignment.firstTextBaseline] } 59 | .position(x: 0, y: 0) // just to specify that positioning is global, actual coords are in transform 60 | .apply(paint: fill) 61 | .transformEffect(model.transform) 62 | .frame(alignment: .topLeading) 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Source/Model/Nodes/SVGUserSpaceNode.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SVGUserSpaceNode.swift 3 | // Pods 4 | // 5 | // Created by Alisa Mylnikova on 14/10/2020. 6 | // 7 | 8 | import SwiftUI 9 | 10 | public class SVGUserSpaceNode: SVGNode { 11 | 12 | public enum UserSpace: String, SerializableEnum { 13 | 14 | case objectBoundingBox 15 | case userSpaceOnUse 16 | } 17 | 18 | public let node: SVGNode 19 | public let userSpace: UserSpace 20 | 21 | public init(node: SVGNode, userSpace: UserSpace) { 22 | self.node = node 23 | self.userSpace = userSpace 24 | } 25 | 26 | override func serialize(_ serializer: Serializer) { 27 | serializer.add("userSpace", userSpace) 28 | super.serialize(serializer) 29 | } 30 | 31 | public func contentView() -> some View { 32 | SVGUserSpaceNodeView(model: self) 33 | } 34 | } 35 | 36 | struct SVGUserSpaceNodeView: View { 37 | let model: SVGUserSpaceNode 38 | 39 | var body: some View { 40 | if model.userSpace == .userSpaceOnUse { 41 | return model.node.toSwiftUI() 42 | } else { 43 | fatalError("Pass absolute node parameter for objectBoundingBox to work properly") 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Source/Model/Primitives/SVGFont.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | public class SVGFont: SerializableBlock { 4 | 5 | public let name: String 6 | public let size: CGFloat 7 | public let weight: String 8 | 9 | public init(name: String = "Serif", size: CGFloat = 16, weight: String = "normal") { 10 | self.name = name 11 | self.size = size 12 | self.weight = weight 13 | } 14 | 15 | public func toSwiftUI() -> Font { 16 | return Font.custom(name, size: size)//.weight(fontWeight) 17 | } 18 | 19 | func serialize(_ serializer: Serializer) { 20 | serializer.add("name", name, "Serif").add("size", size, 16).add("weight", weight, "normal") 21 | } 22 | } 23 | 24 | 25 | -------------------------------------------------------------------------------- /Source/Model/Primitives/SVGLength.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SVGLength.swift 3 | // Pods 4 | // 5 | // Created by Alisa Mylnikova on 13/10/2020. 6 | // 7 | 8 | import SwiftUI 9 | 10 | public enum SVGLength { 11 | 12 | case percent(CGFloat) 13 | case pixels(CGFloat) 14 | 15 | init(percent: CGFloat) { 16 | self = .percent(percent) 17 | } 18 | 19 | init(pixels: CGFloat) { 20 | self = .pixels(pixels) 21 | } 22 | 23 | var ideal: CGFloat? { 24 | switch self { 25 | case .percent(_): 26 | return nil 27 | case let .pixels(pixels): 28 | return pixels 29 | } 30 | } 31 | 32 | public func toPixels(total: CGFloat) -> CGFloat { 33 | switch self { 34 | case let .percent(percent): 35 | return total * percent / 100.0 36 | case let .pixels(pixels): 37 | return pixels 38 | } 39 | } 40 | 41 | public func toString() -> String { 42 | switch(self) { 43 | case let .percent(percent): 44 | return "\(percent.serialize())%" 45 | case let .pixels(pixels): 46 | return pixels.serialize() 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Source/Model/Primitives/SVGPaint.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SVGPaint.swift 3 | // SVGView 4 | // 5 | // Created by Yuriy Strot on 19.01.2021. 6 | // 7 | 8 | import Foundation 9 | import SwiftUI 10 | 11 | public class SVGPaint { 12 | 13 | func serialize(key: String, serializer: Serializer) { 14 | 15 | } 16 | 17 | public func opacity(_ opacity: Double) -> SVGPaint { 18 | return self 19 | } 20 | 21 | } 22 | 23 | extension View { 24 | 25 | @ViewBuilder 26 | func apply(paint: SVGPaint?, model: SVGShape? = nil) -> some View { 27 | if let p = paint { 28 | switch p { 29 | case let linearGradient as SVGLinearGradient: 30 | linearGradient.apply(view: self, model: model) 31 | case let radialGradient as SVGRadialGradient: 32 | radialGradient.apply(view: self, model: model) 33 | case let color as SVGColor: 34 | color.apply(view: self, model: model) 35 | default: 36 | fatalError("Base SVGPaint is not convertable to SwiftUI") 37 | } 38 | } else { 39 | self.foregroundColor(.clear) 40 | } 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /Source/Model/Primitives/SVGStroke.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | public class SVGStroke: SerializableBlock { 4 | 5 | public let fill: SVGPaint 6 | public let width: CGFloat 7 | public let cap: CGLineCap 8 | public let join: CGLineJoin 9 | public let miterLimit: CGFloat 10 | public let dashes: [CGFloat] 11 | public let offset: CGFloat 12 | 13 | public init(fill: SVGPaint = SVGColor.black, width: CGFloat = 1, cap: CGLineCap = .butt, join: CGLineJoin = .miter, miterLimit: CGFloat = 4, dashes: [CGFloat] = [], offset: CGFloat = 0.0) { 14 | self.fill = fill 15 | self.width = width 16 | self.cap = cap 17 | self.join = join 18 | self.miterLimit = miterLimit 19 | self.dashes = dashes 20 | self.offset = offset 21 | } 22 | 23 | public func toSwiftUI() -> StrokeStyle { 24 | StrokeStyle(lineWidth: width, 25 | lineCap: cap, 26 | lineJoin: join, 27 | miterLimit: miterLimit, 28 | dash: dashes, 29 | dashPhase: offset) 30 | } 31 | 32 | func serialize(_ serializer: Serializer) { 33 | fill.serialize(key: "fill", serializer: serializer) 34 | serializer.add("width", width, 1) 35 | serializer.add("cap", cap) 36 | serializer.add("join", join) 37 | serializer.add("offset", offset, 0) 38 | serializer.add("miterLimit", miterLimit, 4) 39 | serializer.add("dashes", dashes.serialized) 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Source/Model/Shapes/SVGCircle.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | import Combine 3 | 4 | public class SVGCircle: SVGShape, ObservableObject { 5 | 6 | @Published public var cx: CGFloat 7 | @Published public var cy: CGFloat 8 | @Published public var r: CGFloat 9 | 10 | public init(cx: CGFloat = 0, cy: CGFloat = 0, r: CGFloat = 0) { 11 | self.cx = cx 12 | self.cy = cy 13 | self.r = r 14 | } 15 | 16 | override public func frame() -> CGRect { 17 | CGRect(x: cx - r, y: cy - r, width: 2*r, height: 2*r) 18 | } 19 | 20 | override func serialize(_ serializer: Serializer) { 21 | serializer.add("cx", cx, 0).add("cy", cy, 0).add("r", r, 0) 22 | super.serialize(serializer) 23 | } 24 | 25 | public func contentView() -> some View { 26 | SVGCircleView(model: self) 27 | } 28 | } 29 | 30 | struct SVGCircleView: View { 31 | 32 | @ObservedObject var model = SVGCircle() 33 | 34 | public var body: some View { 35 | Circle() 36 | .applySVGStroke(stroke: model.stroke) 37 | .applyShapeAttributes(model: model) 38 | .frame(width: 2 * model.r, height: 2 * model.r) 39 | .position(x: model.cx, y: model.cy) 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Source/Model/Shapes/SVGEllipse.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | import Combine 3 | 4 | public class SVGEllipse: SVGShape, ObservableObject { 5 | 6 | @Published public var cx: CGFloat 7 | @Published public var cy: CGFloat 8 | @Published public var rx: CGFloat 9 | @Published public var ry: CGFloat 10 | 11 | public init(cx: CGFloat = 0, cy: CGFloat = 0, rx: CGFloat = 0, ry: CGFloat = 0) { 12 | self.cx = cx 13 | self.cy = cy 14 | self.rx = rx 15 | self.ry = ry 16 | } 17 | 18 | override public func frame() -> CGRect { 19 | CGRect(x: cx - rx, y: cy - ry, width: 2*rx, height: 2*ry) 20 | } 21 | 22 | override func serialize(_ serializer: Serializer) { 23 | serializer.add("cx", cx, 0).add("cy", cy, 0).add("rx", rx, 0).add("ry", ry, 0) 24 | super.serialize(serializer) 25 | } 26 | 27 | public func contentView() -> some View { 28 | SVGEllipseView(model: self) 29 | } 30 | } 31 | 32 | struct SVGEllipseView: View { 33 | 34 | @ObservedObject var model = SVGEllipse() 35 | 36 | public var body: some View { 37 | Ellipse() 38 | .applySVGStroke(stroke: model.stroke) 39 | .frame(width: 2 * model.rx, height: 2 * model.ry) 40 | .position(x: model.cx, y: model.cy) 41 | .applyShapeAttributes(model: model) 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /Source/Model/Shapes/SVGLine.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | import Combine 3 | 4 | public class SVGLine: SVGShape, ObservableObject { 5 | 6 | @Published public var x1: CGFloat 7 | @Published public var y1: CGFloat 8 | @Published public var x2: CGFloat 9 | @Published public var y2: CGFloat 10 | 11 | public init(_ x1: CGFloat, _ y1: CGFloat, _ x2: CGFloat, _ y2: CGFloat) { 12 | self.x1 = x1 13 | self.y1 = y1 14 | self.x2 = x2 15 | self.y2 = y2 16 | } 17 | 18 | public init(x1: CGFloat = 0, y1: CGFloat = 0, x2: CGFloat = 0, y2: CGFloat = 0) { 19 | self.x1 = x1 20 | self.y1 = y1 21 | self.x2 = x2 22 | self.y2 = y2 23 | } 24 | 25 | override public func frame() -> CGRect { 26 | return CGRect(x: min(x1, x2), y: min(y1, y2), width: abs(x1 - x2), height: abs(y1 - y2)) 27 | } 28 | 29 | override func serialize(_ serializer: Serializer) { 30 | serializer.add("x1", x1, 0).add("y1", y1, 0).add("x2", x2, 0).add("y2", y2, 0) 31 | super.serialize(serializer) 32 | } 33 | 34 | public func contentView() -> some View { 35 | SVGLineView(model: self) 36 | } 37 | } 38 | 39 | struct SVGLineView: View { 40 | 41 | @ObservedObject var model = SVGLine() 42 | 43 | public var body: some View { 44 | line.toSwiftUI(model: model) 45 | } 46 | 47 | private var line: MBezierPath { 48 | let line = MBezierPath() 49 | line.move(to: CGPoint(x: model.x1, y: model.y1)) 50 | line.addLine(to: CGPoint(x: model.x2, y: model.y2)) 51 | return line 52 | } 53 | } 54 | 55 | -------------------------------------------------------------------------------- /Source/Model/Shapes/SVGPath.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | import Combine 3 | 4 | public class SVGPath: SVGShape, ObservableObject { 5 | 6 | @Published public var segments: [PathSegment] 7 | @Published public var fillRule: CGPathFillRule 8 | 9 | public init(segments: [PathSegment] = [], fillRule: CGPathFillRule = .winding) { 10 | self.segments = segments 11 | self.fillRule = fillRule 12 | } 13 | 14 | override public func frame() -> CGRect { 15 | toBezierPath().cgPath.boundingBoxOfPath 16 | } 17 | 18 | override public func bounds() -> CGRect { 19 | frame() 20 | } 21 | 22 | override func serialize(_ serializer: Serializer) { 23 | let path = segments.map { s in "\(s.type)\(s.data.compactMap { $0.serialize() }.joined(separator: ","))" }.joined(separator: " ") 24 | serializer.add("path", path) 25 | serializer.add("fillRule", fillRule) 26 | super.serialize(serializer) 27 | } 28 | 29 | public func contentView() -> some View { 30 | SVGPathView(model: self) 31 | } 32 | } 33 | 34 | struct SVGPathView: View { 35 | 36 | @ObservedObject var model = SVGPath() 37 | 38 | public var body: some View { 39 | model.toBezierPath().toSwiftUI(model: model, eoFill: model.fillRule == .evenOdd) 40 | } 41 | } 42 | 43 | extension MBezierPath { 44 | 45 | func toSwiftUI(model: SVGShape, eoFill: Bool = false) -> some View { 46 | let isGradient = model.fill is SVGGradient 47 | let bounds = isGradient ? model.bounds() : CGRect.zero 48 | return Path(self.cgPath) 49 | .applySVGStroke(stroke: model.stroke, eoFill: eoFill) 50 | .applyShapeAttributes(model: model) 51 | .applyIf(isGradient) { 52 | $0.frame(width: bounds.width, height: bounds.height) 53 | .position(x: 0, y: 0) 54 | .offset(x: bounds.width/2, y: bounds.height/2) 55 | } 56 | } 57 | } 58 | 59 | -------------------------------------------------------------------------------- /Source/Model/Shapes/SVGPolygon.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | import Combine 3 | 4 | public class SVGPolygon: SVGShape, ObservableObject { 5 | 6 | @Published public var points: [CGPoint] 7 | 8 | public init(_ points: [CGPoint]) { 9 | self.points = points 10 | } 11 | 12 | public init(points: [CGPoint] = []) { 13 | self.points = points 14 | } 15 | 16 | override public func frame() -> CGRect { 17 | guard !points.isEmpty else { 18 | return .zero 19 | } 20 | 21 | var minX = CGFloat(INT16_MAX) 22 | var minY = CGFloat(INT16_MAX) 23 | var maxX = CGFloat(INT16_MIN) 24 | var maxY = CGFloat(INT16_MIN) 25 | 26 | for point in points { 27 | minX = min(minX, point.x) 28 | maxX = max(maxX, point.x) 29 | minY = min(minY, point.y) 30 | maxY = max(maxY, point.y) 31 | } 32 | 33 | return CGRect(x: minX, y: minY, 34 | width: maxX - minX, 35 | height: maxY - minY) 36 | } 37 | 38 | public override func bounds() -> CGRect { 39 | let frame = frame() 40 | return CGRect(x: 0, y: 0, width: frame.width, height: frame.height) 41 | } 42 | 43 | override func serialize(_ serializer: Serializer) { 44 | serializer.add("points", points.serialized) 45 | super.serialize(serializer) 46 | } 47 | 48 | public func contentView() -> some View { 49 | SVGPolygonView(model: self) 50 | } 51 | } 52 | 53 | struct SVGPolygonView: View { 54 | 55 | @ObservedObject var model = SVGPolygon() 56 | 57 | @ViewBuilder 58 | public var body: some View { 59 | path?.toSwiftUI(model: model) 60 | } 61 | 62 | private var path: MBezierPath? { 63 | guard let first = model.points.first else { return nil } 64 | let path = MBezierPath() 65 | path.move(to: CGPoint(x: first.x, y: first.y)) 66 | for i in 1.. CGRect { 17 | guard !points.isEmpty else { 18 | return .zero 19 | } 20 | 21 | var minX = CGFloat(INT16_MAX) 22 | var minY = CGFloat(INT16_MAX) 23 | var maxX = CGFloat(INT16_MIN) 24 | var maxY = CGFloat(INT16_MIN) 25 | 26 | for point in points { 27 | minX = min(minX, point.x) 28 | maxX = max(maxX, point.x) 29 | minY = min(minY, point.y) 30 | maxY = max(maxY, point.y) 31 | } 32 | 33 | return CGRect(x: minX, y: minY, 34 | width: maxX - minX, 35 | height: maxY - minY) 36 | } 37 | 38 | public override func bounds() -> CGRect { 39 | let frame = frame() 40 | return CGRect(x: 0, y: 0, width: frame.width, height: frame.height) 41 | } 42 | 43 | override func serialize(_ serializer: Serializer) { 44 | serializer.add("points", points.serialized) 45 | super.serialize(serializer) 46 | } 47 | 48 | public func contentView() -> some View { 49 | SVGPolylineView(model: self) 50 | } 51 | } 52 | 53 | struct SVGPolylineView: View { 54 | 55 | @ObservedObject var model = SVGPolyline() 56 | 57 | public var body: some View { 58 | path?.toSwiftUI(model: model) 59 | } 60 | 61 | private var path: MBezierPath? { 62 | guard let first = model.points.first else { return nil } 63 | let path = MBezierPath() 64 | path.move(to: CGPoint(x: first.x, y: first.y)) 65 | for i in 1.. CGRect { 30 | CGRect(x: x, y: y, width: width, height: height) 31 | } 32 | 33 | override func serialize(_ serializer: Serializer) { 34 | serializer.add("x", x, 0).add("y", y, 0).add("width", width, 0).add("height", height, 0) 35 | serializer.add("rx", rx, 0).add("ry", ry, 0) 36 | super.serialize(serializer) 37 | } 38 | 39 | public func contentView() -> some View { 40 | SVGRectView(model: self) 41 | } 42 | } 43 | 44 | struct SVGRectView: View { 45 | 46 | @ObservedObject var model: SVGRect 47 | 48 | public var body: some View { 49 | RoundedRectangle(cornerSize: CGSize(width: model.rx, height: model.ry)) 50 | .applySVGStroke(stroke: model.stroke) 51 | .applyShapeAttributes(model: model) 52 | .frame(width: model.width, height: model.height) 53 | .position(x: model.x, y: model.y) 54 | .offset(x: model.width/2, y: model.height/2) 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Source/Parser/SVG/Attributes/SVGAttribute.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SVGAttribute.swift 3 | // SVGView 4 | // 5 | // Created by Yuri Strot on 29.05.2022. 6 | // 7 | 8 | import Foundation 9 | 10 | class SVGAttribute { 11 | 12 | static var fontSize: SVGFontSizeAttribute { SVGAttributes.fontSize } 13 | static var x: SVGLengthAttribute { SVGAttributes.x } 14 | static var y: SVGLengthAttribute { SVGAttributes.y } 15 | static var width: SVGLengthAttribute { SVGAttributes.width } 16 | static var height: SVGLengthAttribute { SVGAttributes.height } 17 | static var r: SVGLengthAttribute { SVGAttributes.r } 18 | static var rx: SVGLengthAttribute { SVGAttributes.rx } 19 | static var ry: SVGLengthAttribute { SVGAttributes.ry } 20 | static var cx: SVGLengthAttribute { SVGAttributes.cx } 21 | static var cy: SVGLengthAttribute { SVGAttributes.cy } 22 | static var x1: SVGLengthAttribute { SVGAttributes.x1 } 23 | static var x2: SVGLengthAttribute { SVGAttributes.x2 } 24 | static var y1: SVGLengthAttribute { SVGAttributes.y1 } 25 | static var y2: SVGLengthAttribute { SVGAttributes.y2 } 26 | 27 | var name: String { "" } 28 | var isInherited: Bool { false } 29 | 30 | func parse(string: String, context: SVGNodeContext) -> Value? { 31 | fatalError("SVGAttribute.parse(string:context:) should be overwritten by inheritor") 32 | } 33 | 34 | } 35 | 36 | class SVGDefaultAttribute: SVGAttribute { 37 | 38 | func defaultValue(context: SVGNodeContext) -> Value { 39 | fatalError("SVGAttribute.defaultValue(context:) should be overwritten by inheritor") 40 | } 41 | 42 | } 43 | 44 | class SVGAttributes { 45 | 46 | static let fontSize = SVGFontSizeAttribute() 47 | static let x = SVGLengthAttribute(name: "x", axis: .x) 48 | static let y = SVGLengthAttribute(name: "y", axis: .y) 49 | static let width = SVGLengthAttribute(name: "width", axis: .x) 50 | static let height = SVGLengthAttribute(name: "height", axis: .y) 51 | static let r = SVGLengthAttribute(name: "r", axis: .all) 52 | static let rx = SVGLengthAttribute(name: "rx", axis: .x) 53 | static let ry = SVGLengthAttribute(name: "ry", axis: .y) 54 | static let cx = SVGLengthAttribute(name: "cx", axis: .x) 55 | static let cy = SVGLengthAttribute(name: "cy", axis: .y) 56 | static let x1 = SVGLengthAttribute(name: "x1", axis: .x) 57 | static let x2 = SVGLengthAttribute(name: "x2", axis: .x) 58 | static let y1 = SVGLengthAttribute(name: "y1", axis: .y) 59 | static let y2 = SVGLengthAttribute(name: "y2", axis: .y) 60 | 61 | } 62 | -------------------------------------------------------------------------------- /Source/Parser/SVG/Attributes/SVGFontSizeAttribute.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SVGFontSizeAttribute.swift 3 | // SVGView 4 | // 5 | // Created by Yuri Strot on 29.05.2022. 6 | // 7 | 8 | import CoreGraphics 9 | 10 | class SVGFontSizeAttribute: SVGDefaultAttribute { 11 | 12 | override var name: String { "font-size" } 13 | 14 | override var isInherited: Bool { true } 15 | 16 | override func parse(string: String, context: SVGNodeContext) -> CGFloat? { 17 | SVGLengthParser.fontSize.float(string: string, context: context) 18 | } 19 | 20 | override func defaultValue(context: SVGNodeContext) -> CGFloat { 21 | context.defaultFontSize 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /Source/Parser/SVG/Attributes/SVGLengthAttribute.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SVGWidthAttribute.swift 3 | // SVGView 4 | // 5 | // Created by Yuri Strot on 29.05.2022. 6 | // 7 | 8 | import CoreGraphics 9 | 10 | class SVGLengthAttribute: SVGDefaultAttribute { 11 | 12 | private let attrName: String 13 | private let parser: SVGLengthParser 14 | 15 | init(name: String, axis: SVGLengthAxis) { 16 | self.attrName = name 17 | self.parser = SVGLengthParser.forAxis(axis) 18 | } 19 | 20 | override var name: String { attrName } 21 | 22 | override func parse(string: String, context: SVGNodeContext) -> CGFloat? { 23 | parser.float(string: string, context: context) 24 | } 25 | 26 | override func defaultValue(context: SVGNodeContext) -> CGFloat { 0 } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Source/Parser/SVG/Elements/SVGElementParser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SVGElementParser.swift 3 | // SVGView 4 | // 5 | // Created by Yuri Strot on 29.05.2022. 6 | // 7 | 8 | import Foundation 9 | 10 | protocol SVGElementParser { 11 | 12 | func parse(context: SVGNodeContext, delegate: @escaping (XMLElement) -> SVGNode?) -> SVGNode? 13 | 14 | } 15 | 16 | class SVGBaseElementParser: SVGElementParser { 17 | 18 | func parse(context: SVGNodeContext, delegate: (XMLElement) -> SVGNode?) -> SVGNode? { 19 | guard let node = doParse(context: context, delegate: delegate) else { return nil } 20 | let transform = SVGHelper.parseTransform(context.properties["transform"] ?? "") 21 | node.transform = node.transform.concatenating(transform) 22 | node.opacity = SVGHelper.parseOpacity(context.properties, "opacity") 23 | 24 | if let clipId = SVGHelper.parseUse(context.properties["clip-path"]), 25 | let clipNode = context.index.element(by: clipId), 26 | let clip = delegate(clipNode) { 27 | node.clip = SVGUserSpaceNode(node: clip, userSpace: parse(userSpace: clipNode.attributes["clipPathUnits"])) 28 | } 29 | 30 | node.id = SVGHelper.parseId(context.properties) 31 | return node 32 | } 33 | 34 | /// should be overwritten by inheritor 35 | func doParse(context: SVGNodeContext, delegate: (XMLElement) -> SVGNode?) -> SVGNode? { 36 | return nil 37 | } 38 | 39 | private func parse(userSpace: String?) -> SVGUserSpaceNode.UserSpace { 40 | if let value = userSpace, let result = SVGUserSpaceNode.UserSpace(rawValue: value) { 41 | return result 42 | } 43 | return SVGUserSpaceNode.UserSpace.objectBoundingBox 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /Source/Parser/SVG/Elements/SVGImageParser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SVGImageParser.swift 3 | // SVGView 4 | // 5 | // Created by Yuri Strot on 29.05.2022. 6 | // 7 | 8 | import SwiftUI 9 | 10 | class SVGImageParser: SVGBaseElementParser { 11 | override func doParse(context: SVGNodeContext, delegate: (XMLElement) -> SVGNode?) -> SVGNode? { 12 | guard let src = context.property("xlink:href") else { return nil } 13 | let x = SVGHelper.parseCGFloat(context.properties, "x") 14 | let y = SVGHelper.parseCGFloat(context.properties, "y") 15 | let width = SVGHelper.parseCGFloat(context.properties, "width") 16 | let height = SVGHelper.parseCGFloat(context.properties, "height") 17 | 18 | // Base64 image 19 | let decodableFormat = ["image/png", "image/jpg", "image/svg+xml"] 20 | for format in decodableFormat { 21 | let prefix = "data:\(format);base64," 22 | if src.hasPrefix(prefix) { 23 | let src = String(src.suffix(from: prefix.endIndex)) 24 | if let decodedData = Data(base64Encoded: src, options: .ignoreUnknownCharacters) { 25 | return SVGDataImage(x: x, y: y, width: width, height: height, data: decodedData) 26 | } 27 | } 28 | } 29 | 30 | do { 31 | if let data = try context.linker.load(src: src) { 32 | return SVGURLImage(x: x, y: y, width: width, height: height, src: src, data: data) 33 | } 34 | context.log(message: "Couldn't find image `\(src)`") 35 | } catch { 36 | context.log(error: error) 37 | } 38 | return SVGURLImage(x: x, y: y, width: width, height: height, src: src, data: nil) 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /Source/Parser/SVG/Elements/SVGTextParser.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SVGTextParser.swift 3 | // SVGView 4 | // 5 | // Created by Yuri Strot on 29.05.2022. 6 | // 7 | 8 | import SwiftUI 9 | 10 | class SVGTextParser: SVGBaseElementParser { 11 | override func doParse(context: SVGNodeContext, delegate: (XMLElement) -> SVGNode?) -> SVGNode? { 12 | let fontName = context.style("font-family") ?? "Serif" 13 | let fontSize = context.value(.fontSize) 14 | let fontWeight = context.style("font-weight") ?? "normal" 15 | let font = SVGFont(name: fontName, size: fontSize, weight: fontWeight) 16 | let textAnchor = parseTextAnchor(context.style("text-anchor")) 17 | 18 | let x = SVGHelper.parseCGFloat(context.properties, "x") 19 | let y = SVGHelper.parseCGFloat(context.properties, "y") 20 | let transform = CGAffineTransform(translationX: x, y: y) 21 | 22 | if let textNode = context.element.contents.first as? XMLText { 23 | let trimmed = textNode.text.trimmingCharacters(in: .whitespacesAndNewlines).processingWhitespaces() 24 | return SVGText(text: trimmed, font: font, fill: SVGHelper.parseFill(context.styles, context.index), stroke: SVGHelper.parseStroke(context.styles, index: context.index), textAnchor: textAnchor, transform: transform) 25 | } 26 | return .none 27 | } 28 | 29 | private func parseTextAnchor(_ string: String?) -> HorizontalAlignment { 30 | if let anchor = string { 31 | if anchor == "middle" { 32 | return .center 33 | } else if anchor == "end" { 34 | return .trailing 35 | } 36 | } 37 | return .leading 38 | } 39 | 40 | static var whitespaceRegex = try! NSRegularExpression(pattern: "\\s+", options: NSRegularExpression.Options.caseInsensitive) 41 | 42 | } 43 | 44 | extension String { 45 | 46 | fileprivate func processingWhitespaces() -> String { 47 | let range = NSMakeRange(0, self.count) 48 | let modString = SVGTextParser.whitespaceRegex.stringByReplacingMatches(in: self, options: [], range: range, withTemplate: " ") 49 | return modString 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Source/Parser/SVG/SVGParserExtensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SVGParserExtensions.swift 3 | // SVGView 4 | // 5 | // Created by Yuri Strot on 25.05.2022. 6 | // 7 | 8 | import CoreGraphics 9 | 10 | extension CGFloat { 11 | 12 | var degreesToRadians: CGFloat { 13 | return self * .pi / 180 14 | } 15 | 16 | } 17 | 18 | extension String { 19 | 20 | var cgFloatValue: CGFloat? { 21 | if let value = Double(self) { 22 | return CGFloat(value) 23 | } 24 | return .none 25 | } 26 | } 27 | 28 | extension CGAffineTransform { 29 | 30 | func shear(shx: CGFloat = 0, shy: CGFloat = 0) -> CGAffineTransform { 31 | return CGAffineTransform(a: a + c * shy, b: b + d * shy, 32 | c: a * shx + c, d: b * shx + d, tx: tx, ty: ty) 33 | } 34 | 35 | } 36 | 37 | extension Dictionary where Key == String { 38 | 39 | subscript(ignoreCase key: Key) -> Value? { 40 | get { 41 | if let k = keys.first(where: { $0.caseInsensitiveCompare(key) == .orderedSame }) { 42 | return self[k] 43 | } 44 | return nil 45 | } 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /Source/Parser/SVG/SVGView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SVGView.swift 3 | // SVGView 4 | // 5 | // Created by Alisa Mylnikova on 20/08/2020. 6 | // 7 | 8 | import SwiftUI 9 | 10 | public struct SVGView: View { 11 | 12 | public let svg: SVGNode? 13 | 14 | public init(contentsOf url: URL) { 15 | self.svg = SVGParser.parse(contentsOf: url) 16 | } 17 | 18 | @available(*, deprecated, message: "Use (contentsOf:) initializer instead") 19 | public init(fileURL: URL) { 20 | self.svg = SVGParser.parse(contentsOf: fileURL) 21 | } 22 | 23 | public init(data: Data) { 24 | self.svg = SVGParser.parse(data: data) 25 | } 26 | 27 | public init(string: String) { 28 | self.svg = SVGParser.parse(string: string) 29 | } 30 | 31 | public init(stream: InputStream) { 32 | self.svg = SVGParser.parse(stream: stream) 33 | } 34 | 35 | public init(xml: XMLElement) { 36 | self.svg = SVGParser.parse(xml: xml) 37 | } 38 | 39 | public init(svg: SVGNode) { 40 | self.svg = svg 41 | } 42 | 43 | public func getNode(byId id: String) -> SVGNode? { 44 | return svg?.getNode(byId: id) 45 | } 46 | 47 | public var body: some View { 48 | svg?.toSwiftUI() 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /Source/Parser/SVG/Settings/SVGLinker.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SVGLinker.swift 3 | // SVGView 4 | // 5 | // Created by Yuri Strot on 27.05.2022. 6 | // 7 | 8 | import Foundation 9 | 10 | public class SVGLinker { 11 | 12 | public static let none = SVGLinker() 13 | 14 | public static func base(url: URL) -> SVGLinker { 15 | return SVGURLLinker(url: url) 16 | } 17 | 18 | public static func relative(to svgURL: URL) -> SVGLinker { 19 | return SVGURLLinker(url: svgURL.deletingLastPathComponent()) 20 | } 21 | 22 | public func load(src: String) throws -> Data? { 23 | return nil 24 | } 25 | 26 | } 27 | 28 | class SVGURLLinker: SVGLinker { 29 | 30 | let url: URL 31 | 32 | init(url: URL) { 33 | self.url = url 34 | } 35 | 36 | public override func load(src: String) throws -> Data? { 37 | let url = url.appendingPathComponent(src) 38 | return try Data(contentsOf: url) 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Source/Parser/SVG/Settings/SVGLogger.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SVGLogger.swift 3 | // SVGView 4 | // 5 | // Created by Yuri Strot on 26.05.2022. 6 | // 7 | 8 | import Foundation 9 | 10 | public class SVGLogger { 11 | 12 | public static let console = SVGLogger() 13 | 14 | public func log(message: String) { 15 | print(message) 16 | } 17 | 18 | public func log(error: Error) { 19 | log(message: error.localizedDescription) 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /Source/Parser/SVG/Settings/SVGScreen.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SVGScreen.swift 3 | // SVGView 4 | // 5 | // Created by Yuri Strot on 27.05.2022. 6 | // 7 | 8 | import CoreGraphics 9 | 10 | struct SVGScreen { 11 | 12 | static func main(ppi: Double) -> SVGScreen { 13 | // TODO: need to use UIScreen / NSScreen for this 14 | return SVGScreen(ppi: ppi, width: 100, height: 100) 15 | } 16 | 17 | let ppi: Double 18 | let width: Double 19 | let height: Double 20 | 21 | } 22 | -------------------------------------------------------------------------------- /Source/Parser/SVG/Settings/SVGSettings.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SVGSettings.swift 3 | // SVGView 4 | // 5 | // Created by Yuri Strot on 29.05.2022. 6 | // 7 | 8 | import Foundation 9 | import CoreGraphics 10 | 11 | public struct SVGSettings { 12 | 13 | public static let `default` = SVGSettings() 14 | 15 | public let linker: SVGLinker 16 | public let logger: SVGLogger 17 | public let fontSize: CGFloat 18 | public let ppi: Double 19 | 20 | public init(linker: SVGLinker = .none, logger: SVGLogger = .console, fontSize: CGFloat = 16, ppi: CGFloat = 96) { 21 | self.linker = linker 22 | self.logger = logger 23 | self.fontSize = fontSize 24 | self.ppi = ppi 25 | } 26 | 27 | func linkIfNeeded(to svgURL: URL) -> SVGSettings { 28 | if linker === SVGLinker.none { 29 | return SVGSettings(linker: .relative(to: svgURL), logger: logger, fontSize: fontSize, ppi: ppi) 30 | } 31 | return self 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /Source/Parser/XML/XMLNode.swift: -------------------------------------------------------------------------------- 1 | import SwiftUI 2 | 3 | public protocol XMLNode { 4 | } 5 | 6 | public class XMLElement: XMLNode { 7 | 8 | public let name: String 9 | public var contents: [XMLNode] = [] 10 | public var attributes: [String: String] 11 | 12 | public init(name: String, attributes: [String: String]) { 13 | self.name = name 14 | self.attributes = attributes 15 | } 16 | } 17 | 18 | public class XMLText: XMLNode { 19 | 20 | public var text: String 21 | 22 | public init(text: String) { 23 | self.text = text 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /Source/SVGView.h: -------------------------------------------------------------------------------- 1 | // 2 | // SVGView.h 3 | // SVGView 4 | // 5 | // Created by Alisa Mylnikova on 10/08/2020. 6 | // 7 | 8 | #import 9 | 10 | //! Project version number for SVGView. 11 | FOUNDATION_EXPORT double SVGViewVersionNumber; 12 | 13 | //! Project version string for SVGView. 14 | FOUNDATION_EXPORT const unsigned char SVGViewVersionString[]; 15 | 16 | // In this header, you should import all the public headers of your framework using statements like #import 17 | 18 | 19 | -------------------------------------------------------------------------------- /Source/Serialization/Serializable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Serializable.swift 3 | // SVGView 4 | // 5 | // Created by Yuriy Strot on 18.01.2021. 6 | // 7 | 8 | import Foundation 9 | 10 | protocol SerializableAtom { 11 | 12 | func serialize() -> String 13 | 14 | } 15 | 16 | protocol SerializableOption { 17 | 18 | func isDefault() -> Bool 19 | 20 | func serialize() -> String 21 | 22 | } 23 | 24 | protocol SerializableBlock { 25 | 26 | func serialize(_ serializer: Serializer) 27 | 28 | } 29 | 30 | protocol SerializableElement: SerializableBlock { 31 | 32 | var id: String? { get } 33 | 34 | var typeName: String { get } 35 | 36 | } 37 | 38 | protocol SerializableEnum: SerializableOption, RawRepresentable, CaseIterable, Equatable where Self.RawValue == String { 39 | 40 | } 41 | 42 | extension SerializableEnum { 43 | 44 | func isDefault() -> Bool { 45 | return self == type(of: self).allCases.first 46 | } 47 | 48 | func serialize() -> String { 49 | return rawValue 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /script-test-cases.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cd "SVGViewTests" 4 | 5 | function generateTest() { 6 | RES="// Generated by script-test-cases.sh\n\n" 7 | RES+="import XCTest\n" 8 | RES+="@testable import SVGView\n\n" 9 | RES+="class $2: BaseTestCase {\n\n" 10 | RES+=" override var dir: String {\n" 11 | RES+=" return \"$1\"\n" 12 | RES+=" }\n\n" 13 | 14 | REFS=$(find "w3c/$1/refs/" -type f -regex '.*\.ref$' | sort) 15 | 16 | for F in $REFS; do 17 | NAME="$(basename ${F%.*})" 18 | ARR=(${NAME//-/ }) 19 | TEST_NAME="" 20 | for A in "${ARR[@]}"; do 21 | TEST_NAME+=$(printf "%s" "${A:0:1}" | tr '[:lower:]' '[:upper:]')${A:1} 22 | done 23 | RES+=" func test$TEST_NAME() {\n" 24 | RES+=" compareToReference(\"$NAME\")\n" 25 | RES+=" }\n\n" 26 | done 27 | 28 | RES+="}" 29 | 30 | echo "$RES" > ../SVGViewTests/$2.swift 31 | } 32 | 33 | generateTest "1.1F2" "SVG11Tests" 34 | generateTest "1.2T" "SVG12Tests" 35 | -------------------------------------------------------------------------------- /w3c-coverage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BASE_DIR="SVGViewTests" 4 | cd $BASE_DIR 5 | 6 | HEADER="# W3C SVG Test Suite Coverage\n\n" 7 | HEADER+="This page is automatically generated and shows actual coverage of the [W3C SVG Test Suite](https://github.com/web-platform-tests/wpt/tree/master/svg) by this \`SVGView\` implementation. " 8 | HEADER+="Currently there are two standards supported: [SVG 1.1 (Second Edition)](https://www.w3.org/TR/SVG11/) and [SVG Tiny 1.2](https://www.w3.org/TR/SVGTiny12/).\n\n" 9 | FOOTER="" 10 | 11 | function addTitle() { 12 | HEADER+=" * [$2](#$3): " 13 | REF_COUNT=$(find "w3c/$1/refs" -type f -regex '.*\.ref$' | wc -l | xargs) 14 | SVG_COUNT=$(find "w3c/$1/svg" -type f -regex '.*\.svg$' | wc -l | xargs) 15 | 16 | PERCENT=$((REF_COUNT * 1000 / SVG_COUNT)) 17 | PERCENT_FORMAT="$((PERCENT / 10)).$((PERCENT % 10))" 18 | HEADER+="\`$PERCENT_FORMAT%\`\n" 19 | 20 | FOOTER+="\n## [$2]($4)\n\n" 21 | FOOTER+="\`$PERCENT_FORMAT%\` of tests covered ($REF_COUNT/$SVG_COUNT). " 22 | FOOTER+="They can be splitted into following categories:\n" 23 | 24 | SUBTITLES="$(find "w3c/$1/svg" -type f -name '*.svg' | cut -f4 -d"/" | cut -f1 -d"-" | sort -u)" 25 | for ST in $SUBTITLES; do 26 | addSubTitle "$ST" "$1" "$4" "$5" 27 | done 28 | } 29 | 30 | function addSubTitle() { 31 | # uppercase first character 32 | TITLE="$(tr '[:lower:]' '[:upper:]' <<< ${1:0:1})${1:1}" 33 | HEADER+=" * [$TITLE](#$1-$4): " 34 | REF_COUNT=$(find "w3c/$2/refs" -type f -name "$1-*" | wc -l | xargs) 35 | SVG_COUNT=$(find "w3c/$2/svg" -type f -name "$1-*" | wc -l | xargs) 36 | 37 | PERCENT=$((REF_COUNT * 1000 / SVG_COUNT)) 38 | PERCENT_FORMAT="$((PERCENT / 10)).$((PERCENT % 10))" 39 | HEADER+="\`$PERCENT_FORMAT%\`\n" 40 | 41 | FOOTER+="\n### [$TITLE]($3$1.html): \`$PERCENT_FORMAT%\`\n\n" 42 | 43 | FOOTER+="
\n" 44 | FOOTER+=" ($REF_COUNT/$SVG_COUNT) tests covered...\n\n" 45 | FOOTER+="|Status | Name|\n" 46 | FOOTER+="|------|-------|\n" 47 | 48 | SVGS="$(find "w3c/$2/svg" -type f -name "$1-*" | sort)" 49 | for F in $SVGS; do 50 | BASENAME=$(basename ${F%.*}) 51 | FILENAME="w3c/$2/refs/$BASENAME.ref" 52 | if [ -f "$FILENAME" ]; then 53 | FOOTER+="|✅|" 54 | else 55 | FOOTER+="|❌|" 56 | fi 57 | FOOTER+="[$BASENAME]($BASE_DIR/$F)|\n" 58 | done 59 | 60 | FOOTER+="
\n" 61 | } 62 | 63 | addTitle "1.1F2" "SVG 1.1 (Second Edition)" "svg-11-second-edition" "https://www.w3.org/TR/SVG11/" "1" 64 | addTitle "1.2T" "SVG Tiny 1.2" "svg-tiny-12" "https://www.w3.org/TR/SVGTiny12/" "2" 65 | 66 | echo "$HEADER$FOOTER" > ../w3c-coverage.md 67 | --------------------------------------------------------------------------------