A low-level version of a canvas with init and close methods.
Attributes
- Companion:
- object
- Graph
- Supertypes
- trait LowLevelSubsystem[Settings]trait AutoCloseabletrait Canvastrait MutableSurfacetrait Surfaceclass Objecttrait Matchableclass Any
- Known subtypes
- trait SurfaceBackedCanvas
Members list
Value members
Concrete methods
The settings applied to this canvas.
The settings applied to this canvas.
Attributes
Inherited methods
Composes this subsystem with another subsystem
Draws a surface on top of this surface.
Draws a surface on top of this surface.
Attributes
- ch
clip height of the source surface
- cw
clip width of the source surface
- cx
leftmost pixel on the source surface
- cy
topmost pixel on the source surface
- mask
color to use as a mask (pixels with this color won't be merged)
- that
surface to draw
- x
leftmost pixel on the destination surface
- y
topmost pixel on the destination surface
- Inherited from:
- MutableSurface
Changes the settings of the subsystem.
Changes the settings of the subsystem.
Attributes
- newSettings
new settings to apply
- Inherited from:
- Extended
Clears buffers, such as the backbuffer and keyboard inputs.
Clears buffers, such as the backbuffer and keyboard inputs.
Attributes
- buffers
set of Canvas.Buffers to be cleared
- Inherited from:
- Canvas
Destroys the subsystem.
Destroys the subsystem.
Calling any operation on this object after calling close() without calling init() has an undefined behavior.
Attributes
- Inherited from:
- Extended
Attributes
- Inherited from:
- Extended
Fill the whole surface with a certain color.
Fill the whole surface with a certain color.
Attributes
- color
Color
to fill the surface with- Inherited from:
- MutableSurface
Fill part of the surface with a certain color.
Fill part of the surface with a certain color.
Attributes
- color
Color
to fill the surface with- h
region height
- w
region width
- x
leftmost pixel on the destination surface
- y
topmost pixel on the destination surface
- Inherited from:
- MutableSurface
Gets the current keyboard input.
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
Gets the color from the this surface, falling back to a default color when out of bounds.
Similar to getPixel(x, y).getOrElse(fallback)
, but avoids an allocation.
Gets the color from the this surface, falling back to a default color when out of bounds.
Similar to getPixel(x, y).getOrElse(fallback)
, but avoids an allocation.
Attributes
- fallback
fallback color
- 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
Gets the current pointer input.
Creates the subsystem.
Creates the subsystem.
Operations can only be called after calling this.
Attributes
- settings
settings used to configure the subsystem
- Returns:
this subsystem
- Inherited from:
- Extended
Checks if the subsystem is created or if it has been destroyed.
Put a pixel in the surface with a certain color.
Put a pixel in the surface with a certain color.
Attributes
- color
Color
to apply to the pixel- x
pixel x position
- y
pixel y position
- Inherited from:
- MutableSurface
Flips buffers and redraws the screen.
Returns the current settings.
Copies this surface into a new surface stored in RAM.
Configures the subsystem according to the settings and returns the applied extended settings.
Configures the subsystem according to the settings and returns the applied extended settings.
Attributes
- Inherited from:
- Extended
Unsafe implementation of the subsystem destroy.
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
- Inherited from:
- Surface
Unsafe implementation of the subsystem init.
Puts a pixel in the surface in an unsafe way.
Puts a pixel in the surface in an unsafe way.
This operation is unsafe: writing a out of bounds pixel has undefined behavior.
You should only use this if the performance of putPixel
is not acceptable.
Attributes
- x
pixel x position
- y
pixel y position
- Returns:
pixel color
- Inherited from:
- MutableSurface
Returns a view over this surface.
Returns a view over this surface.
Operations performed on a view are executed in a defered fashion.
Attributes
- Inherited from:
- Surface
Inherited fields
Attributes
- Inherited from:
- Extended