Module: graphics.paint
Source: ./graphics/paint.reef
Overview
graphics/paint.reef - Paint styles for fills and strokes Part of reef-stdlib graphics module
Types
LineCap (enum)
Variants:
ButtRoundSquare
LineJoin (enum)
Variants:
MiterRoundBevel
FillRule (enum)
Variants:
NonZeroEvenOdd
RepeatMode (enum)
Variants:
NoRepeatRepeatRepeatXRepeatYMirrorMirrorXMirrorY
GradientStop
Fields:
| Name | Type |
|---|---|
offset |
float |
color |
core.Color |
Paint (enum)
Variants:
Solid(core.Color)LinearGradient(float, float, float, float, [GradientStop])RadialGradient(float, float, float, float, float, float, [GradientStop])Pattern(RepeatMode)
StrokeStyle
Fields:
| Name | Type |
|---|---|
width |
float |
cap |
LineCap |
join |
LineJoin |
miter_limit |
float |
dash_array |
[float] |
dash_offset |
float |
Functions
fn gradient_stop(offset: float, color: core.Color): GradientStop
fn solid(color: core.Color): Paint
Construct solid color paint
fn linear_gradient(x1: float, y1: float, x2: float, y2: float, stops: [GradientStop]): Paint
Construct linear gradient paint
fn radial_gradient(cx: float, cy: float, radius: float, stops: [GradientStop]): Paint
Construct radial gradient paint (simple version - focal point = center)
fn pattern(repeat: RepeatMode): Paint
Construct pattern paint
fn stroke_style(width: float, cap: LineCap, join: LineJoin, miter_limit: float): StrokeStyle
Construct stroke style with all parameters
fn stroke_style_default(): StrokeStyle
Default stroke style
fn with_width(s: StrokeStyle, width: float): StrokeStyle
fn with_cap(s: StrokeStyle, cap: LineCap): StrokeStyle
fn with_join(s: StrokeStyle, join: LineJoin): StrokeStyle
fn with_miter_limit(s: StrokeStyle, limit: float): StrokeStyle
fn with_dash_array(s: StrokeStyle, dashes: [float]): StrokeStyle
fn with_dash_offset(s: StrokeStyle, offset: float): StrokeStyle
Generated by reefc doc