At 9:07 AM -0700 4/3/06, Paul Mathews wrote:
As I understand it, with a single canvas, I'll need to compute coordinates differently for each dice pair and each die dot. The present scheme, with a Canvas per dice pair, calculates the coordinates of constituent elements relative to the local canvas and proportional to its size, so it's quite simple, and (I thought) elegant.
True, and as long as these canvases aren't overlapping (I'm coming in a bit late here), then that'll work fine.
But if they need to overlap, or for some other reason you need to use 1 big canvas, you can still set it up this way, where each dice pair calculates its proper coordinates relative to its size and position. You just end up setting their initial size and position in code rather than in the window editor. After that, everything should be the same.
It seems to me that the '1 large canvas' approach leaves me with a lot of management of indexes, scale factors, and offsets.
No, just a width extra lines per dice pair, something like: TopLeftPair = New DicePair TopLeftPair.SetPosition 80, 50, 200, 150 TopMidPair = New DicePair TopMidPair.SetPosition 280, 50, 200, 150 and so on.
Is there something I can do with Control Order to get the system to overlay these controls and images without painting backgrounds back on top?
I don't think so. I'm tuning in late here, but it sounds like you're trying to overlay canvases, and in that case, they're going to be drawn in a certain order -- you can't have them all draw their backgrounds, and then all draw more content. It just doesn't work that way.
But this is an object-oriented language; there is absolutely no reason not to make a DicePair (or whatever) class that does it all very neatly. You'll just be arranging them in code, as shown above, instead of in the view editor; in every other respect they'll be exactly like a canvas-based class.
Best, - Joe -- Joe Strout -- [EMAIL PROTECTED] Available for custom REALbasic programming and training. _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
