Drawing an angled box

From: Tom Roberts <tjrob_at_fnal.gov>
Date: Thu, 12 Mar 2009 16:50:11 -0500


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 Thu Mar 12 2009 - 22:50:15 CET

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