Class/Object

eu.joaocosta.minart.graphics

SurfaceView

Related Docs: object SurfaceView | package graphics

Permalink

final case class SurfaceView(plane: Plane, width: Int, height: Int) extends Surface with Product with Serializable

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

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SurfaceView
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Surface
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SurfaceView(plane: Plane, width: Int, height: Int)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clip(cx: Int, cy: Int, cw: Int, ch: Int): SurfaceView

    Permalink

    Clips this view to a chosen rectangle

    Clips this view to a chosen rectangle

    cx

    leftmost pixel on the surface

    cy

    topmost pixel on the surface

    cw

    clip width

    ch

    clip height

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @throws( ... )
  7. def contramap(f: (Int, Int) ⇒ (Int, Int)): Plane

    Permalink

    Contramaps the positions from this surface view.

  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def flatMap(f: (Color) ⇒ (Int, Int) ⇒ Color): SurfaceView

    Permalink

    Flatmaps the inner plane of this surface view

  10. def flipH: SurfaceView

    Permalink

    Flips a surface horizontally.

  11. def flipV: SurfaceView

    Permalink

    Flips an surface vertically.

  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate()
  13. def getPixel(x: Int, y: Int): Option[Color]

    Permalink

    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.

    x

    pixel x position

    y

    pixel y position

    returns

    pixel color

    Definition Classes
    Surface
  14. def getPixels(): Vector[Array[Color]]

    Permalink

    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.

    returns

    color matrix

    Definition Classes
    SurfaceViewSurface
  15. val height: Int

    Permalink

    The surface height

    The surface height

    Definition Classes
    SurfaceViewSurface
  16. def invertColor: SurfaceView

    Permalink

    Inverts a surface color.

  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. def map(f: (Color) ⇒ Color): SurfaceView

    Permalink

    Maps the colors from this surface view.

  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate()
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate()
  22. val plane: Plane

    Permalink
  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  24. final def toRamSurface(): RamSurface

    Permalink

    Copies this surface into a new surface stored in RAM

    Copies this surface into a new surface stored in RAM

    Definition Classes
    Surface
  25. def transpose: SurfaceView

    Permalink

    Transposes a surface.

  26. def unsafeGetPixel(x: Int, y: Int): Color

    Permalink

    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.

    x

    pixel x position

    y

    pixel y position

    returns

    pixel color

    Definition Classes
    SurfaceViewSurface
  27. def view: SurfaceView

    Permalink

    Returns a view over this surface.

    Returns a view over this surface.

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

    Definition Classes
    SurfaceViewSurface
  28. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. val width: Int

    Permalink

    The surface width

    The surface width

    Definition Classes
    SurfaceViewSurface
  32. def zipWith(that: Plane, f: (Color, Color) ⇒ Color): SurfaceView

    Permalink

    Combines this view with a plane by combining their colors with the given function.

  33. def zipWith(that: Surface, f: (Color, Color) ⇒ Color): SurfaceView

    Permalink

    Combines this view with a surface by combining their colors with the given function.

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Surface

Inherited from AnyRef

Inherited from Any

Ungrouped