Re: Drawing an angled box

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Fri, 13 Mar 2009 07:07:34 +0100


Tom,

You should have a look at the most basic tutorials about graphics at: http://root.cern.ch/root/html/tutorials/graphics/index.html and see the class reference at
http://root.cern.ch/root/html/GRAF2D_GRAF_Index.html http://root.cern.ch/root/html/TPolyLine.html

Rene Brun

Tom Roberts wrote:
> I have a need to draw a colored rectangle with arbitrary orientation
> on the screen; TBox does not do that. I do not need lines around the
> edge, so it is tempting to use a big fat line. Unfortunately,
> linewidth is specified in pixels, and widths greater than about 80
> pixels don't work. The first is easily handled with a coordinate
> conversion, but the second means I have to draw multiple lines, a much
> bigger complexity.
>
> Is there a good way to do this?
>
> The base data I start with are: Xcenter, Ycenter, width,
> height, angle, color. The first 4 are in user coordinates;
> angle is in degrees; color is R,G,B.
>
>
> Tom Roberts
>
Received on Fri Mar 13 2009 - 07:08:03 CET

This archive was generated by hypermail 2.2.0 : Fri Mar 13 2009 - 11:50:02 CET