TypeLibF Xojo Plugin

PolygonF Class (console safe)

This class defines a Polygon structure that uses floating point precision.

Object
   PolygonF

class PolygonF

Constructors

PolygonFThe default constructor for the PolygonF class.
PolygonFConstructs a PolygonF from a given RectF class instance.

Properties

CloneReturns a clone of the PoligonF.
CornerCountReturns count of points in the polygon.

Methods

AddAdds a point to the polygon.
AddAdds a point to the polygon.
AreaReturns the size of the area of the polygon.
BoundsReturns the boundaries for the Polygon as a RectF rectangle.
ContainsReturns true if the given point is within the polygon.
ContainsReturns true if the given x and y coordinates are within the polygon.
DrawDraws the polygon into a Graphics context with the current color of the Graphics context.
Draw (web only) Draws the polygon into a WebGraphics context with the current color of the WebGraphics context.
DrawPathDraws the polygon as a path into a Graphics context with the current color of the Graphics context.
DrawPath (web only) Draws the polygon as a path into a Graphics context with the current color of the Graphics context.
FillFills the polygon into a Graphics context with the current color of the Graphics context.
Fill (web only) Fills the polygon into a WebGraphics context with the current color of the WebGraphics context.
FindCentroidFinds centroid of the polygon.
HitTestCornersReturns the number of the corner that was clicked or zero if no corner was clicked.
InsetShrinks or expands a polygon by given distance.
IntersectsReturns true if the polygon intersects with a given line.
IntersectsReturns true if the polygon intersects with the other given polygon.
OffsetMoves the polygon
OffsetMoves the polygon
PointXReads or writes a point's x coordinate in the Polygon.
PointYReads or writes a point's y coordinate in the Polygon.
RotateRotates the polygon around its estimated center point.
RotateRotates the polygon in a coordinate system around one of the polygons points.
RotateRotates the polygon in a coordinate system around a defined center point.
ScaleScales the Polygon
ScaleScales the Polygon, pinning certain point.
VecNormReturns a new polygon that has same structure but is positioned at (0.0 , 0.0) in the coordinate system.

Supported Platforms:

  • macOS Intel 64 bit
  • macOS Apple Silicon
  • Windows 32 bit
  • Windows 64 bit
  • Windows ARM 64 bit
  • Linux 32 bit
  • Linux 64 bit
  • Linux ARM 32 bit
  • Linux ARM 64 bit
  • iOS