Skip to content

Latest commit

 

History

History
223 lines (208 loc) · 4.1 KB

functions.md

File metadata and controls

223 lines (208 loc) · 4.1 KB

cleanExtractedImagesCache

function cleanExtractedImagesCache(): void

Removes temporary files created with onExtractImage ImageFilter prop.


registerFilter

function registerFilter<Config>(
  name: string,
  shape: Shape,
  transform: (config: Config) => object
): React.FC<ViewProps & Config>

Should be used to create custom filters.

function rgbaToRgb(RGB_background: string, RGBA_color: string): string

function concatColorMatrices(matrices: Matrix[]): Matrix

PathStep generation

function moveTo(x: Distance, y: Distance): PathStep
function lineTo(x: Distance, y: Distance): PathStep
function quadTo(x1: Distance, y1: Distance, x2: Distance, y2: Distance): PathStep
function cubicTo(
  x1: Distance,
  y1: Distance,
  x2: Distance,
  y2: Distance,
  x3: Distance,
  y3: Distance
): PathStep
function closePath(): PathStep

normal

function normal(): Matrix

rgba

function rgba(
  red: number = 1,
  green: number = 1,
  blue: number = 1,
  alpha: number = 1
): Matrix

saturate

function saturate(amount: number = 1): Matrix

hueRotate

function hueRotate(amount: number = 0): Matrix

luminanceToAlpha

function luminanceToAlpha(): Matrix

invert

function invert(): Matrix

grayscale

function grayscale(amount: number = 1): Matrix

sepia

function sepia(amount: number = 1): Matrix

nightvision

function nightvision(): Matrix

warm

function warm(): Matrix

cool

function cool(): Matrix

brightness

function brightness(amount: number = 1): Matrix

contrast

function contrast(amount: number = 1): Matrix

temperature

function temperature(amount: number = 1): Matrix

tint

function tint(amount: number = 0): Matrix

threshold

function threshold(amount: number = 0): Matrix

technicolor

function technicolor(): Matrix

polaroid

function polaroid(): Matrix

toBGR

function toBGR(): Matrix

kodachrome

function kodachrome(): Matrix

browni

function browni(): Matrix

vintage

function vintage(): Matrix

night

function night(amount: number = 0.1): Matrix

predator

function predator(amount: number = 1): Matrix

lsd

function lsd(): Matrix

colorTone

function colorTone(
  desaturation: number = 0.2,
  toned: number = 0.15,
  lightColor: string = "#FFE580",
  darkColor: string = "#338000"
): Matrix

duoTone

function duoTone(
  firstColor: string = "#FFE580",
  secondColor: string = "#338000"
): Matrix

protanomaly

function protanomaly(): Matrix

deuteranomaly

function deuteranomaly(): Matrix

tritanomaly

function tritanomaly(): Matrix

protanopia

function protanopia(): Matrix

deuteranopia

function deuteranopia(): Matrix

tritanopia

function tritanopia(): Matrix

achromatopsia

function achromatopsia(): Matrix

achromatomaly

function achromatomaly(): Matrix