Implementing SVG attribute "stroke-miterlimit" ( tdf#48066)
Armin Le Grand
armin_le_grand at me.com
Mon Apr 11 11:24:34 UTC 2016
comments inline :-)
Am 10.04.2016 um 00:46 schrieb Regina Henschel:
> Hi all,
> I have put a patch to Gerrit https://gerrit.libreoffice.org/#/c/23946/
> It does only rendering, MetaActions are missing. But it is already so
> large, that I think a review would be good before I continue. Because
> I can only build and test on Windows, I would be glad, if you would
> test and review it for Linux and MacOSX.
I cannot help with Mac - have no possibility to build currently myself.
I can do a linux build - you can do that too on a VirtualMachine, I use
> For the warning-break  on MacOSX from Jenkins I need some help. I
> cannot compile or test on Mac.
> The value fMiterMinimumAngle has to be used in case eLineJoin ==
> basegfx::B2DLineJoin::Miter in OpenGLSalGraphicsImpl::DrawPolyLine
> around line 886.
> In content this has to happen in that place:
> if ('current miter length' > 'miter limit')
> then use the same statements as in case Bevel
> else use the statement in line 892.
> But I'm not sure about the meaning of variable 'length' in line#885.
> The MetaPolyLineAction gets a LineInfo and a tools::Polygon, but
> LineInfo does neither contain miter minimum angle nor miter limit.
> Therefore my question is, how to resolve it. Making a total new
> MetaAction? Or extend LineInfo (similar as ExtLineInfo in pdfwriter)?
> Or extend MetaPolyLineAction to take a PolygonStrokePrimitive2D or a
> B2DPolyPolygon plus the needed line and stroke information separate?
Hard to say. It belongs logically to LineInfo, so I would opt to put it
there. MetaActions support new versions, so the old will ignore the new
values, the new can read them. It is necessary to set useful defaults
when old Metafile is loaded, not to forget!
> The module com::sun::star::rendering has a struct StrokeAttributes,
> which would contain all needed information. How is that currently
> used? Is it useful?
A fast grep shows that it is used in canvas and cppcanvas. It uses
sal_Int8 for Cap and Join types, this makes it less useful from my POV...
> Kind regards
> error: unused parameter 'fMiterMinimumAngle' [-Werror,-Wunused-parameter]
> void OpenGLSalGraphicsImpl::DrawPolyLine(const basegfx::B2DPolygon&
> rPolygon, float fLineWidth, basegfx::B2DLineJoin eLineJoin,
> css::drawing::LineCap eLineCap, float fMiterMinimumAngle)
ALG (PGP Key: EE1C 4B3F E751 D8BC C485 DEC1 3C59 F953 D81C F4A2)
More information about the LibreOffice