AbstractDisplay class abstract

The display can represent the canvas (in HTML) or a window (in native code). It deals with setting up the renderer (AbstractRenderer), and the events (Event). It's an abstract class



AbstractDisplay constructor. It calls createRenderer to setup the renderer


camera Camera
The camera is bound to the display with bindCamera.
getter/setter pair
darkMode bool
When darkMode is set to true, all the colors are updated: their brightness is inverted but the hue doesn't change
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
renderer AbstractRenderer
The renderer is responsible for rendering mobjects (Mobject). It is created with createRenderer and is called from the constructor.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited


applyColorTransformation(Color color) Color
Apply the darkMode if set to true otherwise return the color
bindCamera(Camera camera) → void
Binds the camera
bindEventListeners() → void
Binds all the eventListeners All the events should be converted to Event and sent to the onEvent method This method needs to be implemented in subclasses
createRenderer() AbstractRenderer
Creates a renderer (AbstractRenderer) used to render mobjects (Mobject). This method needs to be implemented in subclasses
getCoordinates(double pixelX, double pixelY) Vector3
Converts the pixel coordinates (pixelX, pixelY) to the manim coordinates The result is returned as a Vector3, but used as a vector2 containing the coordinates x and y of the corresponding point @param pixelX from 0 to pixel width @param pixelY from 0 to pixel height
getPixelPosition(Vector3 coords) List<double>
Converts the manim coordinates (Vector3 coords) to the pixel coordinates The z component of coords is ignored. It returns a list of 2 double containing the x and y pixel coordinates
nextFrame() Future<double>
Waits for the next frame. Returns a Future containing the time elapsed between frames (in seconds) This method needs to be implemented in subclasses
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
onEvent(Event event) → void
Dispatches the event to the corresponding EventListener by using the EventDispatcher
setDisplaySize(int width, int height) → void
Sets the width and the height of the display This method needs to be implemented in subclasses
setup() → void
toString() String
A string representation of this object.
unbindEventListeners() → void
Unbinds all the eventListeners This method needs to be implemented in subclasses


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