PPainter class

Inheritance
Implemented types

Constructors

PPainter()

Properties

backPaint Paint
getter/setter pair
canvasRect Rect
getter/setter pair
fillPaint Paint
getter/setter pair
fillParent bool
getter/setter pair
frameCount int
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
height int
getter/setter pair
mouseX double
getter/setter pair
mouseY double
getter/setter pair
paintCanvas Canvas
getter/setter pair
paintSize Size
getter/setter pair
path Path
getter/setter pair
pmouseX double
getter/setter pair
pmouseY double
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticsBuilder SemanticsBuilderCallback
Returns a function that builds semantic information for the picture drawn by this painter.
no setteroverride
shapeMode int
getter/setter pair
strokePaint Paint
getter/setter pair
useFill bool
getter/setter pair
useStroke bool
getter/setter pair
vertices List<Offset>
getter/setter pair
width int
getter/setter pair

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
background(Color color) → void
beginShape([int mode = 3]) → void
color(num r, num g, num b, [num a = 255]) Color
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
draw() → void
ellipse(double x, double y, double w, double h) → void
endShape([int mode = 0]) → void
fill(Color color) → void
fill2(Color color, int alpha) → void
fullScreen() → void
///////////////////////////////////////////////////////////////////////////
hitTest(Offset position) bool?
Called whenever a hit test is being performed on an object that is using this custom paint delegate.
override
init() → void
line(double x1, double y1, double x2, double y2) → void
mouseDragged() → void
mousePressed() → void
mouseReleased() → void
noFill() → void
noStroke() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
onDragEnd(BuildContext context, DragEndDetails details) → void
onDragStart(BuildContext context, DragStartDetails details) → void
onDragUpdate(BuildContext context, DragUpdateDetails details) → void
onTapDown(BuildContext context, TapDownDetails details) → void
onTapUp(BuildContext context, TapUpDetails details) → void
paint(Canvas canvas, Size size) → void
Called whenever the object needs to paint. The given Canvas has its coordinate space configured such that the origin is at the top left of the box. The area of the box is the size of the size argument.
override
point(num x, num y) → void
pop() → void
push() → void
quad(num x1, num y1, num x2, num y2, num x3, num y3, num x4, num y4) → void
rect(double x, double y, double w, double h) → void
redraw() → void
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
rotate(num angle) → void
scale(num sx, num sy) → void
setup() → void
shouldRebuildSemantics(covariant PPainter oldDelegate) bool
Called whenever a new instance of the custom painter delegate class is provided to the RenderCustomPaint object, or any time that a new CustomPaint object is created with a new instance of the custom painter delegate class (which amounts to the same thing, because the latter is implemented in terms of the former).
override
shouldRepaint(covariant CustomPainter oldDelegate) bool
Called whenever a new instance of the custom painter delegate class is provided to the RenderCustomPaint object, or any time that a new CustomPaint object is created with a new instance of the custom painter delegate class (which amounts to the same thing, because the latter is implemented in terms of the former).
override
size(int w, int h) → void
stroke(Color color) → void
stroke2(Color color, int alpha) → void
@param alpha opacity of the stroke
strokeCap(int cap) → void
strokeJoin(int join) → void
strokeWeight(num weight) → void
toString() String
A string representation of this object.
inherited
translate(num tx, num ty) → void
triangle(num x1, num y1, num x2, num y2, num x3, num y3) → void
updatePointer(Offset offset) → void
///////////////////////////////////////////////////////////////////////////
vertex(num x, num y) → void

Operators

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