Clips this view to a chosen rectangle
Clips this view to a chosen rectangle
leftmost pixel on the surface
topmost pixel on the surface
clip width
clip height
Contramaps the positions from this surface view.
Flatmaps the inner plane of this surface view
Flips a surface horizontally.
Flips an surface vertically.
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
The surface height
The surface height
Inverts a surface color.
Maps the colors from this surface view.
Copies this surface into a new surface stored in RAM
Copies this surface into a new surface stored in RAM
Transposes a surface.
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
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
The surface width
Combines this view with a plane by combining their colors with the given function.
Combines this view with a surface by combining their colors with the given function.
A view over a surface, stored as a plane limited by a width and height. Allows lazy operations to be applied over a surface.
This can have a performance impact. However, a new RAM surface with the operations already applied can be constructed using
toRamSurface