The [[Board]]
Adds a blur filter to background image
editor.board.background.image.addFilter({
name: 'Blur',
options: {
blurRadius: 20
}
})
Adds blur and contrast filters to background image
editor.board.background.image.addFilter([
{
name: 'Blur',
options: {
blurRadius: 20
}
},
{
name: 'Contrast',
options: {
contrast: 30
}
}
])
Adds a contrast filter to all selected shapes
editor.selection.addFilter({
name: 'Contrast',
options: {
contrast: 30
}
})
Remove contrast filter of selected items
editor.selection.removeFilter({ name: Contrast' })
Remove multiple filters
editor.selection.removeFilter([
{ name: Contrast' },
{ customFn: theFunction },
{ name: 'Contrast' }
])
Adds a custom filter to background image
editor.selection.addFilter({
customFn: imageData => theCustomFunction(imageData),
})
Directly access to filters
editor.filters.apply([editor.board.background.image], {
name: 'Grayscale',
})
Applies a filter to the given shapes
List of the [[ShapeModel | Shapes]]
The list of given [[Filters | Filter]]
Remove filters of the given shapes
List of the [[ShapeModel | Shapes]]
The [[Filters | filter]] list
Creates a filter instance that lets apply various filters on every shape that extends the class.
Basically every [[ShapeModel]] has exposed [[ShapeModel.addFilter]] and [[ShapeModel.removeFilter]] to work with filters