Comments (6)
Sorry for my lateness
Document:: translate
appends a translation matrix to the root
element transformation matrix which is the same as premultiply.
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform
from lunasvg.
I think this is debatable; The specification states that the transforms should be applied in the order provided
, so Document::translate
prepends to the list, it does not append to it.
I would argue this is not what most people would expect, but in any case if you are confident this is the way to go, this should be documented. Right now the documentation is not really explicit about the order of operation.
from lunasvg.
I would argue this is not what most people would expect.
Graphics engines like QPainter, Skia, Cairo etc. implicit translate
is the same as preTranslate
.
from lunasvg.
That's interesting, I was under the impression cairo_scale
, cairo_translate
, etc. were post-multiplications.
Skia, which I am less familiar with, is indeed a pre-translate (which is very well documented)
void SkCanvas::translate(SkScalar dx, SkScalar dy)
Translates SkMatrix by dx along the x-axis and dy along the y-axis.
Mathematically, replaces SkMatrix with a translation matrix premultiplied with SkMatrix.
from lunasvg.
Updated b76594b
from lunasvg.
from lunasvg.
Related Issues (20)
- Another edge artifacts HOT 3
- Default fill color HOT 1
- Some gradients don't render correctly HOT 11
- Blank files will not load HOT 1
- plutovg as a dependency HOT 1
- How to use lunasvg as a parser HOT 4
- add <image> support HOT 3
- One image doesn't render correctly HOT 1
- Not an issue, just thanks for this awesome library HOT 1
- CMAKE_C_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELEASE -Oz crash
- Images don't render correctly when exceeding canvas size HOT 3
- Rendering issues/regressions (fill/pattern) ? HOT 2
- Undefined behavior at plutovg using lunasvg's svg2png example HOT 2
- Undefined Behavior Case HOT 14
- Pixel array to 2d array representation HOT 3
- Vertical line artifact for some odd sized images
- Rendering issue (mismatch with other SVG libraries) HOT 4
- If root opacity is set to 0.15 then stroking around the image is now bad. HOT 1
- Binary size HOT 1
- Recent commit causes issues on Windows, macOS and Linux HOT 15
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 lunasvg.