Changes the settings applied to this canvas.
Changes the settings applied to this canvas.
new canvas settings
Clears buffers, such as the backbuffer and keyboard inputs.
Clears buffers, such as the backbuffer and keyboard inputs.
set of Canvas.Buffers 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 current keyboard input.
current keyboard input
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.
Gets the current pointer input.
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.
The settings applied to this canvas.
Gets the color from the this surface in an unsafe way.
Gets the color from the this surface in an unsafe way.
This operation is unsafe: reading a out of bounds pixel has undefined behavior.
You should only use this if the performance of getPixel
and getPixels
are not acceptable.
pixel x position
pixel y position
pixel color
Draws a surface on top of this surface.
Draws a surface on top of this surface.
surface to draw
color to use as a mask (pixels with this color won't be merged)
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
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
The surface height
Copies this surface into a new surface stored in RAM
Copies this surface into a new surface stored in RAM
Returns a view over this surface.
Returns a view over this surface.
Operations performed on a view are executed in a defered fashion.
The surface width
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
Use blit instead
Window with a canvas that can be painted.
The Canvas is the main concept behind minart, providing access to both rendering and input functionallity.
A canvas represents a window with a
width * height
pixels. There's also ascale
variable that controls the integer scaling and aclearColor
that is applied to the whole canvas when it's cleared.