Distance Graphic Calculation 

Declaration:

FUNCTION   Distance
(   x1 :REAL;
    y1 :REAL;
    x2 :REAL;
    y2 :REAL
) :REAL ;

Description:

Function Distance returns the distance between the two specified coordinate locations.

Parameters:

x1 X coordinate of first point.
y1 Y coordinate of first point.
x2 X coordinate of second point.
y2 Y coordinate of second point.

Example:

d:=Distance(0,2,4,5);
{returns the distance between (0,2) and (4,5)}



  EqualPt Graphic Calculation 

Declaration:

FUNCTION   EqualPt
(   p1X :REAL;
    p1Y :REAL;
    p2X :REAL;
    p2Y :REAL
) :BOOLEAN ;

Description:

Function EqualPt returns whether the two specified coordinate locations are equal(i.e., the same point).

Parameters:

p1 Coordinates of first comparison point.
p2 Coordinates of second comparison point.

Example:

areTheyEqual:=EqualPt(3,3,1,8);



  EqualRect Graphic Calculation 

Declaration:

FUNCTION   EqualRect
(   rectAp1X :REAL;
    rectAp1Y :REAL;
    rectAp2X :REAL;
    rectAp2Y :REAL;
    rectBp1X :REAL;
    rectBp1Y :REAL;
    rectBp2X :REAL;
    rectBp2Y :REAL
) :BOOLEAN ;

Description:

Function EqualRect returns whether the two specified rectangular areas are equal.

Parameters:

rectAp1 Top left coordinate of rectangle A.
rectAp2 Bottom right coordinate of rectangle A.
rectBp1 Top left coordinate of rectangle B.
rectBp2 Bottom right coordinate of rectangle B.

Example:

AreTheyEqual:=EqualRect(0,0,3,3,3,3,0,0);



  HCenter Graphic Calculation 

Declaration:

PROCEDURE   HCenter
(   h :HANDLE;
  VAR  pX :REAL;
  VAR  pY :REAL
) ;

Description:

Procedure HCenter returns the center point of the referenced object.

Parameters:

h Handle to object.
p X-Y location of object center.

Example:





  PtInPoly Graphic Calculation 

Declaration:

FUNCTION   PtInPoly
(   pX :REAL;
    pY :REAL;
    h :HANDLE
) :BOOLEAN ;

Description:

Function PtInPoly returns TRUE if the point specified point lies within the referenced object.

Parameters:

p X-Y coordinate point.
h Handle to polygon.

Example:

insidePolyFlag:=PtInPoly(3,4,polyHandle);



  PtInRect Graphic Calculation 

Declaration:

FUNCTION   PtInRect
(   pointX :REAL;
    pointY :REAL;
    rect1X :REAL;
    rect1Y :REAL;
    rect2X :REAL;
    rect2Y :REAL
) :BOOLEAN ;

Description:

Function PtInRect returns whether the coordinate location is located within the specified rectangular boundary.

Parameters:

point X-Y coordinate point location.
rect1 Top left coordinate of rectangular area.
rect2 Bottom right coordinate of rectangular area.

Example:

inRect:=PtInRect(px,py,0,0,3,3);



  SrndArea Graphic Calculation 

Declaration:

FUNCTION   SrndArea
(   pX :REAL;
    pY :REAL
) :REAL ;

Description:

Function SrndArea when given a point, returns the area of the smallest polygon bounded by the selected objects.

Parameters:

p Coordinates of reference point.



  UnionRect Graphic Calculation 

Declaration:

PROCEDURE   UnionRect
(   p1X :REAL;
    p1Y :REAL;
    p2X :REAL;
    p2Y :REAL;
    p3X :REAL;
    p3Y :REAL;
    p4X :REAL;
    p4Y :REAL;
  VAR  p5X :REAL;
  VAR  p5Y :REAL;
  VAR  p6X :REAL;
  VAR  p6Y :REAL
) ;

Description:

Procedure UnionRect returns a rectangle based on the boundary enclosing the two specified rectangles.


Parameters:

p1 Top left coordinate of rectangle 1.
p2 Bottom right coordinate of rectangle 1.
p3 Top left coordinate of rectangle 2.
p4 Bottom right coordinate of rectangle 2.
p5 Top left coordinate of boundary rectangle.
p6 Bottom right coordinate of boundary rectangle.

Example:

UnionRect(0,0,3,3,3,3,5,5,x1,y1,x2,y2);