How to find a Canvas Actor's Edges??

Non-platform specific questions.

How to find a Canvas Actor's Edges??

Postby Just4Fun » Wed Jun 23, 2004 3:41 pm

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
I've learned that I still have a lot to learn.

** Makslane == Genious **
Just4Fun
 
Posts: 524
Joined: Tue Jul 01, 2003 5:19 am
Location: USA: Washington State; West Coast
Score: 6 Give a positive score

Postby makslane » Thu Jun 24, 2004 2:38 am

In your canvas actor:

TopLeft = x, y
Width = width
Height = height
ButtonRight = x + width, y + height
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby Just4Fun » Thu Jun 24, 2004 11:40 pm

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
I've learned that I still have a lot to learn.

** Makslane == Genious **
Just4Fun
 
Posts: 524
Joined: Tue Jul 01, 2003 5:19 am
Location: USA: Washington State; West Coast
Score: 6 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest