Topic : The ATARI Compendium
Author : Scott Sanders / JAY Software
Version : 1.25 (20/6/2003)
Subject : Documentation
Nodes : 1117
Index Size : 32614
HCP-Version : 6
Compiled on : Atari
@charset : UTF-8
@lang : en
@default :
@help : %About
@options : +g -i -t4 +y +z
@width : 100
View Ref-Fileobjc_draw()Object Libraryobjc_offset() AESSyntaxWORD objc_offset( tree, obj, ox, oy )
OBJECT *tree;
WORD obj;
WORD *ox, *oy;
Function objc_offset() calculates the true screen coordinates of an
object.
Opcode 44 (0x2C)
Availability All AESversions.
Parameters tree specifies the object tree containing obj. The WORDs
pointed to by ox and oy will be filled in with the true X
and Y screen position of object obj.
Binding intin[0] = obj;
addrin[0] = tree;
crys_if(0x2C);
*ox = intout[1];
*oy = intout[2];
return intout[0];
Return Value objc_offset() returns 0 if an error occurred or non-zero
otherwise.
Comments The ob_x and ob_y structure members of objects give an
offset from their parent as opposed to true screen
location. This call is used to determine a true screen
coordinate.
The values returned by objc_offset() coupled with the
ob_width and ob_height members do not take into account
negative borders, shadowing, or sculpturing. When redrawing
an object you are responsible for using these values to and
the object's state to compensate for a correct clipping
rectangle.
See Also objc_draw()Group Object Library