Painter class
The Painter class represents the space by which a supplied image can be modified.
- Inheritance
-
- Object
- SerializableImage
- Painter
Constructors
- Painter(Uint8List encodedBytes)
- Painter.fromBase64(String encodedImage)
-
factory
- Painter.fromDecodedImage(Image image)
-
factory
- Painter.fromFile(File imageFile)
-
factory
- Painter.fromFilePath(String filePath)
-
factory
-
Painter.fromJson(Map<
String, dynamic> json) -
factory
Properties
Methods
-
copyCrop(
int x, int y, int w, int h) → Painter - Crop the underlying image.
-
drawLine(
int x1, int y1, int x2, int y2, String color, {bool antialias = false, num thickness = 1}) → void - Draw a line on the underlying image.
-
drawRectangle(
int x1, int y1, int x2, int y2, String color, {num thickness = 1}) → void - Draw a rectangle on the underlying image.
-
drawString(
int x, int y, String text, String color) → void - Draw text on the underlying image.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
override
-
toString(
) → String -
A string representation of this object.
override
-
writeAsJpeg(
String filePath) → Future< void> - Write the image as a jpeg to the specified destination.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited