Struct std::GuiPaint
struct GuiPaint {
int kind;
struct GuiColor color;
float x0;
float y0;
float r0;
float x1;
float y1;
float r1;
int nstops;
struct GuiColorStop stops[GUI_GRADIENT_MAX_STOPS];
int spread;
const ?&GuiImage image;
struct GuiMatrix matrix;
int filter;
float opacity;
}What to fill or stroke with. A value type: build one, add stops, hand it to set_fill_paint()/set_stroke_paint() (which copy it).
Fields
GUI_PAINT_*
SOLID
LINEAR: from (x0,y0) to (x1,y1). RADIAL: from the circle (x0,y0,r0) to the circle (x1,y1,r1). SWEEP: around (x0,y0), starting at angle r0 (radians, clockwise).
LINEAR: from (x0,y0) to (x1,y1). RADIAL: from the circle (x0,y0,r0) to the circle (x1,y1,r1). SWEEP: around (x0,y0), starting at angle r0 (radians, clockwise).
LINEAR: from (x0,y0) to (x1,y1). RADIAL: from the circle (x0,y0,r0) to the circle (x1,y1,r1). SWEEP: around (x0,y0), starting at angle r0 (radians, clockwise).
GUI_SPREAD_*
IMAGE: the pattern (must outlive the drawing)
paint space -> user space (pattern/gradient transform)
GUI_FILTER_* (IMAGE)
multiplies the paint's alpha (default 1)
Methods
static struct GuiPaint radial2(float x0, float y0, float r0, float x1, float y1, float r1)source · definitionTwo-circle radial gradient, like the HTML canvas' createRadialGradient.
An image pattern, its pixel (0,0) at user-space (0,0), one image pixel per user unit (change with set_transform()). Spread: GUI_SPREAD_REPEAT.
Adds a color stop (stops may be added in any order; beyond GUI_GRADIENT_MAX_STOPS they're ignored).