Filters

Filters are the bread and butter of ggfx, and thankfully it has a lot. If something is missing there is always with_custom() to let your creativety go wild.

with_blend()

Blend a layer with a reference

with_blend_custom()

Create a custom blend type

with_bloom()

Apply bloom to your layer

with_blur()

Apply a gaussian blur to your layer

with_custom()

Apply a custom filter

with_displacement()

Apply a displacement map to a layer

with_dither()

Dither image using Floyd-Steinberg error correction dithering

with_inner_glow()

Apply an inner glow to your layer

with_interpolate()

Blend two layerrs together by averaging them out

with_kernel()

Apply a gaussian blur to your layer

with_mask()

Apply a mask to a layer

with_motion_blur()

Apply a motion blur to your layer

with_circle_dither() with_custom_dither() with_halftone_dither() with_ordered_dither()

Dither image using a threshold dithering map

with_outer_glow()

Apply an outer glow to your layer

with_raster()

Convert a layer to a raster

with_shade()

Apply a gaussian blur to your layer

with_shadow()

Apply a drop shadow to a layer

with_variable_blur()

Apply a variable blur to a layer

References

Filters sometimes need to work with multiple layers. This can be achieved by turning a layer into a reference, either directly through the filter, or by using one of the refefence creators.

as_colourspace()

Collect channels into a single layer of a specific colourspace

as_group()

Collect layers into a group that can be treated as a single layer

as_reference()

Create a reference to a layer for use in other filters

Channels

Some filters use layers as variable argument input - e.g. the amount of blur at each pixel in with_variable_blur() is determined by another layer. In these instances only a single channel is needed, which can be selected with a ch_*() selector. If none is given the luminance is used.

ch_red() ch_green() ch_blue() ch_alpha() ch_hue() ch_chroma() ch_luminance() ch_saturation() ch_lightness() ch_cyan() ch_magenta() ch_yellow() ch_black() ch_key() ch_custom()

Set a channel of interest from a layer

Raster placement

Instead of using a layer as input, one can use a raster object. Since the dimensions of the object does not necessarily fit the dimension of the rendered plot it is necessary to specify how the raster should be placed and resized.

ras_fill() ras_fit() ras_stretch() ras_place() ras_tile()

Control placements of raster in the plot

Helpers

For ultimate power over the rendering you may need to create your own filters. This can be a daunting task but ggfx provides a set of helpers for removing some of the pain of working with raster objects and figuring out the dimensions and location of the drawing area.

viewport_location() index_raster() get_raster_area() set_raster_area() get_viewport_area() set_viewport_area() viewport_is_clipping() current_resolution() to_pixels() from_pixels()

Rendering information

Object support

ggfx supports a wide range of different object that can be filtered. Most are somehow related to ggplot2. The following doc lays out the different supported objects.

object_support

Supported object types