Documentation
¶
Overview ¶
Package filter is the port of filtra, which applies the filter effects of SVG and CSS to pixmaps (D108). Apply runs a graph of filter primitives, a Filter, on the premultiplied RGBA8 pixels of a PixmapMut.
The package also holds the functions of D88, which apply one primitive alone on an okage.Mask, an okage.Pixmap or an image.NRGBA: the Gaussian blur of feGaussianBlur, the four kinds of feColorMatrix and the five transfer functions of feComponentTransfer. Each one calls the kernel of filtra for its primitive. svg and lottie call them for their blurs and their colors.
The kernels of filtra are generic over a SIMD level of fearless_simd. The port follows its scalar level Fallback, with the integer arithmetic and the order of the operations of filtra, so it gives the same bytes as filtra at that level, and the same bytes in every build of okage (D16).
No function of D88 returns an error. A value out of range is clamped, as in filtra.
Index ¶
- Variables
- func Apply[I any](f *Filter[I], target PixmapMut, pool *BufferPool, transform Transform, ...)
- func ApplyColorMatrix(p *okage.Pixmap, m ColorMatrix, opts ...Option)
- func ApplyColorMatrixNRGBA(img *image.NRGBA, m ColorMatrix, opts ...Option)
- func ApplyComponentTransfer(p *okage.Pixmap, r, g, b, a TransferFunction, opts ...Option)
- func ApplyComponentTransferNRGBA(img *image.NRGBA, r, g, b, a TransferFunction, opts ...Option)
- func Blur(p *okage.Pixmap, sigmaX, sigmaY float64, opts ...Option)
- func BlurMask(m *okage.Mask, sigmaX, sigmaY float64, _ ...Option)
- type Blend
- type BlendMode
- type BlurFunction
- type BrightnessFunction
- type BufferPool
- type Color
- type ColorChannel
- type ColorInterpolation
- type ColorMatrix
- type ColorMatrixKind
- type ComponentTransfer
- type Composite
- type CompositeOperator
- type CompositeOperatorKind
- type ContrastFunction
- type ConvolveMatrix
- type DiffuseLighting
- type DisplacementMap
- type DistantLight
- type DropShadow
- type DropShadowFunction
- type EdgeMode
- type Filter
- type FilterFunction
- type Flood
- type GaussianBlur
- type GrayscaleFunction
- type HueRotateFunction
- type Image
- type Input
- type InputKind
- type IntRect
- type InvertFunction
- type LightSource
- type Merge
- type Morphology
- type MorphologyOperator
- type Node
- type Offset
- type OpacityFunction
- type Option
- type Optional
- type PixmapMut
- type PointLight
- type Primitive
- type Rect
- type SaturateFunction
- type SepiaFunction
- type SpecularLighting
- type SpotLight
- type Subregion
- type Tile
- type TransferFunction
- type TransferKind
- type Transform
- type Turbulence
- type TurbulenceType
Examples ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ColorBlack is Color::BLACK: opaque black. ColorBlack = NewColor(0, 0, 0, 1) // ColorWhite is Color::WHITE: opaque white. ColorWhite = NewColor(1, 1, 1, 1) // ColorTransparent is Color::TRANSPARENT: fully transparent black. ColorTransparent = NewColor(0, 0, 0, 0) )
The colors of Color in filtra_types src/color.rs.
var ( // SourceGraphic is Input::SourceGraphic, the filtered element. SourceGraphic = Input{Kind: InputSourceGraphic} // SourceAlpha is Input::SourceAlpha, the alpha channel of the filtered // element, with black color. SourceAlpha = Input{Kind: InputSourceAlpha} )
The inputs that hold no index.
var ColorMatrixIdentity = [20]float32{
1, 0, 0, 0, 0,
0, 1, 0, 0, 0,
0, 0, 1, 0, 0,
0, 0, 0, 1, 0,
}
ColorMatrixIdentity is ColorMatrix::IDENTITY in filtra_types src/primitive/color_matrix.rs: the identity matrix.
Functions ¶
func Apply ¶ added in v0.25.0
func Apply[I any](f *Filter[I], target PixmapMut, pool *BufferPool, transform Transform, renderImage func(image I, subregion Rect, rect IntRect, data []byte))
Apply is apply in filtra src/lib.rs. It applies f to target in place, with transform mapping user space to the pixels of target.
Before the call, target holds the input SourceGraphic, as premultiplied RGBA8 pixels in sRGB. After it, target holds the result, and each pixel outside the filter region is transparent. pool holds the memory of the intermediate images between calls.
For each node of feImage that the result needs, Apply calls renderImage with the content of the node, its filter primitive subregion in user space, and the pixels to render the content into: a rectangle in the pixels of target, and a transparent buffer of that size in premultiplied RGBA8. renderImage can be nil when f has no such node.
Apply does not support the inputs BackgroundImage, BackgroundAlpha, FillPaint and StrokePaint. It ignores edgeMode of feGaussianBlur, and kernelUnitLength of feConvolveMatrix, feDiffuseLighting and feSpecularLighting, as filtra does.
Example ¶
This example applies a graph of two primitives with Apply: a blurred copy of the alpha of the content, moved by 5 pixels, under the content.
package main
import (
"fmt"
"github.com/xo/okage"
"github.com/xo/okage/filter"
)
func main() {
pixmap, _ := okage.NewPixmap(40, 40)
paint := okage.DefaultPaint()
paint.SetColorRGBA8(0, 0, 255, 255)
square, _ := okage.RectFromXYWH(10, 10, 15, 15)
pixmap.FillRect(square, &paint, okage.IdentityTransform(), nil)
f := filter.NewFilter[struct{}](filter.NewRect(0, 0, 40, 40))
blurred := f.Push(filter.NewNode[struct{}](filter.GaussianBlur{StdDevX: 2, StdDevY: 2}, filter.SourceAlpha))
shadow := f.Push(filter.NewNode[struct{}](filter.Offset{Dx: 5, Dy: 5}, blurred))
f.Push(filter.NewNode[struct{}](filter.Merge{}, shadow, filter.SourceGraphic))
target := filter.NewPixmapMut(pixmap.DataMut(), pixmap.Width(), pixmap.Height())
filter.Apply(&f, target, filter.NewBufferPool(4), filter.NewTransform(1, 1, 0, 0), nil)
for _, x := range []uint32{15, 27, 32} {
c, _ := pixmap.Pixel(x, 20)
fmt.Println(c.Red(), c.Green(), c.Blue(), c.Alpha())
}
}
Output: 0 0 255 255 0 0 0 228 0 0 0 26
func ApplyColorMatrix ¶
func ApplyColorMatrix(p *okage.Pixmap, m ColorMatrix, opts ...Option)
ApplyColorMatrix applies m to the premultiplied pixels of p in place, as feColorMatrix of filtra does. The kernel demultiplies each pixel, applies m, cuts each channel to 0 and 1, multiplies the pixel again, and rounds each channel to 8 bits.
func ApplyColorMatrixNRGBA ¶
func ApplyColorMatrixNRGBA(img *image.NRGBA, m ColorMatrix, opts ...Option)
ApplyColorMatrixNRGBA applies m to the pixels of img, which are not premultiplied, in place. It does the arithmetic of the kernel of filtra as for an opaque pixel, without the round trip through premultiplied pixels, which loses precision where the alpha is low. For an opaque pixel whose alpha stays opaque, it gives the bytes of ApplyColorMatrix.
Example ¶
This example makes a picture gray and then tints it with two colors, as a duotone does. Each row of a matrix gives a channel from the channels R, G, B and A, from 0 to 1, and a constant.
package main
import (
"fmt"
"image"
"image/color"
"github.com/xo/okage/filter"
)
func main() {
img := image.NewNRGBA(image.Rect(0, 0, 2, 1))
img.SetNRGBA(0, 0, color.NRGBA{R: 255, G: 128, B: 0, A: 255})
img.SetNRGBA(1, 0, color.NRGBA{R: 30, G: 60, B: 200, A: 128})
// The luminance with the weights of ivy, in each channel.
gray := filter.NewColorMatrix([20]float32{
0.299, 0.587, 0.114, 0, 0,
0.299, 0.587, 0.114, 0, 0,
0.299, 0.587, 0.114, 0, 0,
0, 0, 0, 1, 0,
})
filter.ApplyColorMatrixNRGBA(img, gray)
fmt.Printf("%v\n", img.Pix)
// A duotone from dark blue (0, 0, 0.4) to cream (1, 0.95, 0.8) by the
// gray in the channel R.
duotone := filter.NewColorMatrix([20]float32{
1, 0, 0, 0, 0,
0.95, 0, 0, 0, 0,
0.4, 0, 0, 0, 0.4,
0, 0, 0, 1, 0,
})
filter.ApplyColorMatrixNRGBA(img, duotone)
fmt.Printf("%v\n", img.Pix)
}
Output: [151 151 151 255 67 67 67 128] [151 143 162 255 67 64 129 128]
func ApplyComponentTransfer ¶
func ApplyComponentTransfer(p *okage.Pixmap, r, g, b, a TransferFunction, opts ...Option)
ApplyComponentTransfer applies the functions r, g, b and a to the channels of the premultiplied pixels of p in place, as feComponentTransfer of filtra does. The kernel demultiplies each pixel, applies the functions, cuts each channel to 0 and 1, multiplies the pixel again, and rounds each channel to 8 bits.
func ApplyComponentTransferNRGBA ¶
func ApplyComponentTransferNRGBA(img *image.NRGBA, r, g, b, a TransferFunction, opts ...Option)
ApplyComponentTransferNRGBA applies the functions r, g, b and a to the channels of the pixels of img, which are not premultiplied, in place. It does the arithmetic of the kernel of filtra as for an opaque pixel. For an opaque pixel whose alpha stays opaque, it gives the bytes of ApplyComponentTransfer.
Example ¶
This example changes the contrast and the brightness of a picture with a linear transfer function, and then makes it black and white. A discrete function of 256 values maps each byte of a channel to its own value, so it can put the threshold of the black and white at any byte.
package main
import (
"fmt"
"image"
"github.com/xo/okage/filter"
)
func main() {
img := image.NewNRGBA(image.Rect(0, 0, 3, 1))
copy(img.Pix, []byte{40, 40, 40, 255, 100, 100, 100, 255, 200, 200, 200, 255})
// A contrast factor of 1.5 around the middle gray, and a brightness of
// 0.1: 1.5 * (c - 0.5) + 0.5 + 0.1.
lum := filter.TransferLinear(1.5, -0.15)
filter.ApplyComponentTransferNRGBA(img, lum, lum, lum, filter.TransferFunction{})
fmt.Printf("%v\n", img.Pix)
// White from the byte 120 up.
values := make([]float32, 256)
for i := 120; i < 256; i++ {
values[i] = 1
}
biLevel := filter.TransferDiscrete(values)
filter.ApplyComponentTransferNRGBA(img, biLevel, biLevel, biLevel, filter.TransferFunction{})
fmt.Printf("%v\n", img.Pix)
}
Output: [22 22 22 255 112 112 112 255 255 255 255 255] [0 0 0 255 0 0 0 255 255 255 255 255]
func Blur ¶
Blur blurs the premultiplied pixels of p in place, as feGaussianBlur of filtra does with edgeMode="none". sigmaX and sigmaY are the standard deviations in pixels, and the function rounds them to float32, as filtra holds them.
A sigma of 0, a negative sigma or a NaN does not blur on its axis. Any positive sigma blurs. The blur reads transparent pixels outside the pixmap.
The blur reads only the smallest box that holds each pixel that is not 0. This gives the same bytes as a blur of the whole pixmap.
With WithLinearRGB, Blur converts the colors to linearRGB before the blur and back to sRGB after it, as filtra does.
Example ¶
This example blurs a pixmap with a small standard deviation.
package main
import (
"fmt"
"github.com/xo/okage"
"github.com/xo/okage/filter"
)
func main() {
pixmap, _ := okage.NewPixmap(30, 30)
paint := okage.DefaultPaint()
paint.SetColorRGBA8(200, 50, 50, 255)
square, _ := okage.RectFromXYWH(10, 10, 10, 10)
pixmap.FillRect(square, &paint, okage.IdentityTransform(), nil)
filter.Blur(pixmap, 1.5, 1.5)
for _, x := range []uint32{8, 10, 15} {
c, _ := pixmap.Pixel(x, 15)
fmt.Println(c.Red(), c.Green(), c.Blue(), c.Alpha())
}
}
Output: 31 8 8 39 126 32 32 161 200 50 50 254
func BlurMask ¶
BlurMask blurs the values of m in place, as Blur blurs the alpha of a pixmap. Each value of the result is the alpha of the same pixel after Blur on a pixmap whose alpha is m and whose colors are 0, with the same sigmas. WithLinearRGB changes no alpha, so BlurMask ignores it.
BlurMask takes the bytes of the mask with DataMut, so the mask holds all its pixels after the blur. A mask of okage.NewRectMask turns into pixels in the same way.
Example ¶
This example draws a soft shadow: it fills the silhouette of a shape into a mask, blurs the mask, and fills a pixmap with a color through the mask.
package main
import (
"fmt"
"github.com/xo/okage"
"github.com/xo/okage/filter"
)
func main() {
rect, _ := okage.RectFromXYWH(20, 20, 40, 30)
shape := okage.PathFromRect(rect)
mask, _ := okage.NewMask(80, 70)
mask.FillPath(shape, okage.FillRuleWinding, true, okage.IdentityTransform())
// The blur halves the mask once, blurs the small mask and doubles it again.
filter.BlurMask(mask, 4, 4)
pixmap, _ := okage.NewPixmap(80, 70)
paint := okage.DefaultPaint()
paint.SetColorRGBA8(0, 0, 0, 128)
all, _ := okage.RectFromXYWH(0, 0, 80, 70)
pixmap.FillRect(all, &paint, okage.IdentityTransform(), mask)
row := mask.Data()[35*80:]
fmt.Println(row[10], row[16], row[20], row[24], row[40])
}
Output: 3 48 140 222 255
Types ¶
type Blend ¶ added in v0.25.0
type Blend struct {
// Mode is the blend mode.
Mode BlendMode
// NoComposite is the attribute no-composite.
NoComposite bool
}
Blend is Blend in filtra_types src/primitive/blend.rs. It blends the first input (the source) onto the second (the backdrop), as feBlend does.
type BlendMode ¶ added in v0.25.0
type BlendMode uint8
BlendMode is BlendMode in filtra_types src/primitive/blend.rs: a blend mode of Compositing and Blending Level 1.
const ( BlendModeNormal BlendMode = iota BlendModeMultiply BlendModeScreen BlendModeOverlay BlendModeDarken BlendModeLighten BlendModeColorDodge BlendModeColorBurn BlendModeHardLight BlendModeSoftLight BlendModeDifference BlendModeExclusion BlendModeHue BlendModeSaturation BlendModeColor BlendModeLuminosity )
The values of BlendMode.
type BlurFunction ¶ added in v0.25.0
type BlurFunction float32
BlurFunction is FilterFunction::Blur: blur() with the standard deviation.
type BrightnessFunction ¶ added in v0.25.0
type BrightnessFunction float32
BrightnessFunction is FilterFunction::Brightness: brightness() with the amount.
type BufferPool ¶ added in v0.25.0
type BufferPool struct {
// contains filtered or unexported fields
}
BufferPool is BufferPool in filtra src/cpu/mod.rs: memory for the intermediate images of Apply, which a later call can use again. A BufferPool is not safe for use by more than one goroutine at a time.
func NewBufferPool ¶ added in v0.25.0
func NewBufferPool(maxBuffers int) *BufferPool
NewBufferPool is BufferPool::new in filtra src/cpu/mod.rs. It creates an empty pool that keeps up to maxBuffers buffers between calls.
func (*BufferPool) Memory ¶ added in v0.25.0
func (p *BufferPool) Memory() int
Memory is BufferPool::memory in filtra src/cpu/mod.rs. It returns the number of bytes that the pool holds.
func (*BufferPool) ShrinkTo ¶ added in v0.25.0
func (p *BufferPool) ShrinkTo(bytes int)
ShrinkTo is BufferPool::shrink_to in filtra src/cpu/mod.rs. It frees buffers, the largest first, until the pool holds at most bytes.
type Color ¶ added in v0.25.0
type Color struct {
// R is the red component.
R float32
// G is the green component.
G float32
// B is the blue component.
B float32
// A is the alpha component.
A float32
}
Color is Color in filtra_types src/color.rs. It is a color in gamma-encoded sRGB with unpremultiplied alpha.
func NewColor ¶ added in v0.25.0
NewColor is Color::new in filtra_types src/color.rs. It creates a color from its components.
func (Color) WithOpacity ¶ added in v0.25.0
WithOpacity is Color::with_opacity in filtra_types src/color.rs. It returns the color with its alpha multiplied by opacity.
type ColorChannel ¶ added in v0.25.0
type ColorChannel uint8
ColorChannel is ColorChannel in filtra_types src/primitive/displacement_map.rs: a color or alpha channel of an image. The values are the indexes of the channels in a pixel.
const ( // ColorChannelR is red. ColorChannelR ColorChannel = iota // ColorChannelG is green. ColorChannelG // ColorChannelB is blue. ColorChannelB // ColorChannelA is alpha. ColorChannelA )
The values of ColorChannel.
func (ColorChannel) Keyword ¶ added in v0.25.0
func (c ColorChannel) Keyword() string
Keyword is ColorChannel::keyword in filtra_types src/primitive/displacement_map.rs. It returns the value of the attributes xChannelSelector and yChannelSelector.
func (ColorChannel) String ¶ added in v0.25.0
func (c ColorChannel) String() string
String returns the keyword of c.
type ColorInterpolation ¶ added in v0.25.0
type ColorInterpolation uint8
ColorInterpolation is ColorInterpolation in filtra_types src/color.rs. It is the color space that a filter primitive works in, the property color-interpolation-filters. NewNode sets ColorInterpolationLinearRGB, the default of filtra.
const ( // ColorInterpolationAuto lets the implementation choose. ColorInterpolationAuto ColorInterpolation = iota // ColorInterpolationSRGB is gamma-encoded sRGB. ColorInterpolationSRGB // ColorInterpolationLinearRGB is linear-light sRGB. ColorInterpolationLinearRGB )
The values of ColorInterpolation.
func (ColorInterpolation) Keyword ¶ added in v0.25.0
func (c ColorInterpolation) Keyword() string
Keyword is ColorInterpolation::keyword in filtra_types src/color.rs. It returns the value of the property color-interpolation-filters.
func (ColorInterpolation) String ¶ added in v0.25.0
func (c ColorInterpolation) String() string
String returns the keyword of c.
type ColorMatrix ¶
type ColorMatrix struct {
// contains filtered or unexported fields
}
ColorMatrix is ColorMatrix in filtra_types src/primitive/color_matrix.rs. It changes the unpremultiplied color of each pixel with a matrix, as feColorMatrix does. NewColorMatrix, SaturateMatrix, HueRotateMatrix and LuminanceToAlphaMatrix make its four kinds.
The zero value is the default of filtra, the identity matrix of the kind ColorMatrixMatrix. It changes no color (D88).
func HueRotateMatrix ¶
func HueRotateMatrix(degrees float32) ColorMatrix
HueRotateMatrix returns ColorMatrix::HueRotate of filtra_types, the matrix of type="hueRotate", which turns the hue of the colors by degrees. The matrix keeps the alpha.
func LuminanceToAlphaMatrix ¶
func LuminanceToAlphaMatrix() ColorMatrix
LuminanceToAlphaMatrix returns ColorMatrix::LuminanceToAlpha of filtra_types, the matrix of type="luminanceToAlpha". It sets the alpha to the luminance of the color and the color to black.
func NewColorMatrix ¶
func NewColorMatrix(m [20]float32) ColorMatrix
NewColorMatrix returns ColorMatrix::Matrix of filtra_types: the matrix m of 4 rows of 5 numbers, row by row, as type="matrix" gives it. Each row gives a channel of R, G, B and A, from the channels R, G, B and A from 0 to 1, and a constant.
func SaturateMatrix ¶
func SaturateMatrix(v float32) ColorMatrix
SaturateMatrix returns ColorMatrix::Saturate of filtra_types, the matrix of type="saturate" for the value v. 0 makes the colors gray, and 1 changes nothing. The matrix keeps the alpha.
func (ColorMatrix) Keyword ¶ added in v0.25.0
func (m ColorMatrix) Keyword() string
Keyword is ColorMatrix::keyword in filtra_types src/primitive/color_matrix.rs. It returns the value of the attribute type.
func (ColorMatrix) Kind ¶ added in v0.25.0
func (m ColorMatrix) Kind() ColorMatrixKind
Kind returns the kind of m.
func (ColorMatrix) Value ¶ added in v0.25.0
func (m ColorMatrix) Value() float32
Value returns the value of a ColorMatrix of the kind ColorMatrixSaturate or ColorMatrixHueRotate.
func (ColorMatrix) Values ¶ added in v0.25.0
func (m ColorMatrix) Values() [20]float32
Values returns the matrix of a ColorMatrix of the kind ColorMatrixMatrix. For the zero value, it returns ColorMatrixIdentity.
type ColorMatrixKind ¶ added in v0.25.0
type ColorMatrixKind uint8
ColorMatrixKind is the kind of a ColorMatrix, its attribute type.
const ( // ColorMatrixMatrix is ColorMatrix::Matrix: a matrix of 5 by 4 numbers, // row by row, applied to [R, G, B, A, 1]. ColorMatrixMatrix ColorMatrixKind = iota // ColorMatrixSaturate is ColorMatrix::Saturate: a change of the // saturation, where 0 is gray and 1 changes nothing. ColorMatrixSaturate // ColorMatrixHueRotate is ColorMatrix::HueRotate: a rotation of the hue // in degrees. ColorMatrixHueRotate // ColorMatrixLuminanceToAlpha is ColorMatrix::LuminanceToAlpha. It sets // the alpha to the luminance and the color to black. ColorMatrixLuminanceToAlpha )
The kinds of a ColorMatrix.
type ComponentTransfer ¶ added in v0.25.0
type ComponentTransfer struct {
// Red is the function applied to red.
Red TransferFunction
// Green is the function applied to green.
Green TransferFunction
// Blue is the function applied to blue.
Blue TransferFunction
// Alpha is the function applied to alpha.
Alpha TransferFunction
}
ComponentTransfer is ComponentTransfer in filtra_types src/primitive/component_transfer.rs. It maps each unpremultiplied color and alpha component, as feComponentTransfer does. The zero value changes nothing.
type Composite ¶ added in v0.25.0
type Composite struct {
// Operator is the compositing operator.
Operator CompositeOperator
}
Composite is Composite in filtra_types src/primitive/composite.rs. It composites the first input (the source) onto the second (the destination), as feComposite does.
type CompositeOperator ¶ added in v0.25.0
type CompositeOperator struct {
// Kind is the operator.
Kind CompositeOperatorKind
// K1 is the attribute k1.
K1 float32
// K2 is the attribute k2.
K2 float32
// K3 is the attribute k3.
K3 float32
// K4 is the attribute k4.
K4 float32
}
CompositeOperator is CompositeOperator in filtra_types src/primitive/composite.rs: the operator of a Composite. K1, K2, K3 and K4 mean something only for CompositeArithmetic.
func (CompositeOperator) Keyword ¶ added in v0.25.0
func (o CompositeOperator) Keyword() string
Keyword is CompositeOperator::keyword in filtra_types src/primitive/composite.rs. It returns the value of the attribute operator.
type CompositeOperatorKind ¶ added in v0.25.0
type CompositeOperatorKind uint8
CompositeOperatorKind is the kind of a CompositeOperator.
const ( // CompositeOver is Porter-Duff source over. CompositeOver CompositeOperatorKind = iota // CompositeIn is Porter-Duff source in. CompositeIn // CompositeOut is Porter-Duff source out. CompositeOut // CompositeAtop is Porter-Duff source atop. CompositeAtop // CompositeXor is Porter-Duff XOR. CompositeXor // CompositeLighter is Porter-Duff lighter (plus). CompositeLighter // CompositeArithmetic is k1 * i1 * i2 + k2 * i1 + k3 * i2 + k4 for each // channel. CompositeArithmetic )
The kinds of a CompositeOperator.
type ContrastFunction ¶ added in v0.25.0
type ContrastFunction float32
ContrastFunction is FilterFunction::Contrast: contrast() with the amount.
type ConvolveMatrix ¶ added in v0.25.0
type ConvolveMatrix struct {
// OrderX is the number of columns of the kernel.
OrderX uint32
// OrderY is the number of rows of the kernel.
OrderY uint32
// Kernel holds the values of the kernel, row by row.
Kernel []float32
// Divisor is the divisor. No value means the sum of the values of the
// kernel.
Divisor Optional[float32]
// Bias is the value added to each component after the division.
Bias float32
// TargetX is the column of the kernel over the target pixel. No value
// means OrderX / 2.
TargetX Optional[int32]
// TargetY is the row of the kernel over the target pixel. No value
// means OrderY / 2.
TargetY Optional[int32]
// EdgeMode is how the input is extended beyond its borders.
EdgeMode EdgeMode
// KernelUnitLength is the distance between the cells of the kernel, as
// dx and dy. No value means one pixel.
KernelUnitLength Optional[[2]float32]
// PreserveAlpha reports whether the alpha stays as it is.
PreserveAlpha bool
}
ConvolveMatrix is ConvolveMatrix in filtra_types src/primitive/convolve_matrix.rs. It combines each pixel with its neighbors with a convolution kernel, as feConvolveMatrix does. DefaultConvolveMatrix gives its default.
func DefaultConvolveMatrix ¶ added in v0.25.0
func DefaultConvolveMatrix() ConvolveMatrix
DefaultConvolveMatrix is impl Default for ConvolveMatrix in filtra_types src/primitive/convolve_matrix.rs.
type DiffuseLighting ¶ added in v0.25.0
type DiffuseLighting struct {
// SurfaceScale is the height of the surface where the alpha of the input
// is 1.
SurfaceScale float32
// DiffuseConstant is the diffuse lighting constant kd.
DiffuseConstant float32
// KernelUnitLength is the distance between the samples of the normal, as
// dx and dy. No value means one pixel.
KernelUnitLength Optional[[2]float32]
// LightingColor is the property lighting-color.
LightingColor Color
// LightSource is the light source.
LightSource LightSource
}
DiffuseLighting is DiffuseLighting in filtra_types src/primitive/diffuse_lighting.rs. It lights the alpha of the input as a bump map with a diffuse term, as feDiffuseLighting does.
func NewDiffuseLighting ¶ added in v0.25.0
func NewDiffuseLighting(lightSource LightSource) DiffuseLighting
NewDiffuseLighting is DiffuseLighting::new in filtra_types src/primitive/diffuse_lighting.rs. It creates the primitive with lightSource and the initial values otherwise.
type DisplacementMap ¶ added in v0.25.0
type DisplacementMap struct {
// Scale is the scale of the displacement.
Scale float32
// XChannel is the channel of the second input that moves the pixels
// along x.
XChannel ColorChannel
// YChannel is the channel of the second input that moves the pixels
// along y.
YChannel ColorChannel
}
DisplacementMap is DisplacementMap in filtra_types src/primitive/displacement_map.rs. It moves the pixels of the first input by the values of the channels of the second, as feDisplacementMap does. Use ColorChannelA for each channel to get the default of filtra.
type DistantLight ¶ added in v0.25.0
type DistantLight struct {
// Azimuth is the direction in the XY plane in degrees, clockwise from
// the x-axis.
Azimuth float32
// Elevation is the direction from the XY plane towards the z-axis in
// degrees.
Elevation float32
}
DistantLight is DistantLight in filtra_types src/primitive/light_source.rs: a light that is infinitely far away, as feDistantLight.
type DropShadow ¶ added in v0.25.0
type DropShadow struct {
// Dx is the offset along the x-axis.
Dx float32
// Dy is the offset along the y-axis.
Dy float32
// StdDevX is the standard deviation of the blur along the x-axis.
StdDevX float32
// StdDevY is the standard deviation of the blur along the y-axis.
StdDevY float32
// Color is the property flood-color.
Color Color
// Opacity is the property flood-opacity.
Opacity float32
}
DropShadow is DropShadow in filtra_types src/primitive/drop_shadow.rs. It draws a blurred, offset and colored copy of the alpha of the input beneath it, as feDropShadow does. DefaultDropShadow gives its default.
func DefaultDropShadow ¶ added in v0.25.0
func DefaultDropShadow() DropShadow
DefaultDropShadow is impl Default for DropShadow in filtra_types src/primitive/drop_shadow.rs.
type DropShadowFunction ¶ added in v0.25.0
type DropShadowFunction struct {
// Dx is the offset of the shadow along the x-axis.
Dx float32
// Dy is the offset of the shadow along the y-axis.
Dy float32
// StdDev is the standard deviation of the blur of the shadow.
StdDev float32
// Color is the color of the shadow.
Color Color
}
DropShadowFunction is FilterFunction::DropShadow: drop-shadow().
type EdgeMode ¶ added in v0.25.0
type EdgeMode uint8
EdgeMode is EdgeMode in filtra_types src/primitive/edge_mode.rs: how an input is extended beyond its borders, the attribute edgeMode.
const ( // EdgeModeDuplicate repeats the color values at the nearest edge. EdgeModeDuplicate EdgeMode = iota // EdgeModeWrap takes the color values from the opposite edge. EdgeModeWrap // EdgeModeMirror takes the color values mirrored across the edge. EdgeModeMirror // EdgeModeNone extends with transparent black. EdgeModeNone )
The values of EdgeMode.
type Filter ¶ added in v0.25.0
type Filter[I any] struct { // Region is the filter region in user space. Region Rect // contains filtered or unexported fields }
Filter is Filter<I> in filtra_types src/filter.rs. It is a filter element: its region and its primitives, with I the content of the nodes of feImage. A Filter made with NewFilter or a literal with a region is ready to use, and Push adds its nodes.
func FilterAsRef ¶ added in v0.25.0
FilterAsRef is Filter::as_ref in filtra_types src/filter.rs. It converts from a Filter[I] to a Filter[*I].
func FilterFromFunctions ¶ added in v0.25.0
func FilterFromFunctions[I any](functions []FilterFunction, bounds Rect) Filter[I]
FilterFromFunctions is Filter::from_functions in filtra_types src/filter.rs. It returns the filter that is the same as a list of filter functions applied to content within bounds.
func FilterTryMapImages ¶ added in v0.25.0
FilterTryMapImages is Filter::try_map_images in filtra_types src/filter.rs. It returns the filter with the content of each feImage mapped by fn. It stops at the first error of fn and returns it.
func NewFilter ¶ added in v0.25.0
NewFilter is Filter::new in filtra_types src/filter.rs. It creates a filter with the given region and no primitives.
func (*Filter[I]) Nodes ¶ added in v0.25.0
Nodes is Filter::nodes in filtra_types src/filter.rs. It returns the nodes in document order. The caller must not change the slice.
func (*Filter[I]) Push ¶ added in v0.25.0
Push is Filter::push in filtra_types src/filter.rs. It appends a node and returns the input that refers to its result.
func (*Filter[I]) Subregions ¶ added in v0.25.0
Subregions is Filter::subregions in filtra_types src/filter.rs. It returns the filter primitive subregion of each node, with the missing attributes filled in (§9.4).
type FilterFunction ¶ added in v0.25.0
type FilterFunction interface {
// contains filtered or unexported methods
}
FilterFunction is FilterFunction in filtra_types src/filter_function.rs: a filter function of CSS, with the percentages converted so that 100% is 1. Its values are BlurFunction, BrightnessFunction, ContrastFunction, DropShadowFunction, GrayscaleFunction, HueRotateFunction, InvertFunction, OpacityFunction, SaturateFunction and SepiaFunction (D27).
type Flood ¶ added in v0.25.0
type Flood struct {
// Color is the property flood-color.
Color Color
// Opacity is the property flood-opacity.
Opacity float32
}
Flood is Flood in filtra_types src/primitive/flood.rs. It fills the filter primitive subregion with a color, as feFlood does. DefaultFlood gives its default.
func DefaultFlood ¶ added in v0.25.0
func DefaultFlood() Flood
DefaultFlood is impl Default for Flood in filtra_types src/primitive/flood.rs.
type GaussianBlur ¶ added in v0.25.0
type GaussianBlur struct {
// StdDevX is the standard deviation along the x-axis.
StdDevX float32
// StdDevY is the standard deviation along the y-axis.
StdDevY float32
// EdgeMode is how the input is extended beyond its borders.
EdgeMode EdgeMode
}
GaussianBlur is GaussianBlur in filtra_types src/primitive/gaussian_blur.rs. It blurs the input with a Gaussian kernel, as feGaussianBlur does. DefaultGaussianBlur gives its default.
func DefaultGaussianBlur ¶ added in v0.25.0
func DefaultGaussianBlur() GaussianBlur
DefaultGaussianBlur is impl Default for GaussianBlur in filtra_types src/primitive/gaussian_blur.rs.
type GrayscaleFunction ¶ added in v0.25.0
type GrayscaleFunction float32
GrayscaleFunction is FilterFunction::Grayscale: grayscale() with the amount, clamped to 1.
type HueRotateFunction ¶ added in v0.25.0
type HueRotateFunction float32
HueRotateFunction is FilterFunction::HueRotate: hue-rotate() with the angle in degrees.
type Image ¶ added in v0.25.0
type Image[I any] struct { // Content is the content that the node renders. Content I }
Image is Primitive::Image in filtra_types src/primitive/mod.rs: feImage, with the content that it renders.
type Input ¶ added in v0.25.0
type Input struct {
// Kind is the kind of the input.
Kind InputKind
// Index is the index of the node of an input of the kind InputResult.
Index int
}
Input is Input in filtra_types src/filter.rs: an input of a filter primitive. The zero value is SourceGraphic.
func ResultInput ¶ added in v0.25.0
ResultInput is Input::Result in filtra_types src/filter.rs: the result of the node at index.
type InputKind ¶ added in v0.25.0
type InputKind uint8
InputKind is the kind of an Input.
const ( // InputSourceGraphic is the filtered element. InputSourceGraphic InputKind = iota // InputSourceAlpha is the alpha channel of the filtered element, with // black color. InputSourceAlpha // InputResult is the result of an earlier node of the same filter, by // index. InputResult )
The kinds of an Input.
type IntRect ¶ added in v0.25.0
type IntRect struct {
// X0 is the left edge.
X0 int32
// Y0 is the top edge.
Y0 int32
// X1 is the right edge.
X1 int32
// Y1 is the bottom edge.
Y1 int32
}
IntRect is IntRect in filtra_core src/rect.rs: a rectangle of whole pixels, from (X0, Y0) inclusive to (X1, Y1) exclusive.
func NewIntRect ¶ added in v0.25.0
NewIntRect is IntRect::new in filtra_core src/rect.rs. It creates a rectangle from its edges.
func (IntRect) Height ¶ added in v0.25.0
Height is IntRect::height in filtra_core src/rect.rs. It returns the height, or 0 if the rectangle is empty.
func (IntRect) Intersect ¶ added in v0.25.0
Intersect is IntRect::intersect in filtra_core src/rect.rs. It returns the pixels in both rectangles.
type InvertFunction ¶ added in v0.25.0
type InvertFunction float32
InvertFunction is FilterFunction::Invert: invert() with the amount, clamped to 1.
type LightSource ¶ added in v0.25.0
type LightSource interface {
// contains filtered or unexported methods
}
LightSource is LightSource in filtra_types src/primitive/light_source.rs: the light source of a lighting primitive. Its values are DistantLight, PointLight and SpotLight (D27).
type Merge ¶ added in v0.25.0
type Merge struct{}
Merge is Merge in filtra_types src/primitive/merge.rs. It stacks its inputs with source over, the first input at the bottom, as feMerge does.
type Morphology ¶ added in v0.25.0
type Morphology struct {
// Operator chooses to erode or to dilate.
Operator MorphologyOperator
// RadiusX is the radius of the kernel along the x-axis.
RadiusX float32
// RadiusY is the radius of the kernel along the y-axis.
RadiusY float32
}
Morphology is Morphology in filtra_types src/primitive/morphology.rs. It makes the input thinner or fatter, as feMorphology does.
type MorphologyOperator ¶ added in v0.25.0
type MorphologyOperator uint8
MorphologyOperator is MorphologyOperator in filtra_types src/primitive/morphology.rs: whether a Morphology makes the input thinner or fatter.
const ( // MorphologyErode takes the minimum of each component over the kernel. MorphologyErode MorphologyOperator = iota // MorphologyDilate takes the maximum of each component over the kernel. MorphologyDilate )
The values of MorphologyOperator.
func (MorphologyOperator) Keyword ¶ added in v0.25.0
func (o MorphologyOperator) Keyword() string
Keyword is MorphologyOperator::keyword in filtra_types src/primitive/morphology.rs. It returns the value of the attribute operator.
func (MorphologyOperator) String ¶ added in v0.25.0
func (o MorphologyOperator) String() string
String returns the keyword of o.
type Node ¶ added in v0.25.0
type Node[I any] struct { // Primitive is the primitive. Primitive Primitive // Inputs are the inputs in the order that the primitive takes them (in, // in2 or the merge nodes). Inputs []Input // Subregion is the filter primitive subregion. Subregion Subregion // ColorInterpolation is the property color-interpolation-filters. ColorInterpolation ColorInterpolation }
Node is Node<I> in filtra_types src/filter.rs. It is a filter primitive with its inputs and the attributes that all primitives have.
type Offset ¶ added in v0.25.0
type Offset struct {
// Dx is the offset along the x-axis.
Dx float32
// Dy is the offset along the y-axis.
Dy float32
}
Offset is Offset in filtra_types src/primitive/offset.rs. It moves the input, as feOffset does.
type OpacityFunction ¶ added in v0.25.0
type OpacityFunction float32
OpacityFunction is FilterFunction::Opacity: opacity() with the amount, clamped to 1.
type Option ¶
type Option func(*options)
Option configures one call of a function of this package (D20).
func WithLinearRGB ¶
func WithLinearRGB() Option
WithLinearRGB makes Blur and the color functions work in linearRGB, as the property color-interpolation-filters="linearRGB" does in filtra. The function converts the colors from sRGB to linearRGB, applies its filter, and converts the colors back to sRGB. Without it, the functions work in sRGB.
type Optional ¶ added in v0.25.0
type Optional[T any] struct { // Value is the value. It means nothing when Valid is false. Value T // Valid reports whether the value is set. Valid bool }
Optional is an Option of Rust: a value and whether it is set.
type PixmapMut ¶ added in v0.25.0
type PixmapMut struct {
// contains filtered or unexported fields
}
PixmapMut is PixmapMut in filtra src/cpu/pixmap.rs: premultiplied RGBA8 pixels that the caller holds, stored row by row. The data of an okage.Pixmap, from its method DataMut, is such pixels.
func NewPixmapMut ¶ added in v0.25.0
NewPixmapMut is PixmapMut::from_data in filtra src/cpu/pixmap.rs. It uses data, which holds premultiplied RGBA8 pixels, as a pixmap of width by height pixels. It panics if the length of data is not width * height * 4.
type PointLight ¶ added in v0.25.0
type PointLight struct {
// X is the x position.
X float32
// Y is the y position.
Y float32
// Z is the z position. A positive z points towards the viewer.
Z float32
}
PointLight is PointLight in filtra_types src/primitive/light_source.rs: a light at a position, as fePointLight.
type Primitive ¶ added in v0.25.0
type Primitive interface {
// contains filtered or unexported methods
}
Primitive is Primitive<I> in filtra_types src/primitive/mod.rs: a filter primitive (D27). Its values are Blend, ColorMatrix, ComponentTransfer, Composite, ConvolveMatrix, DiffuseLighting, DisplacementMap, DropShadow, Flood, GaussianBlur, Image, Merge, Morphology, Offset, SpecularLighting, Tile and Turbulence. The type parameter I of Rust is the type parameter of Image.
func PrimitiveAsRef ¶ added in v0.25.0
PrimitiveAsRef is Primitive::as_ref in filtra_types src/primitive/mod.rs. It converts an Image[I] to an Image[*I] that points at a copy of the content of p, and returns every other primitive as it is.
func PrimitiveTryMapImage ¶ added in v0.25.0
PrimitiveTryMapImage is Primitive::try_map_image in filtra_types src/primitive/mod.rs. It returns the primitive with the content of an Image[I] mapped by fn, and every other primitive as it is.
type Rect ¶ added in v0.25.0
type Rect struct {
// X is the left edge.
X float32
// Y is the top edge.
Y float32
// Width is the width.
Width float32
// Height is the height.
Height float32
}
Rect is Rect in filtra_types src/filter.rs: a rectangle in user space.
func NewRect ¶ added in v0.25.0
NewRect is Rect::new in filtra_types src/filter.rs. It creates a rectangle from its position and size.
func RectFromLTRB ¶ added in v0.25.0
RectFromLTRB is Rect::from_ltrb in filtra_types src/filter.rs. It creates a rectangle from its left, top, right and bottom edges.
type SaturateFunction ¶ added in v0.25.0
type SaturateFunction float32
SaturateFunction is FilterFunction::Saturate: saturate() with the amount.
type SepiaFunction ¶ added in v0.25.0
type SepiaFunction float32
SepiaFunction is FilterFunction::Sepia: sepia() with the amount, clamped to 1.
type SpecularLighting ¶ added in v0.25.0
type SpecularLighting struct {
// SurfaceScale is the height of the surface where the alpha of the input
// is 1.
SurfaceScale float32
// SpecularConstant is the specular lighting constant ks.
SpecularConstant float32
// SpecularExponent is the exponent of the specular term. A larger one
// is shinier.
SpecularExponent float32
// KernelUnitLength is the distance between the samples of the normal, as
// dx and dy. No value means one pixel.
KernelUnitLength Optional[[2]float32]
// LightingColor is the property lighting-color.
LightingColor Color
// LightSource is the light source.
LightSource LightSource
}
SpecularLighting is SpecularLighting in filtra_types src/primitive/specular_lighting.rs. It lights the alpha of the input as a bump map with a specular term, as feSpecularLighting does.
func NewSpecularLighting ¶ added in v0.25.0
func NewSpecularLighting(lightSource LightSource) SpecularLighting
NewSpecularLighting is SpecularLighting::new in filtra_types src/primitive/specular_lighting.rs. It creates the primitive with lightSource and the initial values otherwise.
type SpotLight ¶ added in v0.25.0
type SpotLight struct {
// X is the x position.
X float32
// Y is the y position.
Y float32
// Z is the z position. A positive z points towards the viewer.
Z float32
// PointsAtX is the x position that the light points at.
PointsAtX float32
// PointsAtY is the y position that the light points at.
PointsAtY float32
// PointsAtZ is the z position that the light points at.
PointsAtZ float32
// SpecularExponent is the exponent that controls how focused the light
// is.
SpecularExponent float32
// LimitingConeAngle is the half-angle of the cone in degrees. No value
// means no cone.
LimitingConeAngle Optional[float32]
}
SpotLight is SpotLight in filtra_types src/primitive/light_source.rs: a light at a position that throws a cone, as feSpotLight. DefaultSpotLight gives its default.
func DefaultSpotLight ¶ added in v0.25.0
func DefaultSpotLight() SpotLight
DefaultSpotLight is impl Default for SpotLight in filtra_types src/primitive/light_source.rs.
type Subregion ¶ added in v0.25.0
type Subregion struct {
// X is the attribute x.
X Optional[float32]
// Y is the attribute y.
Y Optional[float32]
// Width is the attribute width.
Width Optional[float32]
// Height is the attribute height.
Height Optional[float32]
}
Subregion is Subregion in filtra_types src/filter.rs: the attributes x, y, width and height of a filter primitive in user space. An attribute that is not set takes its default.
func SubregionFromRect ¶ added in v0.25.0
SubregionFromRect is impl From<Rect> for Subregion in filtra_types src/filter.rs. It sets each attribute.
type Tile ¶ added in v0.25.0
type Tile struct{}
Tile is Tile in filtra_types src/primitive/tile.rs. It fills the subregion with copies of the subregion of the input, as feTile does.
type TransferFunction ¶
type TransferFunction struct {
// contains filtered or unexported fields
}
TransferFunction is TransferFunction in filtra_types src/primitive/component_transfer.rs. It maps one component, from 0 to 1, as feFuncR, feFuncG, feFuncB and feFuncA do. TransferTable, TransferDiscrete, TransferLinear and TransferGamma make its kinds. The zero value is the identity.
func TransferDiscrete ¶
func TransferDiscrete(values []float32) TransferFunction
TransferDiscrete returns TransferFunction::Discrete of filtra_types, the function of type="discrete". It splits the range from 0 to 1 into as many equal steps as values, and maps each step to its value. No value gives the identity. The function holds a copy of values.
func TransferGamma ¶
func TransferGamma(amplitude, exponent, offset float32) TransferFunction
TransferGamma returns TransferFunction::Gamma of filtra_types, the function of type="gamma": amplitude * pow(C, exponent) + offset.
func TransferLinear ¶
func TransferLinear(slope, intercept float32) TransferFunction
TransferLinear returns TransferFunction::Linear of filtra_types, the function of type="linear": slope * C + intercept.
func TransferTable ¶
func TransferTable(values []float32) TransferFunction
TransferTable returns TransferFunction::Table of filtra_types, the function of type="table". It maps the component along the straight lines between the values, which split the range from 0 to 1 in equal parts. No value gives the identity. The function holds a copy of values.
func (TransferFunction) Gamma ¶ added in v0.25.0
func (f TransferFunction) Gamma() (amplitude, exponent, offset float32)
Gamma returns the amplitude, the exponent and the offset of a gamma function.
func (TransferFunction) Keyword ¶ added in v0.25.0
func (f TransferFunction) Keyword() string
Keyword is TransferFunction::keyword in filtra_types src/primitive/component_transfer.rs. It returns the value of the attribute type.
func (TransferFunction) Kind ¶ added in v0.25.0
func (f TransferFunction) Kind() TransferKind
Kind returns the kind of f.
func (TransferFunction) Linear ¶ added in v0.25.0
func (f TransferFunction) Linear() (slope, intercept float32)
Linear returns the slope and the intercept of a linear function.
func (TransferFunction) Values ¶ added in v0.25.0
func (f TransferFunction) Values() []float32
Values returns a copy of the values of a table or a discrete function.
type TransferKind ¶ added in v0.25.0
type TransferKind uint8
TransferKind is the kind of a TransferFunction, its attribute type.
const ( // TransferIdentity is TransferFunction::Identity. It changes nothing. TransferIdentity TransferKind = iota // TransferTableKind is TransferFunction::Table. TransferTableKind // TransferDiscreteKind is TransferFunction::Discrete. TransferDiscreteKind // TransferLinearKind is TransferFunction::Linear. TransferLinearKind // TransferGammaKind is TransferFunction::Gamma. TransferGammaKind )
The kinds of a TransferFunction.
type Transform ¶ added in v0.25.0
type Transform struct {
// Sx is the horizontal scale.
Sx float32
// Sy is the vertical scale.
Sy float32
// Tx is the horizontal translation in pixels.
Tx float32
// Ty is the vertical translation in pixels.
Ty float32
}
Transform is Transform in filtra src/lib.rs: a scale and a translation that map user space to pixels. A negative scale flips an axis.
func NewTransform ¶ added in v0.25.0
NewTransform is Transform::new in filtra src/lib.rs. It creates a transform from its scales and translations.
type Turbulence ¶ added in v0.25.0
type Turbulence struct {
// BaseFrequencyX is the base frequency along the x-axis.
BaseFrequencyX float32
// BaseFrequencyY is the base frequency along the y-axis.
BaseFrequencyY float32
// NumOctaves is the number of octaves.
NumOctaves int32
// Seed is the random seed, truncated towards zero.
Seed float32
// StitchTiles reports whether the noise tiles across the subregion
// with no seam.
StitchTiles bool
// Kind is the noise function.
Kind TurbulenceType
}
Turbulence is Turbulence in filtra_types src/primitive/turbulence.rs. It makes Perlin turbulence, as feTurbulence does. DefaultTurbulence gives its default.
func DefaultTurbulence ¶ added in v0.25.0
func DefaultTurbulence() Turbulence
DefaultTurbulence is impl Default for Turbulence in filtra_types src/primitive/turbulence.rs.
type TurbulenceType ¶ added in v0.25.0
type TurbulenceType uint8
TurbulenceType is TurbulenceType in filtra_types src/primitive/turbulence.rs: the noise function of a Turbulence.
const ( // TurbulenceTypeFractalNoise is the sum of the octaves of the noise. TurbulenceTypeFractalNoise TurbulenceType = iota // TurbulenceTypeTurbulence is the sum of the absolute values of the // octaves of the noise. TurbulenceTypeTurbulence )
The values of TurbulenceType.
func (TurbulenceType) Keyword ¶ added in v0.25.0
func (t TurbulenceType) Keyword() string
Keyword is TurbulenceType::keyword in filtra_types src/primitive/turbulence.rs. It returns the value of the attribute type.
func (TurbulenceType) String ¶ added in v0.25.0
func (t TurbulenceType) String() string
String returns the keyword of t.
Source Files
¶
- core_blur.go
- core_color_space.go
- core_convolve_matrix.go
- core_lighting.go
- core_rect.go
- core_turbulence.go
- filtra_cpu.go
- filtra_cpu_executor.go
- filtra_cpu_pixmap.go
- filtra_lib.go
- filtra_plan.go
- filtra_plan_buffers.go
- filtra_plan_planner.go
- kernels_alpha.go
- kernels_arithmetic.go
- kernels_blend.go
- kernels_blur.go
- kernels_color_matrix.go
- kernels_color_space.go
- kernels_component_transfer.go
- kernels_composite.go
- kernels_convolve_matrix.go
- kernels_displacement_map.go
- kernels_flood.go
- kernels_lighting.go
- kernels_merge.go
- kernels_morphology.go
- kernels_mul_q15.go
- kernels_offset.go
- kernels_pixmap.go
- kernels_simd.go
- kernels_tile.go
- kernels_turbulence.go
- okage_filter.go
- okage_math.go
- types_color.go
- types_filter.go
- types_filter_function.go
- types_primitive.go
- types_primitive_blend.go
- types_primitive_color_matrix.go
- types_primitive_component_transfer.go
- types_primitive_composite.go
- types_primitive_convolve_matrix.go
- types_primitive_diffuse_lighting.go
- types_primitive_displacement_map.go
- types_primitive_drop_shadow.go
- types_primitive_edge_mode.go
- types_primitive_flood.go
- types_primitive_gaussian_blur.go
- types_primitive_light_source.go
- types_primitive_merge.go
- types_primitive_morphology.go
- types_primitive_offset.go
- types_primitive_specular_lighting.go
- types_primitive_tile.go
- types_primitive_turbulence.go