This chapter presents properties and selected constants of the Cairo class (gb.cairo).
The Cairo class has these properties:
Property | Data type | Description |
---|---|---|
AntiAlias | Boolean | Determines or specifies with True that the image is drawn with anti-aliasing (edge smoothing). |
ClipExtents | CairoExtents | Calculates a bounding box in user coordinates for the area within the current clip → Chapter 25.1.6 CairoExtents |
FillExtents | CairoExtents | Calculates a bounding box in user coordinates for the coloured area. |
PathExtents | PathExtents | Calculates a bounding box (in coordinates of the CTM) that contains all points of the current path and returns it. If the current path is empty, an empty rectangle is returned. Stroke() parameters, clipping, fill rules and artboard boundaries are ignored. |
Theh | Float[ ] | Sets the stroke pattern or returns it as a float array. The property is only used in conjunction with the Cairo.Stroke([…]) method. The number of elements in the float array must always be even. |
DashOffset | Float | Returns or sets the offset in the dash pattern (in coordinate units). |
Device | Object | Specifies the object that is drawn to with the Cairo class. |
FillRule | Integer | The fill rule specifies which regions are inside or outside a complex (possibly self-intersecting) path. This property can have one of the following values: FillRuleWinding (default value) or FillRuleEvenOdd. |
Font | Font | Sets the font or reads the font with which text is drawn - with the properties Bold, Extents, Italic, Matrix, Name, Size, Slant and Weight of the virtual class .Cairo.Font. |
LineCap | Integer | Determines or sets the line end for the current drawing with Cairo.Stroke. This property has one of the following values: LineCapButt (default value) or LineCapRound or LineCapSquare. |
LineJoin | Integer | Determines or specifies the way in which lines are joined. This property has one of the following values: LineJoinMiter (default) or LineJoinRound or LineJoinBevel. |
LineWidth | Float | Sets the line thickness or reads the line thickness. |
Matrix | CairoMatrix | Sets the current transformation matrix (CTM - Current Transformation Matrix) or returns this matrix → Chapter 23.3.5 CairoMatrix. |
MiterLimit | Float | Sets the current angle limit or reads out this value in conjunction with the LineJoin property and set value LineJoinMiter. |
Operator | Integer | Returns or sets the composition operator that is used for all drawing operations. The composition operator determines how colours on the drawing area are linked to colours drawn above them. The standard is OperatorOver, the “draw over”. The following applies to the definition of the operators → http://cairographics.org/operators. |
Source | CairoPattern | Sets the pattern for drawing or returns the value. |
Status | Integer | Returns an error status value - overview of the numerous error status values → http://gambaswiki.org/wiki/comp/gb.cairo/cairo/status. |
StrokeExtents | CairoExtents | Returns a bounding box (in coordinates of the CTM) resulting from the current path in the Stroke() method. |
Tolerance | Float | Sets the tolerance value [0..1] for the approximation of curve segments by a polygon move. The default value is 0.1. |
Table 25.1.2.1.1 : Properties of the Cairo class
Only a few selected constants are described for the Cairo class.
Further constants and information can be found at → http://gambaswiki.org/wiki/comp/gb.cairo/cairo.
Constant | Value | Description |
---|---|---|
LineCapButt | 0 | Specifies the rendering of the start and end points exactly at the point boundary in connection with the method Cairo.Stroke. |
LineCapRound | 1 | Specifies the rendering of the start and end points with a circular end, where the centre of the end circle is exactly the start and end point. |
LineCapSquare | 2 | Specifies the rendering of the start and end points with a square end, where the centre of the square is the exact start and end point. |
ExtendRepeat | 1 | The pattern is tiled by repeating. |
ExtendReflect | 2 | The pattern is tiled by reflection at the edges. |
ExtendPad | 3 | Pixels that lie outside the pattern are given the colour of the nearest pixel within the pattern. |
Table 25.1.2.2.1 : Selected constants of the Cairo class