From c27ff841f56682ea2f4b366b51bb0fba9918897f Mon Sep 17 00:00:00 2001 From: dsiders Date: Mon, 30 Jan 2023 04:01:09 +0000 Subject: [PATCH] Docs: LCL/lazcanvas. Adds version information and updates topics for changes in aa477d82, d03ae50d. Issue #40100. * Adds TLazCanvas.Polygon topic. * Updates TLazCanvas.DoPolygonFill topic. --- docs/xml/lcl/lazcanvas.xml | 50 +++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/docs/xml/lcl/lazcanvas.xml b/docs/xml/lcl/lazcanvas.xml index 23ab0bd05e..2c23803fac 100644 --- a/docs/xml/lcl/lazcanvas.xml +++ b/docs/xml/lcl/lazcanvas.xml @@ -249,6 +249,7 @@ Developing with Graphics + @@ -405,7 +406,16 @@ Implements a polygon fill algorithm not present in fcl-image. The algorithm is explained here.

- + +Modified in LCL versions after 2.2.4 to call DrawPixel instead of SetColor +when drawing pixels between points on the polygon. This allows the DrawingMode +(opacity, alphablending, custom) to be applied to the pixels. Adds support for +the non-zero winding rule in the fill operation. + + + + +
Array with the TPoint instances for the polygon corners. @@ -952,6 +962,44 @@ range of pixels in the Image. + + +Overloaded method which adds support for the non-zero winding rule. + + +

+Polygon is an overloaded method in TLazCanvas. It provides support for the +non-zero winding rule in the polygon fill operation. +

+

+The overloaded variant extends the method from TFPCustomCanvas to include the +Winding argument used in the DoPolygonFill method. When Winding is set to +True, DoPolygonFill calculates the winding number for the sorted +vertices on the polygon and calls DrawPixel to apply the brush color needed +for the pixels inside the winding path. +

+

+Polygon updates the internal member used to store the value in Winding, and +calls the inherited method in TFPCustomCanvas where the brush and pen colors +are used to draw the polygon represented in Points. +

+
+ +Added in LCL version 2.4. + + +
+ + +Array with the TPoint instances for the vertices on the polygon. + + + + +True if the non-zero winding rule is enabled for the canvas instance. + + + Sets the Pen data for the canvas.