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