PaintDecorator class
PaintDecorator applies a paint filter to a group of drawing operations.
Specifically, the following filters are available:
- PaintDecorator.blur adds Gaussian blur to the image, as if your vision became blurry and out of focus;
- PaintDecorator.tint tints the picture with the specified color, as if looking through a colored glass;
- PaintDecorator.grayscale removes all color from the picture, as if it was a black-and-white photo.
Constructors
- PaintDecorator.blur(double amount, [double? amountY])
- PaintDecorator.grayscale({double opacity = 1.0})
- PaintDecorator.tint(Color color)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isLastDecorator → bool
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addBlur(
double amount, [double? amountY]) → void -
addLast(
Decorator? decorator) → void -
Adds a new decorator onto the chain of decorators
inherited
-
apply(
void draw(Canvas), Canvas canvas) → void -
Applies visual effect while
draw
ing on thecanvas
.override -
applyChain(
void draw(Canvas), Canvas canvas) → void -
Applies this and all subsequent decorators if any.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeLast(
) → void -
Removes the last decorator from the chain of decorators
inherited
-
replaceLast(
Decorator? decorator) → void -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited