|
Author |
Topic: properties question (Read 819 times) |
|
gaza
|
properties question
« on: Dec 31st, 2002, 4:26pm » |
|
how can I retrieve the properties of say... a point i draw. do I have to name that point? also... let's say I load and Image.. can I retrieve the x and y positions of that image like BImage a;...etc a.x; thanks
|
|
|
|
gaza
|
Re: properties question
« Reply #2 on: Jan 3rd, 2003, 12:32am » |
|
Thanks Fry.
|
|
|
|
benelek
|
Re: properties question
« Reply #3 on: Jan 7th, 2003, 8:30am » |
|
well, if you really wanted to work that way, you could define a class which would draw the shape, and store the coordinates used as variables within the object. for example: Code: class TheEllipse { int x, y, size; TheEllipse (int ix, int iy, int isize) { x = ix; y = iy; size = isize; } void draw() { ellipse(x, y, size, size); } } |
| then you could access the coordinates of the ellipse by using EllipseName.x, and EllipseName.y -jacob
|
« Last Edit: Jan 7th, 2003, 8:30am by benelek » |
|
|
|
|
|