BufferedImageSurface

final class BufferedImageSurface(val bufferedImage: BufferedImage) extends MutableSurface

Mutable image surface backed by an AWT Buffered Image.

trait MutableSurface
trait Surface
class Object
trait Matchable
class Any

Value members

Concrete methods

override def blit(that: Surface, mask: Option[Color])(x: Int, y: Int, cx: Int, cy: Int, cw: Int, ch: Int): Unit
Definition Classes
MutableSurface
def fill(color: Color): Unit
def getPixels(): Vector[Array[Color]]
def putPixel(x: Int, y: Int, color: Color): Unit
def unsafeGetPixel(x: Int, y: Int): Color

Inherited methods

def getPixel(x: Int, y: Int): Option[Color]

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.

Value parameters:
x

pixel x position

y

pixel y position

Returns:

pixel color

Inherited from:
Surface
final def toRamSurface(): RamSurface

Copies this surface into a new surface stored in RAM

Copies this surface into a new surface stored in RAM

Inherited from:
Surface
def view: SurfaceView

Returns a view over this surface.

Returns a view over this surface.

Operations performed on a view are executed in a defered fashion.

Inherited from:
Surface

Deprecated and Inherited methods

@deprecated("Use blit instead")
def blitWithMask(that: Surface, mask: Color)(x: Int, y: Int, cx: Int, cy: Int, cw: Int, ch: Int): Unit

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.

Value parameters:
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 usa as a mask

that

surface to draw

x

leftmost pixel on the destination surface

y

topmost pixel on the destination surface

Deprecated
Inherited from:
MutableSurface

Concrete fields

val bufferedImage: BufferedImage
val height: Int
val width: Int