<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 5, 2019 at 7:30 AM Thorsten Behrens <<a href="mailto:thb@libreoffice.org">thb@libreoffice.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hey Chris,<br>
<br>
Chris Sherlock wrote:<br>
> I’m trying to work out how to implement the SETMETERLIMIT EMF record. <br>
> <br>
> Can anyone point me to the spot where we implement bevelling?<br>
><br>
We discussed on IRC earlier this week, below the log for reference -<br>
did that solve the question for you?<br>
<br>
chris_wot: thorsten! hey, can you help me out?<br>
chris_wot: do you know what does line mitering?<br>
chris_wot: is it in basegfx?<br>
quikee[m]: the vcl polyline accepts miter limit as an parameter<br>
thorsten: yep, fwict the method noelgrandin gave does that<br>
***chris_wot relooks at the code<br>
chris_wot: you mean basegfx/source/polygon/b2dlinegeometry.cxx ?<br>
thorsten: yep<br>
chris_wot: thorsten how do I set the miter limit though?<br>
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<br>
chris_wot: legend<br>
chris_wot: thorsten is it the line double fMiterLimit = 1.0 / sin( fMiterMinimumAngle / 2.0);<br>
chris_wot: as I want to do this indepently of the angle<br>
chris_wot: which is what SETMITERLIMIT does...<br>
chris_wot: thorsten something like this - <a href="https://www.partnersoftware.com/documentation/MP/v4.5.26/mp_wblegendlinestylemiterlimit.png" rel="noreferrer" target="_blank">https://www.partnersoftware.com/documentation/MP/v4.5.26/mp_wblegendlinestylemiterlimit.png</a><br>
thorsten: chris_wot: indeed, that's the concept<br>
<br>
Cheers,<br>
<br>
-- Thorsten<br></blockquote><div><br></div><div>That was helpful, but it didn't tell me how to get the meter limit independently of the angle. <br></div><div><br></div><div>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. <br></div><div><br></div><div>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. <br></div><div><br></div><div>Chris<br></div></div></div>