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
Attributes
- Companion:
- object
- Graph
- Supertypes
Members list
Value members
Concrete methods
Clips this view to a chosen rectangle
Clips this view to a chosen rectangle
Attributes
- ch
clip height
- cw
clip width
- cx
leftmost pixel on the surface
- cy
topmost pixel on the surface
Contramaps the positions from this surface view.
Contramaps the positions from this surface view.
Attributes
Flatmaps the inner plane of this surface view
Flatmaps the inner plane of this surface view
Attributes
Flips a surface horizontally.
Flips a surface horizontally.
Attributes
Flips a surface vertically.
Flips a surface vertically.
Attributes
Inverts a surface color.
Inverts a surface color.
Attributes
Maps the colors from this surface view.
Maps the colors from this surface view.
Attributes
Scales a surface.
Scales a surface.
Attributes
Scales a surface.
Scales a surface.
Attributes
Transposes a surface.
Transposes a surface.
Attributes
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.
Attributes
- x
pixel x position
- y
pixel y position
- Returns:
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.
Attributes
- Definition Classes
Combines this view with a surface by combining their colors with the given function.
Combines this view with a surface by combining their colors with the given function.
Attributes
Inherited methods
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.
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.
Attributes
- x
pixel x position
- y
pixel y position
- Returns:
pixel color
- Inherited from:
- 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.
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.
Attributes
- Returns:
color matrix
- Inherited from:
- Surface
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Copies this surface into a new surface stored in RAM.