In one application I do a lot of text rendering and some line drawing.
Much to my surprise, my profiler says that the app spends much more time
on line drawing than on the text rendering. OK, I am using ready made
GlyphVectors for the text rendering, which should make text rendering
quite fast, but I still would not expect the app to spend that much time
on line drawing.

One important thing to note is that I am using a non-rectangular shape
for clipping when drawing lines (I am using a trapezoid shaped
GeneralPath). The rest is simply done by creating a Line2D object,
setting a BasicStroke (with CAP_BUTT and JOIN_BEVEL) and calling the
draw(Shape s) method on the Graphics object.

Any ideas where the time is spent? Is it the non-rectangular clipping shape?


Cheers

Jan

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to