PencilStroke class

Constructors

PencilStroke({required List<Point<num>> points, required int bezierDistance, required PencilPaint pencilPaint})
PencilStroke.fromJson(Map<String, dynamic> json)
factory

Properties

bezierDistance int
final
hashCode int
The hash code for this object.
no setterinherited
last Point<num>
no setter
pencilPaint PencilPaint
final
pointCount int
no setter
points List<Point<num>>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addPoint(Point<num> point) int
calculateTotalSize() Size
createDrawablePath() Path
Creates a path that can be drawn on a canvas
intersectsWithSegment(Point<num> ip1, Point<num> ip2) bool
Calculate if this stroke intersects with a segment defined by start ip1 and end ip2 point.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pointAt(int index) Point<num>
scale({required double scale}) PencilStroke
Create a scaled copy of this stroke
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

defaultBezierDistance() int
segmentIntersection(Point<num> p0, Point<num> p1, Point<num> p2, Point<num> p3) bool