Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Graphics APIs typically use a definable world transform (affine matrix) and then draw objects.
The caller provides a matrix (optionally), and later draws a picture object (svg) to a destination rectangle (typically has svg aspect ratio).
I've found SvgReader.DrawImage(), but this cannot work for this purpose, but img size should remain unchanged, SvgReader.RootElement (picture object) needs to know the world transform, which shall transform the destination rectangle (and svg).
Edited: It could be possible with a modified version
TSvgReader.DrawImage2( img: TImage32; const parentTransform: TMatrixD; const dstRect: TRectD);
This one preserves the incoming img size, and di.matrix is created by more parameters (parentTransform, viewbox-to-dstRect)
Beta Was this translation helpful? Give feedback.
All reactions