java.lang.Object
io.github.jwharm.cairobindings.Proxy
org.freedesktop.cairo.Pattern
org.freedesktop.cairo.Gradient
org.freedesktop.cairo.LinearGradient
-
Constructor Summary
ConstructorDescriptionLinearGradient
(MemorySegment address) Constructor used internally to instantiate a java LinearPattern object for a nativecairo_pattern_t
instance -
Method Summary
Modifier and TypeMethodDescriptionstatic LinearGradient
create
(double x0, double y0, double x1, double y1) Create a new linear gradientPattern
along the line defined by (x0, y0) and (x1, y1).Point[]
Gets the gradient endpoints for a linear gradient.Methods inherited from class org.freedesktop.cairo.Gradient
addColorStopRGB, addColorStopRGBA, getColorStopCount, getColorStopRGBA
Methods inherited from class org.freedesktop.cairo.Pattern
destroy, getDither, getExtend, getFilter, getMatrix, getPatternType, getType, getUserData, setDither, setExtend, setFilter, setMatrix, setUserData, status
-
Constructor Details
-
LinearGradient
Constructor used internally to instantiate a java LinearPattern object for a nativecairo_pattern_t
instance- Parameters:
address
- the memory address of the nativecairo_pattern_t
instance
-
-
Method Details
-
create
Create a new linear gradientPattern
along the line defined by (x0, y0) and (x1, y1). Before using the gradient pattern, a number of color stops should be defined usingGradient.addColorStopRGB(double, double, double, double)
orGradient.addColorStopRGBA(double, double, double, double, double)
.Note: The coordinates here are in pattern space. For a new pattern, pattern space is identical to user space, but the relationship between the spaces can be changed with cairo_pattern_set_matrix().
- Parameters:
x0
- x coordinate of the start pointy0
- y coordinate of the start pointx1
- x coordinate of the end pointy1
- y coordinate of the end point- Returns:
- the newly created
Pattern
- Since:
- 1.0
-
getLinearPoints
-