Class: LiteRGSS::Image
- Inherits:
-
Disposable
- Object
- Disposable
- LiteRGSS::Image
- Defined in:
- LiteRGSS.rb.yard.rb
Overview
Class that is dedicated to perform Image operation in Memory before displaying those operations inside a texture (Bitmap)
Direct Known Subclasses
Instance Attribute Summary collapse
-
#height ⇒ Integer
readonly
Returns the heigth of the image.
-
#rect ⇒ Rect
readonly
Returns the surface of the image (0, 0, width, height).
-
#width ⇒ Integer
readonly
Returns the width of the image.
Class Method Summary collapse
-
.new(width, height)
Create a new empty image with dimensions.
Instance Method Summary collapse
-
#blt(x, y, source, source_rect) ⇒ self
Blit an other image to this image (process alpha).
-
#blt!(x, y, source, source_rect) ⇒ self
Blit an other image to this image (replace the pixels).
-
#clear_rect(x, y, width, height) ⇒ self
Clear a portion of the image.
-
#copy_to_bitmap(bitmap) ⇒ self
Copy the image content to the bitmap (Bitmap must be the same size of the image).
-
#create_mask(color, alpha)
Change the alpha of all the pixel that match the input color.
-
#fill_rect(x, y, width, height, color)
Fill a portion of the image with a color.
-
#get_pixel(x, y) ⇒ Color?
Get a pixel color.
-
#get_pixel_alpha(x, y) ⇒ Integer, 0
Get a pixel alpha.
-
#set_pixel(x, y, color) ⇒ self
Set a pixel color.
-
#stretch_blt(dest_rect, source, source_rect) ⇒ self
Stretch blit an other image to this image (process alpha).
-
#stretch_blt!(dest_rect, source, source_rect) ⇒ self
Stretch blit an other image to this image (replace the pixels).
-
#to_png ⇒ String?
Convert Image to PNG.
-
#to_png_file(filename) ⇒ Boolean
Save the Image to a PNG file.
Methods inherited from Disposable
Instance Attribute Details
#height ⇒ Integer (readonly)
Returns the heigth of the image
197 198 199 |
# File 'LiteRGSS.rb.yard.rb', line 197 def height @height end |
#rect ⇒ Rect (readonly)
Returns the surface of the image (0, 0, width, height)
199 200 201 |
# File 'LiteRGSS.rb.yard.rb', line 199 def rect @rect end |
#width ⇒ Integer (readonly)
Returns the width of the image
195 196 197 |
# File 'LiteRGSS.rb.yard.rb', line 195 def width @width end |
Class Method Details
.new(width, height)
Create a new empty image with dimensions
185 186 187 |
# File 'LiteRGSS.rb.yard.rb', line 185 def self.new(filename_or_memory, from_memory = nil) end |
Instance Method Details
#blt(x, y, source, source_rect) ⇒ self
Blit an other image to this image (process alpha)
212 213 214 |
# File 'LiteRGSS.rb.yard.rb', line 212 def blt(x, y, source, source_rect) end |
#blt!(x, y, source, source_rect) ⇒ self
Blit an other image to this image (replace the pixels)
221 222 223 |
# File 'LiteRGSS.rb.yard.rb', line 221 def blt!(x, y, source, source_rect) end |
#clear_rect(x, y, width, height) ⇒ self
Clear a portion of the image
246 247 248 |
# File 'LiteRGSS.rb.yard.rb', line 246 def clear_rect(x, y, width, height) end |
#copy_to_bitmap(bitmap) ⇒ self
Copy the image content to the bitmap (Bitmap must be the same size of the image)
203 204 205 |
# File 'LiteRGSS.rb.yard.rb', line 203 def copy_to_bitmap(bitmap) end |
#create_mask(color, alpha)
Change the alpha of all the pixel that match the input color
283 284 285 |
# File 'LiteRGSS.rb.yard.rb', line 283 def create_mask(color, alpha) end |
#fill_rect(x, y, width, height, color)
Fill a portion of the image with a color
255 256 257 |
# File 'LiteRGSS.rb.yard.rb', line 255 def fill_rect(x, y, width, height, color) end |
#get_pixel(x, y) ⇒ Color?
Get a pixel color
262 263 264 |
# File 'LiteRGSS.rb.yard.rb', line 262 def get_pixel(x, y) end |
#get_pixel_alpha(x, y) ⇒ Integer, 0
Get a pixel alpha
269 270 271 |
# File 'LiteRGSS.rb.yard.rb', line 269 def get_pixel_alpha(x, y) end |
#set_pixel(x, y, color) ⇒ self
Set a pixel color
277 278 279 |
# File 'LiteRGSS.rb.yard.rb', line 277 def set_pixel(x, y, color) end |
#stretch_blt(dest_rect, source, source_rect) ⇒ self
Stretch blit an other image to this image (process alpha)
229 230 231 |
# File 'LiteRGSS.rb.yard.rb', line 229 def stretch_blt(dest_rect, source, source_rect) end |
#stretch_blt!(dest_rect, source, source_rect) ⇒ self
Stretch blit an other image to this image (replace the pixels)
237 238 239 |
# File 'LiteRGSS.rb.yard.rb', line 237 def stretch_blt!(dest_rect, source, source_rect) end |
#to_png ⇒ String?
Convert Image to PNG
288 289 290 |
# File 'LiteRGSS.rb.yard.rb', line 288 def to_png end |
#to_png_file(filename) ⇒ Boolean
Save the Image to a PNG file
294 295 296 |
# File 'LiteRGSS.rb.yard.rb', line 294 def to_png_file(filename) end |