PaintContext class final

What a frame paints with: the canvas a RenderObject.paint draws on, the surface under it and the presenter that turns it into bytes.

A frame hands one to PipelineOwner.flushPaint; a Screen has all three:

final screen = Screen(80, 24);
final ctx = PaintContext(screen.canvas, screen.surface, screen.presenter);

Constructors

PaintContext(Canvas canvas, Surface surface, Presenter presenter)
What a frame paints with: canvas over surface, which presenter presents.

Properties

canvas → Canvas
What RenderObject.paint draws on, its origin at the object being painted and clipped to its bounds.
final
hashCode → int
The hash code for this object.
no setterinherited
presenter → Presenter
What turns the surface's changes into bytes for the terminal.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
surface → Surface
The cells canvas writes to, which keep what was painted between frames: an object that scrolls shifts its rows here (Surface.scrollRect), and the terminal scrolls them in hardware.
final

Methods

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