Comments (5)
<svg viewBox="-10 0 50 20" xmlns="http://www.w3.org/2000/svg">
<!-- No dash array -->
<line x1="0" y1="1" x2="30" y2="1" stroke="black" />
<!-- No dash offset -->
<line x1="0" y1="3" x2="30" y2="3" stroke="black" stroke-dasharray="3.4 1.3 2 0.5" stroke-linecap="butt" />
<line x1="0" y1="5" x2="30" y2="5" stroke="blue"
stroke-dasharray="3.4 1.3 2 0.5" stroke-dashoffset="1.2" />
<line x1="0" y1="6.1" x2="30" y2="6.1" stroke="blue"
stroke-dasharray="3.4 1.3 2 0.5" stroke-dashoffset="8.4" />
<line x1="0" y1="8" x2="30" y2="8" stroke="blue"
stroke-dasharray="3.4 1.3 2 0.5" stroke-dashoffset="4.1" />
<line x1="0" y1="9.1" x2="30" y2="9.1" stroke="blue"
stroke-dasharray="3.4 1.3 2 0.5" stroke-dashoffset="11.3" />
<line x1="0" y1="11" x2="30" y2="11" stroke="blue"
stroke-dasharray="3.4 1.3 2 0.5" stroke-dashoffset="5.7" />
<line x1="0" y1="12.1" x2="30" y2="12.1" stroke="blue"
stroke-dasharray="3.4 1.3 2 0.5" stroke-dashoffset="12.9" />
</svg>
result from tvg after my changes (as expected):
need to test negative values of offset and will be ready :)
from thorvg.
Great, I'm looking forward to the result. :-)
from thorvg.
@hermet
changing api like this Result stroke(const float* dashPattern, uint32_t cnt, float offset = 0.0f) noexcept;
will cause a problem, because we have already Result stroke(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255) noexcept;
so calling stroke(0, 255, 0) is ambiguous.
I'm not sure how to solve this... we could remove the def value of a
but I assume that it's a common api, so probably not the best idea. so a new Result dashOffset(float offset)
api?
from thorvg.
how about -> strokeDash(dashPattern, patternCnt, offset) ?
from thorvg.
ok, you already pushed a patch. Reverting alpha value might be better to go for now.
from thorvg.
Related Issues (20)
- Enhance Lottie feature
- Scene clipping - doesn't work properly
- Windows build error due to strip option HOT 6
- vcpkg-tool-meson tool is too old. HOT 1
- Improve Code quality HOT 2
- fix broken svg loader HOT 4
- simple svg renders incorrectly HOT 2
- Introduce TVG Window port HOT 5
- Masking chaining bug
- Support dash offset in TVG binary
- cross compile on mcu HOT 1
- thread safety issue HOT 6
- Thread issues (Godot) HOT 1
- Support Merging-Path property in Lottie HOT 1
- lottie: Expressions Support HOT 2
- Lottie stacking order issue HOT 1
- Lottie Trimpath+Dash+Offset doesn work.
- Incorrect blending issue at InvLumaMasking
- Version 0.10.x fails to build with `NOMINMAX` on VS 2017 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thorvg.