RectShape.Contains

From Real Software Documentation

Jump to: navigation, search
Method
RectShape.Contains ( X as Double, Y as Double ) As Boolean

Tests whether the object contains the point X, Y. Returns True if the rectangle contains the point specified by X, Y.

Example

This example tests whether the RectShape contains the passed point.

Dim r as New RectShape
r.width=75
r.height=75
r.border=100
r.bordercolor=RGB(0,0,0) //black
r.fillcolor=RGB(0,127,127) // teal
r.borderwidth=2.5
r.rotation=-.78
if r.Contains(50,50) then
//draw something here..
end if
g.DrawObject r,100,100
Personal tools