pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: Draw arc with given data(start point, start angle, sweep angle, major axis, minor axis)
Date Mon, 11 Mar 2019 17:51:04 GMT
Am 11.03.2019 um 14:24 schrieb Lachezar Dobrev:
>    I believe to OP means that the arc is part of an Ellipse, hence
> minor and major axis.


Oh. In that case I recommend to search on google, stackoverflow and 
math.stackexchange.com have a few answers just by searching for "bezier 
ellipse" (without quotes).

If not => ask a new question on http://math.stackexchange.com rather 
than the normal stackoverflow, to avoid people thinking that this is a 
pdfbox question.

I also wonder whether we could just draw a circular arc with radius 1, 
then (rather, before!) stretch the thing with an affine transform to fit 
the minor and major axis.


Tilman



>
> На пн, 11.03.2019 г. в 9:28 ч. Tilman Hausherr <THausherr@t-online.de> написа:
>> Hi,
>>
>> I entered "sweep angle arc" into google images so now I see what you
>> mean with "sweep angle".
>>
>> When you write "major axis" and "minor axis", are these parallel? I.e.
>> you want to draw a "fat arc line", right?
>>
>> I'm thinking about two strategies:
>>
>> the first one would be to draw the shape using two arcs (see in the SO
>> link) and combining this (join the line) and fill the result
>>
>> the second would be to draw the line and stroke this line, but changing
>> the line width so that it is a "fat" line instead of the default width
>> 1, so you could use major - minor as the line width, and use  (major -
>> minor) / 2  as the radius.
>>
>> Is that what you need? And which strategy sounds better?
>>
>> Tilman
>>
>> Am 11.03.2019 um 08:13 schrieb Liu Benhong(Lewis):
>>> Hi,
>>>
>>>                   I'd like to know if you could help me with this problem:
>>>
>>>                 The only way to draw an arc when I use pdfbox is using bezier
curve. However, I only have these data to describe an arc(start point, start angle, sweep
angle, major axis, minor axis). So here is the problem: how could I draw an arc with these
data or how could I transfer these data to bezier curve points?
>>>
>>> I already read this solution on https://stackoverflow.com/questions/40781610/how-to-draw-a-pie-chart-using-pdfbox,
but it didn't solve my problem when the length of major axis and minor axis are not equal.
>>>
>>> Looking forward to hearing your answer, thank you very much!
>>>
>>> Best regards,
>>> Lewis.
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Mime
View raw message