Class SelDCPattern
Cairo patterns
Methods
| SelDCPattern:createLinear (x1, y1, x2, y2) | Create linear gradient |
| SelDCPattern:createCircle (cx0, cy0, r0, cx1, cy1, r1) | Create radial gradient |
| SelDCPattern:Release () | Delete a pattern |
| SelDCPattern:destroy () | Delete a pattern |
| SelDCPattern:addFixPoint (offset, r, g, b, opacity) | Adds a translucent color stop to a gradient pattern |
Methods
- SelDCPattern:createLinear (x1, y1, x2, y2)
-
Create linear gradient
Parameters:
- x1 Number coordinate of the start point
- y1 Number coordinate of the start point
- x2 Number coordinate of the end point
- y2 Number coordinate of the end point
Returns:
-
SelDCPattern
pattern
- SelDCPattern:createCircle (cx0, cy0, r0, cx1, cy1, r1)
-
Create radial gradient
Parameters:
- cx0 Number center of the 1st circle
- cy0 Number center of the 1st circle
- r0 Number radius of the 1st circle
- cx1 Number center of the 2nd circle
- cy1 Number center of the 2nd circle
- r1 Number radius of the 2nd circle
- SelDCPattern:Release ()
- Delete a pattern Remove all references to its objects.
- SelDCPattern:destroy ()
- Delete a pattern Remove all references to its objects.
- SelDCPattern:addFixPoint (offset, r, g, b, opacity)
-
Adds a translucent color stop to a gradient pattern
Parameters:
- offset Number where to put this point (b/w 0.0 and 1.0)
- r Number colors component
- g Number colors component
- b Number colors component
- opacity Number optional, default 1