Skip to content
Member Filters
Show Inherited
Show Protected
Show abstract
GR32_Polygons🞂PolyPolygonFunction

PolyPolygon

Rasterizes filled multi-contour polygon shapes (including complex paths with holes) onto a destination bitmap using floating-point or fixed-point coordinates.

Declaration ​

pascal
procedure PolyPolygonFS(Bitmap: TCustomBitmap32; const Points: TArrayOfArrayOfFloatPoint; Color: TColor32; FillMode: TPolyFillMode = pfAlternate; Transformation: TTransformation = nil); overload;
procedure PolyPolygonFS(Bitmap: TCustomBitmap32; const Points: TArrayOfArrayOfFloatPoint; Filler: TCustomPolygonFiller; FillMode: TPolyFillMode = pfAlternate; Transformation: TTransformation = nil); overload;
procedure PolyPolygonFS_LCD(Bitmap: TCustomBitmap32; const Points: TArrayOfArrayOfFloatPoint; Color: TColor32; FillMode: TPolyFillMode = pfAlternate; Transformation: TTransformation = nil); overload;
procedure PolyPolygonFS_LCD2(Bitmap: TCustomBitmap32; const Points: TArrayOfArrayOfFloatPoint; Color: TColor32; FillMode: TPolyFillMode = pfAlternate; Transformation: TTransformation = nil); overload;
procedure PolyPolygonFS(Bitmap: TCustomBitmap32; const Points: TArrayOfArrayOfFloatPoint; ClipRect: TRect; Color: TColor32; FillMode: TPolyFillMode = pfAlternate; Transformation: TTransformation = nil); overload;
procedure PolyPolygonFS(Bitmap: TCustomBitmap32; const Points: TArrayOfArrayOfFloatPoint; ClipRect: TRect; Filler: TCustomPolygonFiller; FillMode: TPolyFillMode = pfAlternate; Transformation: TTransformation = nil); overload;
procedure PolyPolygonFS_LCD(Bitmap: TCustomBitmap32; const Points: TArrayOfArrayOfFloatPoint; ClipRect: TRect; Color: TColor32; FillMode: TPolyFillMode = pfAlternate; Transformation: TTransformation = nil); overload;
procedure PolyPolygonFS_LCD2(Bitmap: TCustomBitmap32; const Points: TArrayOfArrayOfFloatPoint; ClipRect: TRect; Color: TColor32; FillMode: TPolyFillMode = pfAlternate; Transformation: TTransformation = nil); overload;

procedure PolyPolygonXS(Bitmap: TCustomBitmap32; const Points: TArrayOfArrayOfFixedPoint; Color: TColor32; FillMode: TPolyFillMode = pfAlternate; Transformation: TTransformation = nil); overload;
procedure PolyPolygonXS(Bitmap: TCustomBitmap32; const Points: TArrayOfArrayOfFixedPoint; Filler: TCustomPolygonFiller; FillMode: TPolyFillMode = pfAlternate; Transformation: TTransformation = nil); overload;
procedure PolyPolygonXS_LCD(Bitmap: TCustomBitmap32; const Points: TArrayOfArrayOfFixedPoint; Color: TColor32; FillMode: TPolyFillMode = pfAlternate; Transformation: TTransformation = nil); overload;
procedure PolyPolygonXS_LCD2(Bitmap: TCustomBitmap32; const Points: TArrayOfArrayOfFixedPoint; Color: TColor32; FillMode: TPolyFillMode = pfAlternate; Transformation: TTransformation = nil); overload;

Parameters ​

ParameterTypeDescription
BitmapTCustomBitmap32Destination bitmap.
Points-Array of polygon contours.
ColorTColor32Solid fill color.
FillerTCustomPolygonFillerCustom span filler.
ClipRectTRectOptional explicit clipping rectangle.
FillModeTPolyFillModePolygon fill rule (pfAlternate or pfWinding).
TransformationTTransformationOptional coordinate transformation.

Description ​

The PolyPolygon routines rasterize multi-contour filled polygon shapes (such as compound shapes with holes or multiple disconnected sub-paths) defined by Points onto a destination Bitmap.

Function variants support floating-point (FS) and fixed-point (XS) coordinate inputs, solid color or custom span filler rendering, optional explicit bounding box clipping (ClipRect), and sub-pixel LCD antialiasing (LCD and LCD2).

Variants ​

VariantCoordinate TypeAnti-AliasingDescription
PolyPolygonFSFloating-pointStandard coverageRasterizes multi-contour floating-point polygons using standard antialiased coverage blending.
PolyPolygonFS_LCDFloating-point3x LCD sub-pixelRasterizes multi-contour floating-point polygons using horizontal sub-pixel LCD rendering.
PolyPolygonFS_LCD2Floating-pointSoft LCD sub-pixelRasterizes multi-contour floating-point polygons using a soft sub-pixel LCD filtering profile.
PolyPolygonXSFixed-pointStandard coverageRasterizes multi-contour fixed-point polygons using standard antialiased coverage blending.
PolyPolygonXS_LCDFixed-point3x LCD sub-pixelRasterizes multi-contour fixed-point polygons using horizontal sub-pixel LCD rendering.
PolyPolygonXS_LCD2Fixed-pointSoft LCD sub-pixelRasterizes multi-contour fixed-point polygons using a soft sub-pixel LCD filtering profile.

Example ​

pascal
var
  PolyPts: TArrayOfArrayOfFloatPoint;
begin
  SetLength(PolyPts, 2);
  // Outer rectangle
  PolyPts[0] := BuildRectangle(FloatRect(10, 10, 100, 100));
  // Inner hole
  PolyPts[1] := BuildRectangle(FloatRect(30, 30, 70, 70));

  // Render multi-contour polygon with hole using alternate fill mode
  PolyPolygonFS(Bitmap, PolyPts, clBlue32, pfAlternate);
end;

See also ​