SETMETERLIMIT record

Chris Sherlock chris.sherlock79 at gmail.com
Wed Dec 4 22:47:01 UTC 2019


On Thu, Dec 5, 2019 at 7:30 AM Thorsten Behrens <thb at libreoffice.org> wrote:

> Hey Chris,
>
> Chris Sherlock wrote:
> > I’m trying to work out how to implement the SETMETERLIMIT EMF record.
> >
> > Can anyone point me to the spot where we implement bevelling?
> >
> We discussed on IRC earlier this week, below the log for reference -
> did that solve the question for you?
>
>  chris_wot: thorsten! hey, can you help me out?
>  chris_wot: do you know what does line mitering?
>  chris_wot: is it in basegfx?
>  quikee[m]: the vcl polyline accepts miter limit as an parameter
>  thorsten: yep, fwict the method noelgrandin gave does that
>  ***chris_wot relooks at the code
>  chris_wot: you mean basegfx/source/polygon/b2dlinegeometry.cxx ?
>  thorsten: yep
>  chris_wot: thorsten how do I set the miter limit though?
>  thorsten: chris_wot: see vcl/headless/svpgdi.cxx:    // convert miter
> minimum angle to miter limit for how to convert between the two related
> ways to express that
>  chris_wot: legend
>  chris_wot: thorsten is it the line double fMiterLimit = 1.0 / sin(
> fMiterMinimumAngle / 2.0);
>  chris_wot: as I want to do this indepently of the angle
>  chris_wot: which is what SETMITERLIMIT does...
>  chris_wot: thorsten something like this -
> https://www.partnersoftware.com/documentation/MP/v4.5.26/mp_wblegendlinestylemiterlimit.png
>  thorsten: chris_wot: indeed, that's the concept
>
> Cheers,
>
> -- Thorsten
>

That was helpful, but it didn't tell me how to get the meter limit
independently of the angle.

I think that I will need to probably to add another miter limit parameter
to createAreaGeometryForJoin() and then introduce an isosceles trapezoid
instead of a triangle for the miter.

This is because you can actually specify the miter length, however, the
example given doesn't show how just call on a basegfx function to produce a
bevelled join based on the miter length itself - I did look for something
that handles this but couldn't find anything.

Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20191205/4a252c20/attachment.html>


More information about the LibreOffice mailing list