class Prism::Bitmap
- Prism::Bitmap
- Reference
- Object
Overview
Provides a resource wrapper around the image loading library. This keeps the image loading abstracted from the engine thus enabling it to be easily changed in the future.
Defined in:
prism/texture/bitmap.crConstructors
Instance Method Summary
-
#alpha?
Checks if the bitmap has an alpha channel
-
#flip_x
Flips the x-axis
-
#flip_y
flips the y-axis
- #height : Int32
-
#multiply_alpha! : Bitmap
Pre-multiplies the RGB values with the alpha
-
#pixel(x : Int32, y : Int32) : ColorUInt8
Retrieves a pixel's color value Gives the pixel color found at x and y, (horizontal axis, vertical axis)
-
#pixels : Array(UInt8)
Return all the pixels
-
#set_pixel(x : Int32, y : Int32, color : ColorUInt8)
Sets a pixel value
- #width : Int32
Constructor Detail
Instance Method Detail
def pixel(x : Int32, y : Int32) : ColorUInt8
#
Retrieves a pixel's color value Gives the pixel color found at x and y, (horizontal axis, vertical axis)