Paul McNett wrote: > This must be really simple, as I've been doing really cool things > with floatcanvas with no troubles so far - great library!
Thanks -- but in this case, you didn't miss anything. > How do I specify that a rectangle is *not* to be scaled? An unscaled rectangle is not a current part of the standard FloatCanvas objects. > I'm trying to make a legend of sorts, where most of the drawing is > scalable. Because text isn't scaled by default, I get what I want for > the text by merely specifying font size. But how do I draw a box > around this legend and *not* have the box scale with the rest of the > drawing? This is a missing piece. You're going to need to make a new DrawObject. There are few options: 1) make an UnscaledRectangle. (or add a flag the existing rectangle -- in fact, I regret not doing things that way in the first place. IN fact, we really should have all object have a "Scaled" flag). This would be easy -- just change Rectangle._Draw() to use self.WH, rather than the scaled one computed. Note: this will get trickier of you want to be able to choose what corner of the rectangle is fixed -- like you can with text. 2) Make an UnScaledTextBox -- the ScaledTextBox provides a way to put a box around the text, with spacers, etc. and UnScaled version is clearly needed. 3) Maybe you can get away with just changing the BackgroundColor or your Text Object? If you run into problems, post here. If any case, please post your solution here, and we can put it into the distribution. > I think I'll need some pies thrown at me after finding out the > answer. I just can't seem to figure this one out on my own. nope -- it just isn't there yet. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] _______________________________________________ FloatCanvas mailing list [email protected] http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas
