get_coord


protocol:
function

parameters:

OBJ_ID   obj

result:

structure with members (x1, y1, x2, y2) for lines rectangles etc, or a structure with members (x, y, r) for circles

description:

Get the co-ordinates of the object 'obj'.

For a line x1,y1 is the start of the line and x2,y2 is the end of the line.

For a rectangle x1,y1 is the top left hand corner and x2,y2 is the bottom right hand corner.

For a circle x,y is the centre of the circle and r is the radius

example:

to calculate the width of a rectangle object 'rect_obj'
 
coord   =   get_coord(rect_obj)
 
width   =   coord . x2   -   coord . x1