LinePattern class
A striped/lined pattern fill.
Constructors
- LinePattern({double strokeWidth = 2, double spacing = 8, double angle = 0, Color backgroundColor = const Color(0x00000000), Color foregroundColor = const Color(0xFF000000)})
-
Creates a line pattern.
const
- LinePattern.diagonal({double strokeWidth = 2, double spacing = 8, Color backgroundColor = const Color(0x00000000), Color foregroundColor = const Color(0xFF000000), bool reverse = false})
-
Creates a diagonal line pattern (45 degrees).
factory
- LinePattern.horizontal({double strokeWidth = 2, double spacing = 8, Color backgroundColor = const Color(0x00000000), Color foregroundColor = const Color(0xFF000000)})
-
Creates a horizontal line pattern.
factory
- LinePattern.vertical({double strokeWidth = 2, double spacing = 8, Color backgroundColor = const Color(0x00000000), Color foregroundColor = const Color(0xFF000000)})
-
Creates a vertical line pattern.
factory
Properties
- angle → double
-
The angle of the lines in radians (0 = horizontal).
final
- backgroundColor → Color
-
The background color.
finalinherited
- foregroundColor → Color
-
The foreground/pattern color.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
The pattern height.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- spacing → double
-
The spacing between lines.
final
- strokeWidth → double
-
The line stroke width.
final
- width → double
-
The pattern width.
finalinherited
Methods
-
createShader(
Rect bounds) → Shader -
Creates a shader that tiles this pattern.
inherited
-
drawPattern(
Canvas canvas, Size size) → void -
Draws the pattern once at origin.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited