Changes the settings applied to this canvas.
Changes the settings applied to this canvas.
new canvas settings
Clears resources, such as the backbuffer and keyboard inputs.
Clears resources, such as the backbuffer and keyboard inputs.
set of Canvas.Resources to be cleared
Fill the surface with a certain color
Fill the surface with a certain color
Color
to fill the surface with
Gets the current keyboard input.
Gets the color from the this surface.
Gets the color from the this surface.
This operation can be perfomance intensive, so it might be worthwile
to either use getPixels
to fetch multiple pixels at the same time or
to implement this operation on the application code.
pixel x position
pixel y position
pixel color
Returns the pixels from this surface.
Returns the pixels from this surface. This operation can be perfomance intensive, so it might be worthwile to implement this operation on the application code.
color matrix
Gets the current pointer input.
Put a pixel in the surface with a certain color.
Put a pixel in the surface with a certain color.
pixel x position
pixel y position
Color
to apply to the pixel
Flips buffers and redraws the screen.
Flips buffers and redraws the screen.
Draws a surface on top of this surface.
Draws a surface on top of this surface.
surface to draw
leftmost pixel on the destination surface
topmost pixel on the destination surface
leftmost pixel on the source surface
topmost pixel on the source surface
clip width of the source surface
clip height of the source surface
Draws a surface on top of this surface and masks the pixels with a certain color.
Draws a surface on top of this surface and masks the pixels with a certain color.
surface to draw
color to usa as a mask
leftmost pixel on the destination surface
topmost pixel on the destination surface
leftmost pixel on the source surface
topmost pixel on the source surface
clip width of the source surface
clip height of the source surface
Destroys the canvas window.
Destroys the canvas window.
Calling any operation on this canvas after calling close without calling init() has an undefined behavior.
The surface height
Creates the canvas window.
Creates the canvas window.
Rendering operations can only be called after calling this.
canvas object linked to the created window
Checks if the window is created or if it has been destroyed
The settings applied to this canvas.
The settings applied to this canvas.
The surface width
Returns the backbuffer.
Returns the backbuffer. This operation can be perfomance intensive, so it might be worthwile to implement this operation on the application code.
backbuffer
use getPixels() instead
Gets the color from the backbuffer.
Gets the color from the backbuffer.
This operation can be perfomance intensive, so it might be worthwile
to either use getBackbuffer
to fetch multiple pixels at the same time or
to implement this operation on the application code.
pixel x position
pixel y position
pixel color
use getPixel(x, y) instead
A low-level version of a canvas that provides its own canvas manager.