Class SOBitmap

All Implemented Interfaces:
Comparable<ArDkBitmap>

public class SOBitmap extends ArDkBitmap
  • Constructor Details

    • SOBitmap

      public SOBitmap(int w, int h)
      Allocate an SOBitmap of a specific size and default format.
      Parameters:
      w - width of desired bitmap.
      h - height of desired bitmap.
    • SOBitmap

      public SOBitmap(ArDkBitmap s, int x0, int y0, int x1, int y1)
      Create an ArDkBitmap that gives access to a subarea of another ArDkBitmap (sharing the same underlying native Bitmap).
      Parameters:
      s - ArDkBitmap that we want to represent a subrectangle of.
      x0 - bound of sub rectangle.
      y0 - bound of sub rectangle.
      x1 - bound of sub rectangle.
      y1 - bound of sub rectangle.
    • SOBitmap

      public SOBitmap(int w, int h, ArDkBitmap.Type type)
      Allocate an ArDkBitmap of a specific size and format.
      Parameters:
      w - width of desired bitmap.
      h - height of desired bitmap.
      type - pixel format required.
  • Method Details

    • copyFrom

      public void copyFrom(ArDkBitmap src)
      Copy the contents of another ArDkBitmap into this one. ArDkBitmaps must be the same size.
      Parameters:
      src - The source bitmap to copy from.
    • alphaCombine

      public void alphaCombine(ArDkBitmap dst, ArDkBitmap alpha)
      Merge our 16-bit bitmap and an 8-bit alpha channel together into an existing 32-bit bitmap.
      Parameters:
      dst - The destination bitmap
      alpha - The source alpha mask
    • invertLuminance

      public void invertLuminance()
    • createBitmap

      public ArDkBitmap createBitmap(int x0, int y0, int x1, int y1)
      create a new bitmap representing a portion of this bitmap.
      Overrides:
      createBitmap in class ArDkBitmap