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 07:28:12 GMT
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


Mime
View raw message