ranger-compiler 3.5.1 → 3.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1064 -20
- package/LICENSE +3 -1
- package/README.md +123 -28
- package/dist/Lang.rgr +1188 -290
- package/dist/api.d.ts +2343 -879
- package/dist/api.js +79923 -56921
- package/dist/lib/JSON.rgr +102 -91
- package/dist/lib/Shell.rgr +4 -4
- package/dist/lib/apple/AppleToolchain.rgr +4 -4
- package/dist/lib/apple/README.md +5 -4
- package/dist/lib/apple/apple_test.rgr +1 -1
- package/dist/lib/core/README.md +1 -1
- package/dist/lib/evg/EVG.rgr +12 -0
- package/dist/lib/evg/EVGA11yFromTree.rgr +302 -0
- package/dist/lib/evg/EVGA11yTree.rgr +894 -0
- package/dist/lib/evg/EVGBox.rgr +267 -0
- package/dist/lib/evg/EVGBoxShorthandTest.rgr +220 -0
- package/dist/lib/evg/EVGCodepoint.rgr +316 -0
- package/dist/lib/evg/EVGColor.rgr +700 -0
- package/dist/lib/evg/EVGCommands.rgr +177 -0
- package/dist/lib/evg/EVGComponent.rgr +331 -0
- package/dist/lib/evg/EVGComponentTest.rgr +387 -0
- package/dist/lib/evg/EVGConnector.rgr +541 -0
- package/dist/lib/evg/EVGConnectorTest.rgr +306 -0
- package/dist/lib/evg/EVGDisplayList.rgr +4186 -0
- package/dist/lib/evg/EVGEasing.rgr +370 -0
- package/dist/lib/evg/EVGEffectTest.rgr +253 -0
- package/dist/lib/evg/EVGElement.rgr +4914 -0
- package/dist/lib/evg/EVGFixedTest.rgr +289 -0
- package/dist/lib/evg/EVGFlexRulesTest.rgr +317 -0
- package/dist/lib/evg/EVGFlexWrapTest.rgr +246 -0
- package/dist/lib/evg/EVGFling.rgr +244 -0
- package/dist/lib/evg/EVGFocus.rgr +400 -0
- package/dist/lib/evg/EVGFocusTest.rgr +399 -0
- package/dist/lib/evg/EVGGradient.rgr +322 -0
- package/dist/lib/evg/EVGGrapheme.rgr +190 -0
- package/dist/lib/evg/EVGGrid.rgr +975 -0
- package/dist/lib/evg/EVGHitTest.rgr +208 -0
- package/dist/lib/evg/EVGHoles.rgr +294 -0
- package/dist/lib/evg/EVGHostMeasurerTest.rgr +281 -0
- package/dist/lib/evg/EVGHostTextMeasurer.rgr +331 -0
- package/dist/lib/evg/EVGHostTree.rgr +834 -0
- package/dist/lib/evg/EVGHostTreeTest.rgr +447 -0
- package/dist/lib/evg/EVGImageDecode.rgr +117 -0
- package/dist/lib/evg/EVGImageMeasurer.rgr +86 -0
- package/dist/lib/evg/EVGInspect.rgr +883 -0
- package/dist/lib/evg/EVGInvalidateTest.rgr +432 -0
- package/dist/lib/evg/EVGJsonTest.rgr +535 -0
- package/dist/lib/evg/EVGLayout.rgr +4220 -0
- package/dist/lib/evg/EVGMeasure.rgr +1267 -0
- package/dist/lib/evg/EVGOverlayTest.rgr +626 -0
- package/dist/lib/evg/EVGPatch.rgr +1721 -0
- package/dist/lib/evg/EVGPatchTest.rgr +692 -0
- package/dist/lib/evg/EVGPopoverTest.rgr +395 -0
- package/dist/lib/evg/EVGReconcile.rgr +226 -0
- package/dist/lib/evg/EVGReconcileTest.rgr +421 -0
- package/dist/lib/evg/EVGReject.rgr +126 -0
- package/dist/lib/evg/EVGRelayoutTest.rgr +375 -0
- package/dist/lib/evg/EVGRtlLayoutTest.rgr +319 -0
- package/dist/lib/evg/EVGRuler.rgr +232 -0
- package/dist/lib/evg/EVGRulerTest.rgr +172 -0
- package/dist/lib/evg/EVGSelectChrome.rgr +178 -0
- package/dist/lib/evg/EVGStyleCacheTest.rgr +419 -0
- package/dist/lib/evg/EVGStyleSheet.rgr +2148 -0
- package/dist/lib/evg/EVGStyleStateTest.rgr +407 -0
- package/dist/lib/evg/EVGStyleVarTest.rgr +471 -0
- package/dist/lib/evg/EVGText.rgr +105 -0
- package/dist/lib/evg/EVGTextEngine.rgr +536 -0
- package/dist/lib/evg/EVGTextMeasurer.rgr +720 -0
- package/dist/lib/evg/EVGTimingTest.rgr +1417 -0
- package/dist/lib/evg/EVGToolbar.rgr +1369 -0
- package/dist/lib/evg/EVGTransition.rgr +728 -0
- package/dist/lib/evg/EVGTreeJson.rgr +721 -0
- package/dist/lib/evg/EVGUnit.rgr +554 -0
- package/dist/lib/evg/EVGViewportUnitTest.rgr +236 -0
- package/dist/lib/evg/EvgApp.rgr +189 -0
- package/dist/lib/evg/EvgBitmapTracer.rgr +4277 -0
- package/dist/lib/evg/EvgBitmapTracerTest.rgr +2119 -0
- package/dist/lib/evg/EvgHost.rgr +451 -0
- package/dist/lib/evg/EvgTest.rgr +91 -0
- package/dist/lib/evg/EvgTraceColor.rgr +236 -0
- package/dist/lib/evg/EvgTraceCurve.rgr +648 -0
- package/dist/lib/evg/EvgTraceFit.rgr +767 -0
- package/dist/lib/evg/EvgTracePath.rgr +435 -0
- package/dist/lib/evg/EvgTraceTypes.rgr +559 -0
- package/dist/lib/evg/EvgViewport.rgr +313 -0
- package/dist/lib/evg/FxDemoDoc.rgr +185 -0
- package/dist/lib/evg/HOSTS.md +227 -0
- package/dist/lib/evg/ISSUES.md +835 -0
- package/dist/lib/evg/PLAN_ACCESSIBILITY.md +650 -0
- package/dist/lib/evg/PLAN_CSS_LAYOUT_AND_FONTS.md +1124 -0
- package/dist/lib/evg/PLAN_EFFECTS.md +431 -0
- package/dist/lib/evg/PLAN_EVG.md +518 -0
- package/dist/lib/evg/PLAN_EVG_RENDERER.md +1674 -0
- package/dist/lib/evg/PLAN_INSPECTOR.md +788 -0
- package/dist/lib/evg/PLAN_LINKS_AND_FORMS.md +157 -0
- package/dist/lib/evg/PLAN_NATIVE_HOSTS.md +671 -0
- package/dist/lib/evg/PLAN_VECTOR_IR.md +664 -0
- package/dist/lib/evg/PLAN_VIEW_TRANSFORM.md +322 -0
- package/dist/lib/evg/PathBuilder.rgr +333 -0
- package/dist/lib/evg/README.md +1236 -0
- package/dist/lib/evg/SPEC.md +1252 -0
- package/dist/lib/evg/SVGPathParser.rgr +1199 -0
- package/dist/lib/evg/SvgParser.rgr +1736 -0
- package/dist/lib/evg/TODO_EVG_RENDERER.md +595 -0
- package/dist/lib/evg/VectorShapes.rgr +331 -0
- package/dist/lib/evg/VectorStroke.rgr +107 -0
- package/dist/lib/evg/VectorViewBox.rgr +380 -0
- package/dist/lib/evg/agent/README.md +290 -0
- package/dist/lib/evg/agent/evg_agent.rgr +899 -0
- package/dist/lib/evg/agent/fixtures/broken.evg.json +7 -0
- package/dist/lib/evg/agent/fixtures/card.evg.json +9 -0
- package/dist/lib/evg/agent/fixtures/connector.css +63 -0
- package/dist/lib/evg/agent/fixtures/connector.evg.json +14 -0
- package/dist/lib/evg/agent/fixtures/drawn.evg.json +129 -0
- package/dist/lib/evg/agent/fixtures/gradient.evg.json +4 -0
- package/dist/lib/evg/agent/fixtures/popover.css +99 -0
- package/dist/lib/evg/agent/fixtures/popover.evg.json +30 -0
- package/dist/lib/evg/agent/roundtrip.sh +74 -0
- package/dist/lib/evg/agent/smoke.sh +230 -0
- package/dist/lib/evg/android/README.md +97 -0
- package/dist/lib/evg/android/androidstubs/AndroidStubs.kt +175 -0
- package/dist/lib/evg/android/androidstubs/Annotation.kt +10 -0
- package/dist/lib/evg/android/androidstubs/App.kt +30 -0
- package/dist/lib/evg/android/androidstubs/Content.kt +41 -0
- package/dist/lib/evg/android/androidstubs/ContentRes.kt +12 -0
- package/dist/lib/evg/android/androidstubs/InputMethod.kt +46 -0
- package/dist/lib/evg/android/androidstubs/Net.kt +6 -0
- package/dist/lib/evg/android/androidstubs/Os.kt +30 -0
- package/dist/lib/evg/android/androidstubs/Util.kt +15 -0
- package/dist/lib/evg/android/androidstubs/View.kt +113 -0
- package/dist/lib/evg/android/androidstubs/Widget.kt +16 -0
- package/dist/lib/evg/android/src/android/kotlin/fi/ranger/evg/AndroidEvgSurface.kt +323 -0
- package/dist/lib/evg/android/src/android/kotlin/fi/ranger/evg/AndroidTextMeasurer.kt +56 -0
- package/dist/lib/evg/android/src/android/kotlin/fi/ranger/evg/RippleEffect.kt +262 -0
- package/dist/lib/evg/android/src/awt/kotlin/fi/ranger/evg/AwtEvgSurface.kt +238 -0
- package/dist/lib/evg/android/src/awt/kotlin/fi/ranger/evg/AwtTextMeasurer.kt +85 -0
- package/dist/lib/evg/android/src/main/kotlin/fi/ranger/evg/EvgEngineThread.kt +115 -0
- package/dist/lib/evg/android/src/main/kotlin/fi/ranger/evg/EvgPainter.kt +231 -0
- package/dist/lib/evg/android/src/main/kotlin/fi/ranger/evg/EvgSurface.kt +117 -0
- package/dist/lib/evg/android/src/main/kotlin/fi/ranger/evg/RecordingSurface.kt +94 -0
- package/dist/lib/evg/apple/README.md +128 -0
- package/dist/lib/evg/apple/Sources/CoreGraphicsEvgSurface.swift +329 -0
- package/dist/lib/evg/apple/Sources/CoreTextMeasurer.swift +70 -0
- package/dist/lib/evg/apple/Sources/EvgEngineQueue.swift +105 -0
- package/dist/lib/evg/apple/Sources/EvgPainter.swift +225 -0
- package/dist/lib/evg/apple/Sources/EvgSurface.swift +163 -0
- package/dist/lib/evg/apple/Sources/RecordingSurface.swift +110 -0
- package/dist/lib/evg/bench/EvgLayoutBench.rgr +34 -0
- package/dist/lib/evg/bench/README.md +64 -0
- package/dist/lib/evg/bench/layout-bench.mjs +316 -0
- package/dist/lib/evg/bench/layout-cases.mjs +510 -0
- package/dist/lib/evg/bench/layout-conformance.mjs +254 -0
- package/dist/lib/evg/bin/.gitignore +17 -0
- package/dist/lib/evg/evg_test.rgr +313 -0
- package/dist/lib/evg/gl/README.md +198 -0
- package/dist/lib/evg/gl/a11y-paint-check.mjs +73 -0
- package/dist/lib/evg/gl/blur-check.mjs +399 -0
- package/dist/lib/evg/gl/boxmodel.json +1 -0
- package/dist/lib/evg/gl/demo.html +46 -0
- package/dist/lib/evg/gl/effect-presets.css +285 -0
- package/dist/lib/evg/gl/effect-presets.js +63 -0
- package/dist/lib/evg/gl/effect-shots.mjs +135 -0
- package/dist/lib/evg/gl/evg-a11y.js +566 -0
- package/dist/lib/evg/gl/evg-binary.js +160 -0
- package/dist/lib/evg/gl/evg-engine.js +296 -0
- package/dist/lib/evg/gl/evg-fx.js +237 -0
- package/dist/lib/evg/gl/evg-gestures.js +209 -0
- package/dist/lib/evg/gl/evg-list.js +167 -0
- package/dist/lib/evg/gl/evg-measure.js +186 -0
- package/dist/lib/evg/gl/evg-textinput.js +303 -0
- package/dist/lib/evg/gl/evg-view.js +144 -0
- package/dist/lib/evg/gl/evg-webgl.js +3942 -0
- package/dist/lib/evg/gl/fx-check.mjs +998 -0
- package/dist/lib/evg/gl/fx-demo.html +166 -0
- package/dist/lib/evg/gl/fx-demo.js +2 -0
- package/dist/lib/evg/gl/fx-serve.mjs +47 -0
- package/dist/lib/evg/gl/gestures-check.mjs +189 -0
- package/dist/lib/evg/gl/list-binary-check.mjs +152 -0
- package/dist/lib/evg/gl/measure-check.mjs +135 -0
- package/dist/lib/evg/gl/rotation-check.mjs +207 -0
- package/dist/lib/evg/gl/shift-check.mjs +113 -0
- package/dist/lib/evg/gl/stroke-check.mjs +168 -0
- package/dist/lib/evg/gl/text-snap-check.mjs +139 -0
- package/dist/lib/evg/gl/view-check.mjs +343 -0
- package/dist/lib/evg/gl/view-policy-check.mjs +184 -0
- package/dist/lib/evg/html/evg-dom.js +318 -0
- package/dist/lib/evg/html/evg-html.js +600 -0
- package/dist/lib/evg/inspect/README.md +415 -0
- package/dist/lib/evg/inspect/browser-smoke.mjs +115 -0
- package/dist/lib/evg/inspect/evg-inspect.js +947 -0
- package/dist/lib/evg/inspect/shots/css.png +0 -0
- package/dist/lib/evg/inspect/shots/dashboard.png +0 -0
- package/dist/lib/evg/inspect/shots/pptx-slide.png +0 -0
- package/dist/lib/evg/inspect/shots/state.png +0 -0
- package/dist/lib/evg/inspect/shots.mjs +226 -0
- package/dist/lib/evg/oracle/css-blur.json +576 -0
- package/dist/lib/evg/oracle/css-box.json +157 -0
- package/dist/lib/evg/oracle/css-timing.json +709 -0
- package/dist/lib/evg/oracle/css_blur_oracle.mjs +529 -0
- package/dist/lib/evg/oracle/css_box_oracle.mjs +106 -0
- package/dist/lib/evg/oracle/css_timing_oracle.mjs +389 -0
- package/dist/lib/evg/original/EVGColor.clj +310 -0
- package/dist/lib/evg/original/EVGColorContext.rgr +178 -0
- package/dist/lib/evg/original/SVGPath.rgr +627 -0
- package/dist/lib/evg/original/Vec2.crgr +103 -0
- package/dist/lib/evg/ranger.json +9 -0
- package/dist/lib/evg/showcase/README.md +246 -0
- package/dist/lib/evg/showcase/assets/emblem.svg +30 -0
- package/dist/lib/evg/showcase/assets/rosette.svg +22 -0
- package/dist/lib/evg/showcase/build.mjs +651 -0
- package/dist/lib/evg/showcase/pages/album.tsx +30 -0
- package/dist/lib/evg/showcase/pages/boxmodel.tsx +37 -0
- package/dist/lib/evg/showcase/pages/cards.tsx +41 -0
- package/dist/lib/evg/showcase/pages/chart_api.tsx +170 -0
- package/dist/lib/evg/showcase/pages/charts.tsx +219 -0
- package/dist/lib/evg/showcase/pages/drawing.tsx +160 -0
- package/dist/lib/evg/showcase/pages/emoji.tsx +91 -0
- package/dist/lib/evg/showcase/pages/flex.tsx +46 -0
- package/dist/lib/evg/showcase/pages/more.tsx +332 -0
- package/dist/lib/evg/showcase/pages/plots.tsx +262 -0
- package/dist/lib/evg/showcase/pages/svg.tsx +63 -0
- package/dist/lib/evg/showcase/pages/tables.tsx +209 -0
- package/dist/lib/evg/showcase/pages/typography.tsx +43 -0
- package/dist/lib/evg/showcase/pages/units.tsx +35 -0
- package/dist/lib/evg/showcase/pages/variants.tsx +233 -0
- package/dist/lib/evg/showcase/pages/vector.tsx +75 -0
- package/dist/lib/evg/showcase/pages/views.tsx +223 -0
- package/dist/lib/evg/showcase/tests/chart_api_smoke.mjs +339 -0
- package/dist/lib/evg/showcase/tests/gl_smoke.mjs +125 -0
- package/dist/lib/evg/showcase/themes/chart_api-default.css +15 -0
- package/dist/lib/evg/showcase/themes/charts-default.css +29 -0
- package/dist/lib/evg/showcase/themes/drawing-default.css +35 -0
- package/dist/lib/evg/showcase/themes/more-default.css +128 -0
- package/dist/lib/evg/showcase/themes/plots-default.css +18 -0
- package/dist/lib/evg/showcase/themes/showcase.css +508 -0
- package/dist/lib/evg/showcase/themes/tables-default.css +123 -0
- package/dist/lib/evg/showcase/themes/variants-default.css +15 -0
- package/dist/lib/evg/showcase/themes/views-default.css +15 -0
- package/dist/lib/evg/tools/bench_vs_potrace.mjs +290 -0
- package/dist/lib/evg/tools/evg_image_tool.rgr +488 -0
- package/dist/lib/evg/tools/evg_trace_bench.rgr +114 -0
- package/dist/lib/evg/tools/evg_trace_cli.rgr +662 -0
- package/dist/lib/evg/tools/evg_trace_cpp_bench.rgr +83 -0
- package/dist/lib/evg/tools/run_trace_bench.sh +74 -0
- package/dist/lib/evg/tools/run_trace_cli_smoke.sh +128 -0
- package/dist/lib/evg/web/responsive/EvgResponsiveCheck.rgr +271 -0
- package/dist/lib/evg/web/responsive/EvgResponsiveDemo.rgr +531 -0
- package/dist/lib/evg/web/responsive/README.md +97 -0
- package/dist/lib/evg/web/responsive/build.mjs +90 -0
- package/dist/lib/evg/web/responsive/dom-check.mjs +169 -0
- package/dist/lib/evg/web/responsive/index.html +177 -0
- package/dist/lib/evg/web/responsive/smoke.mjs +221 -0
- package/dist/lib/evg/web/tools/assets-client.mjs +95 -0
- package/dist/lib/evg/web/tools/boot-bench.mjs +189 -0
- package/dist/lib/evg/web/tools/inline-assets.mjs +119 -0
- package/dist/lib/evg/web/tools/minify.mjs +60 -0
- package/dist/lib/evg/web/tracer/build.mjs +87 -0
- package/dist/lib/evg/web/tracer/index.html +2805 -0
- package/dist/lib/evg/web/tracer/sample.png +0 -0
- package/dist/lib/evg/web/tracer/smoke.mjs +1162 -0
- package/dist/lib/evgr/Cargo.lock +21 -0
- package/dist/lib/evgr/Cargo.toml +19 -0
- package/dist/lib/evgr/README.md +140 -0
- package/dist/lib/evgr/bench/NativeBench.rgr +246 -0
- package/dist/lib/evgr/bench/compare.mjs +252 -0
- package/dist/lib/evgr/bench/speed.mjs +277 -0
- package/dist/lib/evgr/bin/.gitignore +3 -0
- package/dist/lib/evgr/src/bin/bench.rs +106 -0
- package/dist/lib/evgr/src/bin/smoke.rs +13 -0
- package/dist/lib/evgr/src/grid.rs +730 -0
- package/dist/lib/evgr/src/lib.rs +1003 -0
- package/dist/lib/evgr/src/style.rs +468 -0
- package/dist/lib/evgr/src/text.rs +83 -0
- package/dist/lib/image/BitReader.rgr +171 -0
- package/dist/lib/image/Buffer.rgr +173 -0
- package/dist/lib/image/DCT.rgr +283 -0
- package/dist/lib/image/Deflate.rgr +339 -0
- package/dist/lib/image/HuffmanDecoder.rgr +181 -0
- package/dist/lib/image/ImageBuffer.rgr +706 -0
- package/dist/lib/image/JPEGDecoder.rgr +808 -0
- package/dist/lib/image/PNGDecoder.rgr +544 -0
- package/dist/lib/image/PNGEncoder.rgr +388 -0
- package/dist/lib/image/PPMImage.rgr +224 -0
- package/dist/lib/image/ProgressiveJPEGDecoder.rgr +1154 -0
- package/dist/lib/image/README.md +33 -0
- package/dist/lib/image/RasterBuffer.rgr +294 -0
- package/dist/lib/image/VP8BoolDecoder.rgr +163 -0
- package/dist/lib/image/WebPDecoder.rgr +433 -0
- package/dist/lib/image/WebPLossless.rgr +1035 -0
- package/dist/lib/image/WebPLossy.rgr +1929 -0
- package/dist/lib/image/ranger.json +9 -0
- package/dist/lib/image/testdata/webp/anim_2f_24x16.webp +0 -0
- package/dist/lib/image/testdata/webp/fixtures.txt +33 -0
- package/dist/lib/image/testdata/webp/gen_fixtures.py +261 -0
- package/dist/lib/image/testdata/webp/ll_1x1.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_alpha_29x21.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_gradient_64x64.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_meta_32x32.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_noise_17x9.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_pal11_23x11.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_pal2_19x7.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_pal40_16x16.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_pal4_13x5.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_photo_40x30.webp +0 -0
- package/dist/lib/image/testdata/webp/ll_predictors_64x32.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_1x1.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_raw_f0_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_raw_f1_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_raw_f2_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_raw_f3_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_vp8l_f0_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_vp8l_f1_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_vp8l_f2_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alph_vp8l_f3_21x13.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_alpha_33x17.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_exif_15x11.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_i16_96x80.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_nofilter_24x20.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_odd_17x9.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_photo_48x40.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_q100_20x18.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_sharp_40x36.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_simple_filter_33x31.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_vpx_parts8_37x45.webp +0 -0
- package/dist/lib/image/testdata/webp/ly_vpx_skip_96x80.webp +0 -0
- package/dist/lib/image/tests/WebPDecodeTool.rgr +81 -0
- package/dist/lib/image/tests/WebPDecoderTest.rgr +1162 -0
- package/dist/lib/image/tests/run_webp_tests.sh +39 -0
- package/dist/lib/rust/RsJson.rgr +468 -0
- package/dist/lib/rust/RsPrelude.rgr +1663 -0
- package/dist/lib/shell_test.rgr +7 -7
- package/dist/lib/stdlib.rgr +21 -5
- package/dist/lib/zip/ranger.json +6 -0
- package/dist/rgrc.js +87318 -67610
- package/package.json +1010 -1040
- package/dist/README.md +0 -117
- package/dist/package.json +0 -47
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
class Vec2 {
|
|
2
|
+
def x:double 0.0
|
|
3
|
+
def y:double 0.0
|
|
4
|
+
sfn CreateNew:Vec2 (i:double j:double) {
|
|
5
|
+
def v (new Vec2)
|
|
6
|
+
v.x = i
|
|
7
|
+
v.y = j
|
|
8
|
+
return v
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
class Mat2 {
|
|
13
|
+
def m0 1.0
|
|
14
|
+
def m1 0.0
|
|
15
|
+
def m2 0.0
|
|
16
|
+
def m3 1.0
|
|
17
|
+
def m4 0.0
|
|
18
|
+
def m5 0.0
|
|
19
|
+
|
|
20
|
+
fn toIdentity () {
|
|
21
|
+
m0 = 1.0
|
|
22
|
+
m1 = 0.0
|
|
23
|
+
m2 = 0.0
|
|
24
|
+
m3 = 1.0
|
|
25
|
+
m4 = 0.0
|
|
26
|
+
m5 = 0.0
|
|
27
|
+
}
|
|
28
|
+
fn setTranslate( tx:double ty:double ) {
|
|
29
|
+
m4 = tx
|
|
30
|
+
m5 = ty
|
|
31
|
+
}
|
|
32
|
+
fn setScale( sx:double sy:double ) {
|
|
33
|
+
m1 = sx
|
|
34
|
+
m3 = sy
|
|
35
|
+
}
|
|
36
|
+
fn setSkewX ( v:double ) {
|
|
37
|
+
m0 = 1.0
|
|
38
|
+
m1 = 0.0
|
|
39
|
+
m2 = (tan v)
|
|
40
|
+
m3 = 1.0
|
|
41
|
+
m4 = 0.0
|
|
42
|
+
m5 = 0.0
|
|
43
|
+
}
|
|
44
|
+
fn setSkewY ( v:double ) {
|
|
45
|
+
m0 = 1.0
|
|
46
|
+
m1 = (tan v)
|
|
47
|
+
m2 = 0.0
|
|
48
|
+
m3 = 1.0
|
|
49
|
+
m4 = 0.0
|
|
50
|
+
m5 = 0.0
|
|
51
|
+
}
|
|
52
|
+
fn setRotation( v:double ) {
|
|
53
|
+
def cs (cos v)
|
|
54
|
+
def sn (sin v)
|
|
55
|
+
m0 = cs
|
|
56
|
+
m1 = sn
|
|
57
|
+
m2 = -1.0 * sn
|
|
58
|
+
m3 = cs
|
|
59
|
+
m4 = 0.0
|
|
60
|
+
m5 = 0.0
|
|
61
|
+
}
|
|
62
|
+
fn multiply ( b:Mat2 ) {
|
|
63
|
+
def t0 (m0*b.m0 + m1 * b.m2)
|
|
64
|
+
def t2 (m2*b.m0 + m3 * b.m2)
|
|
65
|
+
def t4 (m4*b.m0 + m5 * b.m2 + b.m4)
|
|
66
|
+
|
|
67
|
+
m1 = (m0 * b.m1 + m1 * b.m3)
|
|
68
|
+
m3 = (m2 * b.m1 + m3 * b.m3)
|
|
69
|
+
m5 = (m4 * b.m1 + m5 * b.m3 + b.m5)
|
|
70
|
+
m0 = t0
|
|
71
|
+
m2 = t2
|
|
72
|
+
m4 = t4
|
|
73
|
+
}
|
|
74
|
+
fn inverse:Mat2 () {
|
|
75
|
+
def invdet ( m0 * m3 - m2 * m1 )
|
|
76
|
+
def det invdet
|
|
77
|
+
if( (det > -0.0001) && (det < 0.0001)) {
|
|
78
|
+
this.toIdentity()
|
|
79
|
+
return this
|
|
80
|
+
}
|
|
81
|
+
invdet = 1.0 / det
|
|
82
|
+
def inv (new Mat2)
|
|
83
|
+
inv.m0 = m3 * invdet
|
|
84
|
+
inv.m2 = -1.0 * m2 * invdet
|
|
85
|
+
inv.m4 = m2 * m5 - m3 * m4 * invdet
|
|
86
|
+
inv.m1 = -1.0 * m1 * invdet
|
|
87
|
+
inv.m3 = m0 * invdet
|
|
88
|
+
inv.m5 = m1 * m4 - m0 * m5 * invdet
|
|
89
|
+
return inv
|
|
90
|
+
}
|
|
91
|
+
fn transformPoint:Vec2 ( v:Vec2 ) {
|
|
92
|
+
def res (new Vec2)
|
|
93
|
+
res.x = ( v.x * m0 + v.y * m2 + m4)
|
|
94
|
+
res.y = ( v.x * m1 + v.y * m3 + m5)
|
|
95
|
+
return res
|
|
96
|
+
}
|
|
97
|
+
fn rotateVector:Vec2 ( v:Vec2 ) {
|
|
98
|
+
def res (new Vec2)
|
|
99
|
+
res.x = ( v.x * m0 + v.y * m2 )
|
|
100
|
+
res.y = ( v.x * m1 + v.y * m3 )
|
|
101
|
+
return res
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
# EVG showcase
|
|
2
|
+
|
|
3
|
+
A gallery of what the EVG layout engine can do, built from this directory and
|
|
4
|
+
published to `/evg/` on the project's GitHub Pages site.
|
|
5
|
+
|
|
6
|
+
```
|
|
7
|
+
npm run showcase # -> lib/evg/showcase/dist/index.html
|
|
8
|
+
npm run showcase:gl # check the WebGL viewer actually drew the pages
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The index opens with a list of every page, because fourteen sections is more
|
|
12
|
+
than a reader should have to scroll past to find one. Each entry opens the rendered
|
|
13
|
+
page itself; the *details* link beside it jumps to that page's section, where
|
|
14
|
+
its other themes and its PDF, PNG and WebGL versions are.
|
|
15
|
+
|
|
16
|
+
Each page is rendered under **two themes** — the generated chart pages under
|
|
17
|
+
**three**, adding `autumn` — and to **three targets** — PDF (the
|
|
18
|
+
print target), PNG (the raster preview) and HTML (the debug view) — from one
|
|
19
|
+
source tree and one stylesheet.
|
|
20
|
+
|
|
21
|
+
### Live pages (not pre-rendered)
|
|
22
|
+
|
|
23
|
+
Everything else here is drawn ahead of time and published as a file.
|
|
24
|
+
|
|
25
|
+
[`chart-api/`](../../../gallery/vela/web/chart_api.html) **runs**: it loads Vela's chart
|
|
26
|
+
API — compiled from `gallery/vela/tools/vela_chart_web.rgr` to a browser bundle
|
|
27
|
+
— and calls it with what a reader types, redrawing as they edit. The page
|
|
28
|
+
speaks **JavaScript** first: the bundle publishes the compiled `VlChart`,
|
|
29
|
+
`VlChartMark` and `VlDataset`, and `chart.bar().x("region")` in the editor is
|
|
30
|
+
those classes' own methods, with no binding layer in between. **Ranger** is the
|
|
31
|
+
second tab, through a small dispatcher, and the same chart in either language
|
|
32
|
+
draws the same SVG byte for byte. A PDF proves the API built a chart once on a
|
|
33
|
+
build machine; this is what proves the API still runs where the reader is.
|
|
34
|
+
`npm run showcase:api` opens it in Chromium and checks all of it — 22 checks.
|
|
35
|
+
|
|
36
|
+
[`responsive/`](../web/responsive/) is the one whose LAYOUT is what runs. It is
|
|
37
|
+
a page as wide as the browser window, laid out again on every resize by the
|
|
38
|
+
compiled engine — `@media` blocks resolved against the window, `4vw` margins,
|
|
39
|
+
a card grid that goes from four columns to one — and the browser is handed
|
|
40
|
+
finished pixels, not a tree to lay out. Drag the window edge and the whole
|
|
41
|
+
pipeline runs again. `npm run evg:responsive:web:serve` builds it and serves it
|
|
42
|
+
at <http://localhost:8007/>; `npm run evg:responsive:check` asserts the same
|
|
43
|
+
breakpoints in Node, by counting where the boxes landed, and
|
|
44
|
+
`npm run evg:responsive:web:smoke` drives the built page in Chromium.
|
|
45
|
+
|
|
46
|
+
[`tracer/`](../web/tracer/) is the third live page: upload a JPEG/PNG, tweak
|
|
47
|
+
Potrace-style parameters, and vectorize with the compiled `EvgBitmapTracer`.
|
|
48
|
+
To run it on your own machine, `npm run evg:trace:web:serve` builds the page
|
|
49
|
+
and serves it at <http://localhost:8006/>. Everything happens in the browser —
|
|
50
|
+
decode, quantize, trace — so no image ever leaves the machine. Opening
|
|
51
|
+
`dist/index.html` off disk works too for images you drop on it, but the *try the
|
|
52
|
+
sample* button needs a real origin, so the served page is the one that works
|
|
53
|
+
whole. Build alone with `npm run evg:trace:web` (output lands in
|
|
54
|
+
`lib/evg/web/tracer/dist/`); the showcase build ships the same files to
|
|
55
|
+
`/evg/tracer/` on Pages. `npm run evg:trace:web:smoke` opens it in Chromium and
|
|
56
|
+
checks it.
|
|
57
|
+
|
|
58
|
+
Erazer, which treats the bitmap as a **UI** rather than a photograph (a
|
|
59
|
+
screenshot in, nested widgets out), now lives in its own repository:
|
|
60
|
+
[terotests/Erazer](https://github.com/terotests/Erazer).
|
|
61
|
+
|
|
62
|
+
The same tracer runs from a command line, with no page and no browser:
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
npm run evg:trace:cli -- in.png out.svg --preset broken
|
|
66
|
+
npm run evg:trace:cli -- photo.jpg out.svg --colorCount 12 --paletteMute 130
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The option names are the fields of `EvgTraceOptions`, so there is nothing extra
|
|
70
|
+
to learn — `--colorCount 12` sets `colorCount`, and an unrecognised name is
|
|
71
|
+
refused rather than ignored. The two paths may come anywhere among the options
|
|
72
|
+
(`in.jpg --colorCount 4 out.svg` works), and an option may be written
|
|
73
|
+
`--name value` or `--name=value`. Presets are `lineart`, `poster`, `photo`, `print`
|
|
74
|
+
and `broken`. PNG and JPEG (baseline and progressive) are decoded by
|
|
75
|
+
[`tools/evg_trace_cli.rgr`](../tools/evg_trace_cli.rgr) itself, so the compiled
|
|
76
|
+
program is one self-contained file with nothing to install.
|
|
77
|
+
|
|
78
|
+
Because it is Ranger, that file can be any of them:
|
|
79
|
+
|
|
80
|
+
| | build | run |
|
|
81
|
+
| --- | --- | --- |
|
|
82
|
+
| Node | `npm run evg:trace:cli:run` (already built) | ~0.45 s |
|
|
83
|
+
| Python | `npm run evg:trace:cli:py` → one `.py`, stdlib only | ~4.8 s |
|
|
84
|
+
| C++ | `npm run evg:trace:cli:cpp` → one `.cpp`, then `g++` | ~0.19 s |
|
|
85
|
+
| Rust | `npm run evg:trace:cli:rust` → one `.rs`, then `rustc` | ~0.21 s |
|
|
86
|
+
|
|
87
|
+
`npm run evg:trace:cli:smoke` builds all four and asserts they produce the
|
|
88
|
+
same SVG byte for byte — which is the claim worth testing, since a difference
|
|
89
|
+
in integer division or float printing between targets would otherwise surface
|
|
90
|
+
as a picture somebody notices months later.
|
|
91
|
+
|
|
92
|
+
The page does not stop at the trace. *Esikäsittely* edits the bitmap before
|
|
93
|
+
anything is quantized, and *Muokkaa* edits the drawing afterwards: **Tarkennin**
|
|
94
|
+
re-vectorizes what you drag over with a palette taken from that spot alone,
|
|
95
|
+
**Yhdistä** gives a shape the color in the picker, **Pehmennä** takes the
|
|
96
|
+
corners out of an outline, and **Taikasauva** picks an object out — click
|
|
97
|
+
to grow a selection by color, or draw a rough outline by hand and let the
|
|
98
|
+
shapes decide where the edge really is — and then cuts everything else away,
|
|
99
|
+
leaving the object alone on transparency, which is how you get an icon out of a
|
|
100
|
+
photograph. Every one of them is one undo step per gesture, and *Palauta* goes
|
|
101
|
+
back to the trace.
|
|
102
|
+
|
|
103
|
+
### Eight pages are generated
|
|
104
|
+
|
|
105
|
+
`pages/charts.tsx`, `plots.tsx`, `more.tsx`, `views.tsx`, `variants.tsx`,
|
|
106
|
+
`tables.tsx`, `drawing.tsx` and `chart_api.tsx` are written by a tool, not by
|
|
107
|
+
hand: `npm run vela:showcase` runs a set of Vega specifications
|
|
108
|
+
through the [Vela](../../../gallery/vela/README.md) runtime and emits the paths and labels
|
|
109
|
+
they produce, together with a stylesheet each.
|
|
110
|
+
|
|
111
|
+
**Charts** is the six chart types most people mean by the word. **Chart types**
|
|
112
|
+
is the rest, and the features only some charts have — a size legend whose rows
|
|
113
|
+
are all different heights, a stroke legend, a log axis that labels only some of
|
|
114
|
+
the ticks it draws, two marks sharing one plot, and text as a mark. **More chart
|
|
115
|
+
types** is what the runtime learned most recently, and exercises the most of it:
|
|
116
|
+
a continuous colour ramp with a gradient key, a series that is a faceted group,
|
|
117
|
+
a stack centred on a common line, a calendar on an axis, and a box plot whose
|
|
118
|
+
quartiles are computed. **More than one chart** is the multi-view grammar: a
|
|
119
|
+
trellis by column, by row, and wrapped onto a grid whose shape is computed from
|
|
120
|
+
the data, plus two plots concatenated.
|
|
121
|
+
|
|
122
|
+
**Charts, called** is the only page here that no specification was written
|
|
123
|
+
for. Every chart on it is built by CALLING Vela's chart API
|
|
124
|
+
([`VlChart.rgr`](../../../gallery/vela/src/VlChart.rgr)), and the lines printed above each
|
|
125
|
+
chart are the calls that built it — read out of
|
|
126
|
+
[`vela_chart_page.rgr`](../../../gallery/vela/tools/vela_chart_page.rgr)'s own source at
|
|
127
|
+
the markers around each chart's calls, so the code the page shows and the code
|
|
128
|
+
that drew the page cannot drift apart. It is also the page that says what the
|
|
129
|
+
API is for: a view's encoding is inherited by its marks, so an area and the
|
|
130
|
+
line over it are two marks with one set of axes, and no channel on the page
|
|
131
|
+
states its type — a column of ISO dates is an instant and a column of numbers
|
|
132
|
+
is a quantity, read off the data.
|
|
133
|
+
|
|
134
|
+
**Variants** is the same marks drawn a different way — bars that go down as well
|
|
135
|
+
as up, bars on their side, a bar between two values rather than from a baseline,
|
|
136
|
+
a line that steps instead of sloping, a line showing its own vertices, a single
|
|
137
|
+
row of ticks, a shape legend, and a mean drawn across the plot. It is the
|
|
138
|
+
variants that break a runtime rather than the types. **Tables** is the plots
|
|
139
|
+
where the cell is the datum: both axes categories, or both bins, and the value
|
|
140
|
+
carried by the cell's colour, its area, or the number printed in it.
|
|
141
|
+
|
|
142
|
+
*More than one chart* is the page whose size is not a size anyone declared. A trellis is
|
|
143
|
+
as wide as its panels and the furniture between them, so it is *shaped* to fit a
|
|
144
|
+
printed column rather than sized to fit one — nine panels three across is three
|
|
145
|
+
rows and fits; two across is five rows and does not. A concatenation has no
|
|
146
|
+
width of its own to hand down either, so each pane says how big it is.
|
|
147
|
+
|
|
148
|
+
They exist to be varied rather than pretty, and they earn their keep: four
|
|
149
|
+
defects in the runtime were sitting in charts that differ from the tested ones
|
|
150
|
+
only by being smaller.
|
|
151
|
+
|
|
152
|
+
It follows the same rule as the hand-written pages. A chart's series are
|
|
153
|
+
numbered in the order it draws them — `chartFill0`, `chartStroke0` — and the
|
|
154
|
+
stylesheet paints them, so the same charts come out in every palette. The
|
|
155
|
+
generated stylesheet carries the colours the specifications asked for as
|
|
156
|
+
*unscoped* rules, which makes them the default: a theme's scoped rules override
|
|
157
|
+
them, and a build with no chart theme still draws the chart the spec described.
|
|
158
|
+
|
|
159
|
+
The charts have no background of their own; the page shows through.
|
|
160
|
+
|
|
161
|
+
## The rule the gallery follows
|
|
162
|
+
|
|
163
|
+
Nothing in `pages/*.tsx` carries a visual attribute. No colours, no sizes, no
|
|
164
|
+
spacing. The pages say *what is on the page*; `themes/showcase.css` says how it
|
|
165
|
+
looks. That is the whole demonstration: swapping `-theme editorial` for
|
|
166
|
+
`-theme studio` re-skins every page without touching a line of the tree.
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
evg-pdf pages/album.tsx album.pdf -css themes/showcase.css -theme editorial
|
|
170
|
+
evg-png pages/album.tsx album.png -css themes/showcase.css -theme studio
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
The supported CSS subset is documented in `lib/evg/EVGStyleSheet.rgr`:
|
|
174
|
+
`.class`, `.theme-<name> .class`, selector lists, and a cascade of
|
|
175
|
+
unscoped < theme-scoped < attributes authored in the TSX.
|
|
176
|
+
|
|
177
|
+
## Pages
|
|
178
|
+
|
|
179
|
+
| Page | Shows |
|
|
180
|
+
| --- | --- |
|
|
181
|
+
| `album` | `grid-template-areas`, spans, `object-fit: cover`, gaps |
|
|
182
|
+
| `cards` | **row `subgrid`** — three captions of different lengths on one baseline |
|
|
183
|
+
| `typography` | real TTF metrics, GPOS kerning, `align-items: baseline`, UTF-8 → WinAnsi |
|
|
184
|
+
| `units` | `px % em rem`, and `pt pc in mm cm` all pinned to the reference pixel |
|
|
185
|
+
| `flex` | `flex` shorthand, `flex-shrink: 0`, `justify-content`, `flex-wrap` |
|
|
186
|
+
| `emoji` | grapheme clusters, GSUB ligatures, Type0/Identity-H embedding, `emoji-color` |
|
|
187
|
+
| `boxmodel` | padding, per-side padding, borders, nesting, margins |
|
|
188
|
+
| `charts` | **generated** — Vega specs run by [`gallery/vela`](../../../gallery/vela/README.md) and drawn as path data; series colours come from the theme, in three palettes |
|
|
189
|
+
|
|
190
|
+
`units` is the one worth reading twice: five bars declared in five different
|
|
191
|
+
units come out exactly the same length, because CSS defines them all against
|
|
192
|
+
the reference pixel. `em` follows the block's own font-size while `rem` stays
|
|
193
|
+
with the root, which is why those two differ on purpose.
|
|
194
|
+
|
|
195
|
+
## Adding a page
|
|
196
|
+
|
|
197
|
+
1. Drop `pages/<name>.tsx` in, using classes only.
|
|
198
|
+
2. Add the classes it needs to `themes/showcase.css`, under both themes.
|
|
199
|
+
3. Add an entry to the `PAGES` array in `build.mjs` — its title, one sentence
|
|
200
|
+
on what it demonstrates, and the tags shown under the heading.
|
|
201
|
+
|
|
202
|
+
The build prints every warning the engine emitted while rendering, and the
|
|
203
|
+
gallery page lists them. A page that provokes a warning is a page that found
|
|
204
|
+
something; the index says so rather than hiding it.
|
|
205
|
+
|
|
206
|
+
## Known limits, visible here
|
|
207
|
+
|
|
208
|
+
- **JPEG decode quality on the raster target.** The PNG preview decodes photos
|
|
209
|
+
with the repository's own decoder, which shows visible block artefacts. The
|
|
210
|
+
PDF path embeds the original file untouched, so print output is unaffected.
|
|
211
|
+
The gallery renders the same page both ways, so the difference is easy to see.
|
|
212
|
+
- The raster preview samples nearest-neighbour when scaling a photo into its
|
|
213
|
+
box, which is honest for a layout preview and not what a printer does.
|
|
214
|
+
|
|
215
|
+
## What building this found
|
|
216
|
+
|
|
217
|
+
The gallery was not only a way to show the engine off — rendering real pages
|
|
218
|
+
turned up five bugs that every existing test had missed, because each one was
|
|
219
|
+
silent:
|
|
220
|
+
|
|
221
|
+
- **Composite glyphs were never drawn.** `ä`, `ö`, `å`, `é` are a base letter
|
|
222
|
+
plus a diacritic in most fonts, and the raster path skipped that whole glyph
|
|
223
|
+
kind while still reserving its advance. Finnish text came out with holes in
|
|
224
|
+
it: *päivää* rendered as *piv*.
|
|
225
|
+
- **Bold was measured in the regular cut.** The renderers append `-Bold` to the
|
|
226
|
+
family at paint time; layout never did. A bold heading was measured narrow
|
|
227
|
+
and drawn wide, so it wrapped a line later than the box it had been given —
|
|
228
|
+
and in PDF, `font-weight` did nothing at all because the bold face was never
|
|
229
|
+
embedded.
|
|
230
|
+
- **Grid items resolved percentages against the grid, not their cell.** Every
|
|
231
|
+
`width: 100%` item in a spread was laid out at the full grid width and they
|
|
232
|
+
all overlapped.
|
|
233
|
+
- **The raster target had no image support**, so a photo book rendered to PNG
|
|
234
|
+
came out with the text and none of the pictures.
|
|
235
|
+
- **An explicit `grid-template-rows` was dropped** when the container had no
|
|
236
|
+
declared height, so `170px auto` on an auto-height deck sized every row from
|
|
237
|
+
content and the fixed band disappeared.
|
|
238
|
+
- **The browser re-broke a line EVG had already fitted.** The `emoji` page's
|
|
239
|
+
tinted rows are shrink-wrapped, so the box carries EVG's own measurement to a
|
|
240
|
+
few decimals — and Chromium, summing the same advances, landed 288.719 against
|
|
241
|
+
a declared 288.701. A hundredth of a pixel wrapped the last glyph onto a
|
|
242
|
+
second line and pushed every absolutely-positioned box below it out of place.
|
|
243
|
+
A label the engine fitted on one line now says `white-space: nowrap`, so the
|
|
244
|
+
browser overflows rather than deciding the break again.
|
|
245
|
+
|
|
246
|
+
Each is now covered by the browser-parity gates in `gallery/pdf_writer/test/`.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!-- The other kind of imported file: one that brings its own palette, its own
|
|
3
|
+
groups and its own transforms, and must come out the same in all three
|
|
4
|
+
targets. The shield inherits its fill from the group; the band is a
|
|
5
|
+
rotated group; the counter in the ring is a hole rather than a second
|
|
6
|
+
disc, which is the fill rule doing its job on geometry that arrived from a
|
|
7
|
+
file rather than from the page. -->
|
|
8
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 120" width="100" height="120">
|
|
9
|
+
<title>An emblem</title>
|
|
10
|
+
<defs>
|
|
11
|
+
<circle id="stud" cx="0" cy="0" r="4"/>
|
|
12
|
+
</defs>
|
|
13
|
+
|
|
14
|
+
<g fill="#2f4858">
|
|
15
|
+
<path d="M50,4 L94,20 L94,66 C94,92 74,110 50,116 C26,110 6,92 6,66 L6,20 Z"/>
|
|
16
|
+
</g>
|
|
17
|
+
|
|
18
|
+
<g transform="translate(50,58) rotate(-18)">
|
|
19
|
+
<rect x="-40" y="-9" width="80" height="18" fill="#f6c453"/>
|
|
20
|
+
</g>
|
|
21
|
+
|
|
22
|
+
<path
|
|
23
|
+
fill="#e0e6ea"
|
|
24
|
+
fill-rule="evenodd"
|
|
25
|
+
d="M50,30 A16 16 0 1 1 49.99,30 Z M50,40 A6 6 0 1 0 49.99,40 Z"/>
|
|
26
|
+
|
|
27
|
+
<use href="#stud" x="22" y="96" fill="#f6c453"/>
|
|
28
|
+
<use href="#stud" x="50" y="104" fill="#f6c453"/>
|
|
29
|
+
<use href="#stud" x="78" y="96" fill="#f6c453"/>
|
|
30
|
+
</svg>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!-- A rosette written the way a drawing tool writes one: the petal exists
|
|
3
|
+
once, and everything else is that petal referenced again at a different
|
|
4
|
+
angle. Nothing here names a colour, so the drawing takes the paint of the
|
|
5
|
+
element that hosts it — which is what lets the gallery's rule hold for an
|
|
6
|
+
imported file too: the file is geometry, the stylesheet is appearance. -->
|
|
7
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
8
|
+
<defs>
|
|
9
|
+
<path id="petal" d="M50,50 C58,32 58,20 50,8 C42,20 42,32 50,50 Z"/>
|
|
10
|
+
</defs>
|
|
11
|
+
<g>
|
|
12
|
+
<use href="#petal"/>
|
|
13
|
+
<use href="#petal" transform="rotate(45 50 50)"/>
|
|
14
|
+
<use href="#petal" transform="rotate(90 50 50)"/>
|
|
15
|
+
<use href="#petal" transform="rotate(135 50 50)"/>
|
|
16
|
+
<use href="#petal" transform="rotate(180 50 50)"/>
|
|
17
|
+
<use href="#petal" transform="rotate(225 50 50)"/>
|
|
18
|
+
<use href="#petal" transform="rotate(270 50 50)"/>
|
|
19
|
+
<use href="#petal" transform="rotate(315 50 50)"/>
|
|
20
|
+
</g>
|
|
21
|
+
<circle cx="50" cy="50" r="5"/>
|
|
22
|
+
</svg>
|