Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add basic svg element #279

Merged
merged 2 commits into from
May 14, 2023
Merged

feat: add basic svg element #279

merged 2 commits into from
May 14, 2023

Conversation

XGHeaven
Copy link
Member

@XGHeaven XGHeaven commented Mar 10, 2023

Support the basic usage of svg to render icon.
More implements will be add in the future.

  • SVG element support presentation attributes
  • New style add
    • fill (partial test)
    • stroke (partial test)
    • x (non test)
    • y (non test)
    • fill-rule (full test with <path>)
    • stroke-width (partial test)
    • stroke-linecap (full test with <path>)
    • stroke-linejoin (full test with <path>)
  • Element
    • <svg> (non tests, added in the future)
    • <rect> (partial tests, just used for test )
    • <path>
      • d full test
    • <text> (non tests, added in the future)
    • <g> (non tests, added in the future)
  • DOM Interface (non tests, just a empty class)
    • SVGElement
    • SVGRectElement
    • SVGGElement
    • SVGTextElement
    • SVGPathElement
    • And other super classess..
  • Integration Test
    • Add SVG spec group.
    • Add svg_loader to compile svg test file.
    • Add resizeViewport function to resize the viewport.
      Because some svg test file needs the larger viewport.
    • toMatchSnapshot support accept blob file to compare.
      No png file generated.
    • Add getSnapshot/cacheSnapshot/matchCacheSnapshot function
      to implement compare the snapshots of two frame.

@XGHeaven XGHeaven force-pushed the feat/svg-element branch 3 times, most recently from b09fb46 to 3fb2802 Compare March 12, 2023 13:33
@XGHeaven XGHeaven force-pushed the feat/svg-element branch 3 times, most recently from 2cb5647 to 6b16fba Compare April 5, 2023 15:18
@XGHeaven XGHeaven force-pushed the feat/svg-element branch 3 times, most recently from 975f852 to 2c95a19 Compare April 17, 2023 16:30
@XGHeaven XGHeaven force-pushed the feat/svg-element branch 2 times, most recently from 8c7bbf7 to 5049928 Compare April 26, 2023 14:24
@XGHeaven XGHeaven changed the title [WIP] feat: add basic svg element feat: add basic svg element Apr 27, 2023
@XGHeaven XGHeaven marked this pull request as ready for review April 27, 2023 03:28
@XGHeaven XGHeaven force-pushed the feat/svg-element branch 5 times, most recently from 4d67adc to 1d32e9c Compare May 1, 2023 12:05
Support the basic usage of svg to render icon.
More implements will be add in the future.

- SVG element support presentation attributes
- New style add
  - [x] `fill` (partial test)
  - [x] `stroke` (partial test)
  - [x] `x` (non test)
  - [x] `y` (non test)
  - [x] `fill-rule` (full test with `<path>`)
  - [x] `stroke-width` (partial test)
  - [x] `stroke-linecap` (full test with `<path>`)
  - [x] `stroke-linejoin` (full test with `<path>`)
- Element
  - [x] `<svg>` (non tests, added in the future)
  - [x] `<rect>` (partial tests, just used for test <path>)
  - [x] `<path>`
    - [x] `d` full test
  - [x] `<text>` (non tests, added in the future)
  - [x] `<g>` (non tests, added in the future)
- DOM Interface (non tests, just a empty class)
  - [x] `SVGElement`
  - [x] `SVGRectElement`
  - [x] `SVGGElement`
  - [x] `SVGTextElement`
  - [x] `SVGPathElement`
  - [x] And other super classess..
- Integration Test
  - [x] Add SVG spec group.
  - [x] Add `svg_loader` to compile svg test file.
  - [x] Add `resizeViewport` function to resize the viewport.
        Because some svg test file needs the larger viewport.
  - [x] `toMatchSnapshot` support accept blob file to compare.
        No png file generated.
  - [x] Add `getSnapshot`/`cacheSnapshot`/`matchCacheSnapshot` function
        to implement compare the snapshots of two frame.
@andycall andycall added this pull request to the merge queue May 14, 2023
Merged via the queue into main with commit 86dd3c5 May 14, 2023
@andycall andycall deleted the feat/svg-element branch May 14, 2023 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants