The gb.clipper component implements clipping procedures in six classes based on the Clipper library.
Class | Description |
---|---|
Clipper | This (static) class implements different clipping methods. |
Point | This class describes a point with two integer coordinates. |
PointF | This class describes a point whose coordinates are two floating point numbers. |
Polygon | This class represents a polygon. |
Rect | This class represents a rectangle with four integer values for the two coordinates and the extent (width and height). |
RectF | This class represents a rectangle with four floating point numbers for the two coordinates and the extent (width and height). |
Table 25.2.0.1 : Classes of the Clipper component
The methods of the classes of the gb.clipper component can be used to perform operations on polygons. These operations include:
Figure 25.2.0.1: Example: Intersection of two polygons PolyRed and PolyBlue
Conclusion
You cannot draw with the classes of the gb.clipper component, but you can calculate and link objects with the methods of the six classes, which you can then draw. To do this, you use the Paint.Polygon() method (gb.qt4) and the Polygon[iIndex] syntax (gb.clipper) to save all the points of a polygon in an array. This allows you to use the classes of the gb.clipper component as the basis for drawing programmes.
The component can be useful for mathematical applications in geometry - if you work specifically with polygons.