Date: prev next · Thread: first prev next last
2019 Archives by date, by thread · List index


On Thu, Dec 5, 2019 at 7:30 AM Thorsten Behrens <thb@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

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.