Page 1 of 1

How to find a Canvas Actor's Edges??

PostPosted: Wed Jun 23, 2004 3:41 pm
by Just4Fun
OK,
Here comes yet another question: :)

In Visual Basic it is easy to find a control's coordinates. Something like:

Toplft=TopLeftControl.Top

(find the top left corner of the control (actor)).

I would like to find a Canvas Actor's coordinates in a similar fashion. What sort of knowledge do I need to have in order to make this happen? I've got a fun demo idea that would depend on being able to find the Canvas Actor's coordinates without hard coding the coordinates.

TIA

PostPosted: Thu Jun 24, 2004 2:38 am
by makslane
In your canvas actor:

TopLeft = x, y
Width = width
Height = height
ButtonRight = x + width, y + height

PostPosted: Thu Jun 24, 2004 11:40 pm
by Just4Fun
I wonder if there is a bug in this function somewhere... or maybe there is a bug in me... :shock:

Still not working right for me.

Please anyone,
Do you have a code snip of how to draw a rectangle using Makslane's above directions?

TIA