Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blur ¶
type Blur struct {
render.Widget `starlark:"child,required"`
Radius float64 `starlark:"radius,required"`
}
Blur applies a Gaussian blur to the child widget.
DOC(Widget): The widget to apply the blur to. DOC(Radius): The radius of the Gaussian blur.
EXAMPLE BEGIN
filter.Blur(
child = render.Image(src="...", width=64, height=64),
radius = 2.0,
)
EXAMPLE END.
type Brightness ¶
type Brightness struct {
render.Widget `starlark:"child,required"`
Change float64 `starlark:"change,required"`
}
Brightness adjusts the brightness of the child widget.
DOC(Widget): The widget to adjust brightness for. DOC(Change): The amount to change brightness by. -1.0 is black, 1.0 is white, 0.0 is no change.
EXAMPLE BEGIN
filter.Brightness(
child = render.Image(src="...", width=64, height=64),
change = -0.5,
)
EXAMPLE END.
type Contrast ¶
type Contrast struct {
render.Widget `starlark:"child,required"`
Factor float64 `starlark:"factor,required"`
}
Contrast adjusts the contrast of the child widget.
DOC(Widget): The widget to adjust contrast for. DOC(Factor): The factor to adjust contrast by. -1.0 is gray, 1.0 is no change, > 1.0 increases contrast.
EXAMPLE BEGIN
filter.Contrast(
child = render.Image(src="...", width=64, height=64),
factor = 2.0,
)
EXAMPLE END.
type EdgeDetection ¶
type EdgeDetection struct {
render.Widget `starlark:"child,required"`
Radius float64 `starlark:"radius,required"`
}
EdgeDetection applies an edge detection filter to the child widget.
DOC(Widget): The widget to detect edges on. DOC(Radius): The radius of the edge detection kernel.
EXAMPLE BEGIN
filter.EdgeDetection(
child = render.Image(src="...", width=64, height=64),
radius = 2.0,
)
EXAMPLE END.
type Emboss ¶
Emboss applies an emboss filter to the child widget.
DOC(Widget): The widget to emboss.
EXAMPLE BEGIN
filter.Emboss(
child = render.Image(src="...", width=64, height=64),
)
EXAMPLE END.
type FlipHorizontal ¶
FlipHorizontal flips the child widget horizontally.
DOC(Widget): The widget to flip.
EXAMPLE BEGIN
filter.FlipHorizontal(
child = render.Image(src="...", width=64, height=64),
)
EXAMPLE END.
type FlipVertical ¶
FlipVertical flips the child widget vertically.
DOC(Widget): The widget to flip.
EXAMPLE BEGIN
filter.FlipVertical(
child = render.Image(src="...", width=64, height=64),
)
EXAMPLE END.
type Gamma ¶
type Gamma struct {
render.Widget `starlark:"child,required"`
Gamma float64 `starlark:"gamma,required"`
}
Gamma applies gamma correction to the child widget.
DOC(Widget): The widget to apply gamma correction to. DOC(Gamma): The gamma value. 1.0 is no change, < 1.0 darkens, > 1.0 lightens.
EXAMPLE BEGIN
filter.Gamma(
child = render.Image(src="...", width=64, height=64),
gamma = 0.5,
)
EXAMPLE END.
type Grayscale ¶
Grayscale converts the child widget to grayscale.
DOC(Widget): The widget to convert to grayscale.
EXAMPLE BEGIN
filter.Grayscale(
child = render.Image(src="...", width=64, height=64),
)
EXAMPLE END.
type Hue ¶
type Hue struct {
render.Widget `starlark:"child,required"`
Change float64 `starlark:"change,required"`
}
Hue adjusts the hue of the child widget.
DOC(Widget): The widget to adjust hue for. DOC(Change): The amount to change hue by in degrees.
EXAMPLE BEGIN
filter.Hue(
child = render.Image(src="...", width=64, height=64),
change = 180.0,
)
EXAMPLE END.
type Invert ¶
Invert inverts the colors of the child widget.
DOC(Widget): The widget to invert.
EXAMPLE BEGIN
filter.Invert(
child = render.Image(src="...", width=64, height=64),
)
EXAMPLE END.
type Rotate ¶
type Rotate struct {
render.Widget `starlark:"child,required"`
Angle float64 `starlark:"angle,required"`
}
Rotate rotates the child widget by the specified angle.
DOC(Widget): The widget to rotate. DOC(Angle): The angle to rotate by in degrees.
EXAMPLE BEGIN
filter.Rotate(
child = render.Image(src="...", width=64, height=64),
angle = 10.0,
)
EXAMPLE END.
type Saturation ¶
type Saturation struct {
render.Widget `starlark:"child,required"`
Factor float64 `starlark:"factor,required"`
}
Saturation adjusts the saturation of the child widget.
DOC(Widget): The widget to adjust saturation for. DOC(Factor): The factor to adjust saturation by. 0.0 is grayscale, 1.0 is no change, > 1.0 increases saturation.
EXAMPLE BEGIN
filter.Saturation(
child = render.Image(src="...", width=64, height=64),
factor = 1,
)
EXAMPLE END.
type Sepia ¶
Sepia applies a sepia filter to the child widget.
DOC(Widget): The widget to apply sepia to.
EXAMPLE BEGIN
filter.Sepia(
child = render.Image(src="...", width=64, height=64),
)
EXAMPLE END.
type Sharpen ¶
Sharpen sharpens the child widget.
DOC(Widget): The widget to sharpen.
EXAMPLE BEGIN
filter.Sharpen(
child = render.Image(src="...", width=64, height=64),
)
EXAMPLE END.
type Shear ¶
type Shear struct {
render.Widget `starlark:"child,required"`
XAngle float64 `starlark:"x_angle"`
YAngle float64 `starlark:"y_angle"`
}
Shear shears the child widget horizontally and/or vertically.
DOC(Widget): The widget to shear. DOC(XAngle): The angle to shear horizontally in degrees. DOC(YAngle): The angle to shear vertically in degrees.
EXAMPLE BEGIN
filter.Shear(
child = render.Image(src="...", width=64, height=64),
x_angle = 10.0,
)
EXAMPLE END.
type Threshold ¶
type Threshold struct {
render.Widget `starlark:"child,required"`
Level float64 `starlark:"level,required"`
}
Threshold applies a threshold filter to the child widget, making it black and white.
DOC(Widget): The widget to apply threshold to. DOC(Level): The threshold level, from 0 to 255.
EXAMPLE BEGIN
filter.Threshold(
child = render.Image(src="...", width=64, height=64),
level = 128.0,
)
EXAMPLE END.