partials
import {...} from "@canvas-commons/2d/lib/partials";
Classes
Interfaces
Type Aliases
CanvasRepetition
type CanvasRepetition = null'repeat''repeat-x''repeat-y''no-repeat'
CanvasStyle
type CanvasStyle = nullColorGradientPattern
DesiredLength
type DesiredLength = Lengthnull
Represents a desired length used internally by layout Nodes.
When the desired length is set to null it represents a default value for
whatever property it describes.
FlexBasis
type FlexBasis = Length'content''max-content''min-content''fit-content'null
FlexContent
type FlexContent = 'center''start''end''space-between''space-around''space-evenly''stretch'
FlexDirection
type FlexDirection = 'row''row-reverse''column''column-reverse'
FlexItems
type FlexItems = 'center''start''end''stretch''baseline'
FlexWrap
type FlexWrap = 'nowrap''wrap''wrap-reverse'
GradientType
type GradientType = 'linear''conic''radial'
LayoutMode
type LayoutMode = booleannull
Length
type Length = number`${number}%`
Represents a length used by most layout properties.
The value can be either:
number- the desired length in pixels${number}%- a string with the desired length in percents, for example'50%'
LengthLimit
type LengthLimit = Lengthnull'max-content''min-content'
Represents a length limit used by layout properties such as max-width.
PartialRoughConfig
type PartialRoughConfig = PartialRoughConfig
Partial rough configuration with defaults applied.
PossibleCanvasStyle
type PossibleCanvasStyle = nullPossibleColorGradientPattern
RoughFillStyle
type RoughFillStyle = 'hachure''solid''zigzag''cross-hatch''dots''dashed''zigzag-line'
Fill style options for rough shapes.
hachure: Parallel lines filling the shape (default)solid: Solid fill with slight irregularityzigzag: Zigzag pattern fillingcross-hatch: Crossed parallel linesdots: Dotted pattern fillingdashed: Dashed lines fillingzigzag-line: Zigzag lines filling
TextWrap
type TextWrap = boolean'pre'
Functions
blur
public blurvalue?: SignalValuenumber: Filter
Create a blur filter.
Parameters
value?: SignalValuenumberThe value of the filter in pixels.
brightness
public brightnessvalue?: SignalValuenumber: Filter
Create a brightness filter.
Parameters
value?: SignalValuenumberThe value of the filter.
contrast
public contrastvalue?: SignalValuenumber: Filter
Create a contrast filter.
Parameters
value?: SignalValuenumberThe value of the filter.
getDefaultRoughConfig
public getDefaultRoughConfig(): RoughConfig
Get default rough configuration.
grayscale
public grayscalevalue?: SignalValuenumber: Filter
Create a grayscale filter.
Parameters
value?: SignalValuenumberThe value of the filter.
hue
public huevalue?: SignalValuenumber: Filter
Create a hue filter.
Parameters
value?: SignalValuenumberThe value of the filter in degrees.
invert
public invertvalue?: SignalValuenumber: Filter
Create an invert filter.
Parameters
value?: SignalValuenumberThe value of the filter.
mergeRoughConfig
public mergeRoughConfigconfig: PartialRoughConfig: RoughConfig
Merge partial rough configuration with defaults.
Parameters
config: PartialRoughConfigPartial configuration to merge
saturate
public saturatevalue?: SignalValuenumber: Filter
Create a saturate filter.
Parameters
value?: SignalValuenumberThe value of the filter.
sepia
public sepiavalue?: SignalValuenumber: Filter
Create a sepia filter.
Parameters
value?: SignalValuenumberThe value of the filter.