Module vizia::vg::image_filters

Structs§

  • This is just a convenience type to allow passing IRects, Rects, and optional references to those types as a crop rect for the image filter factories. It’s not intended to be used directly.

Enums§

Functions§

  • Create a filter that implements a custom blend mode. Each output pixel is the result of combining the corresponding background and foreground pixels using the 4 coefficients: k1 * foreground * background + k2 * foreground + k3 * background + k4
  • This filter takes an crate::BlendMode and uses it to composite the two filters together.
  • Create a filter that blurs its input by the separate X and Y sigmas. The provided tile mode is used when the blur kernel goes outside the input image.
  • Create a filter that composes ‘inner’ with ‘outer’, such that the results of ‘inner’ are treated as the source bitmap passed to ‘outer’, i.e. result = outer(inner(source)).
  • Create a filter that applies a crop to the result of the ‘input’ filter. Pixels within the crop rectangle are unmodified from what ‘input’ produced. Pixels outside of crop match the provided TileMode (defaulting to Decal).
  • Create a filter that dilates each input pixel’s channel values to the max value within the given radii along the x and y axes.
  • Create a filter that moves each pixel in its color input based on an (x,y) vector encoded in its displacement input filter. Two color components of the displacement image are mapped into a vector as scale * (color[xChannel], color[yChannel]), where the channel selectors are one of R, G, B, or A.
  • Create a filter that calculates the diffuse illumination from a distant light source, interpreting the alpha channel of the input as the height profile of the surface (to approximate normal vectors).
  • Create a filter that calculates the specular illumination from a distant light source, interpreting the alpha channel of the input as the height profile of the surface (to approximate normal vectors).
  • Create a filter that draws a drop shadow under the input content. This filter produces an image that includes the inputs’ content.
  • Create a filter that renders a drop shadow, in exactly the same manner as ::DropShadow, except that the resulting image does not include the input content. This allows the shadow and input to be composed by a filter DAG in a more flexible manner.
  • Create a filter that always produces transparent black.
  • Create a filter that erodes each input pixel’s channel values to the minimum channel value within the given radii along the x and y axes.
  • Create a filter that draws the ‘src_rect’ portion of image into ‘dst_rect’ using the given filter quality. Similar to crate::Canvas::draw_image_rect().
  • Create a filter that fills ‘lens_bounds’ with a magnification of the input.
  • Create a filter that applies an NxM image processing kernel to the input image. This can be used to produce effects such as sharpening, blurring, edge detection, etc.
  • Create a filter that transforms the input image by ‘matrix’. This matrix transforms the local space, which means it effectively happens prior to any transformation coming from the crate::Canvas initiating the filtering.
  • Create a filter that merges the filters together by drawing their results in order with src-over blending.
  • Create a filter that offsets the input filter by the given vector.
  • Create a filter that produces the Picture as its output, clipped to both ‘target_rect’ and the picture’s internal cull rect.
  • Create a filter that calculates the diffuse illumination from a point light source, using alpha channel of the input as the height profile of the surface (to approximate normal vectors).
  • Create a filter that calculates the specular illumination from a point light source, using alpha channel of the input as the height profile of the surface (to approximate normal vectors).
  • Create a filter that fills the output with the per-pixel evaluation of the Shader. The shader is defined in the image filter’s local coordinate system, so will automatically be affected by [Canvas'] transform.
  • Create a filter that calculates the diffuse illumination from a spot light source, using alpha channel of the input as the height profile of the surface (to approximate normal vectors). The spot light is restricted to be within ‘cutoff_angle’ of the vector between the location and target.
  • Create a filter that calculates the specular illumination from a spot light source, using alpha channel of the input as the height profile of the surface (to approximate normal vectors). The spot light is restricted to be within ‘cutoff_angle’ of the vector between the location and target.
  • Create a tile image filter.