Class: LiteRGSS::Bitmap
- Inherits:
-
Disposable
- Object
- Disposable
- LiteRGSS::Bitmap
- Defined in:
- LiteRGSS.rb.yard.rb
Overview
Class that stores an image loaded from file or memory into the VRAM
Instance Attribute Summary collapse
-
#height ⇒ Integer
readonly
Returns the heigth of the texture.
-
#rect ⇒ Rect
readonly
Returns the surface of the texture (0, 0, width, height).
-
#width ⇒ Integer
readonly
Returns the width of the texture.
Class Method Summary collapse
-
.new(width, height)
Create a new empty texture.
Instance Method Summary collapse
-
#to_png ⇒ String?
Convert bitmap to PNG.
-
#to_png_file(filename) ⇒ Boolean
Save the bitmap to a PNG file.
-
#update ⇒ self
deprecated
Deprecated.
Please do not use this method, draw your stuff in a Image first and then copy the content to the texture
Methods inherited from Disposable
Instance Attribute Details
#height ⇒ Integer (readonly)
Returns the heigth of the texture
159 160 161 |
# File 'LiteRGSS.rb.yard.rb', line 159 def height @height end |
#rect ⇒ Rect (readonly)
Returns the surface of the texture (0, 0, width, height)
161 162 163 |
# File 'LiteRGSS.rb.yard.rb', line 161 def rect @rect end |
#width ⇒ Integer (readonly)
Returns the width of the texture
157 158 159 |
# File 'LiteRGSS.rb.yard.rb', line 157 def width @width end |
Class Method Details
.new(width, height)
Create a new empty texture
147 148 149 |
# File 'LiteRGSS.rb.yard.rb', line 147 def self.new(filename_or_memory, from_memory = nil) end |
Instance Method Details
#to_png ⇒ String?
Convert bitmap to PNG
170 171 172 |
# File 'LiteRGSS.rb.yard.rb', line 170 def to_png end |
#to_png_file(filename) ⇒ Boolean
Save the bitmap to a PNG file
176 177 178 |
# File 'LiteRGSS.rb.yard.rb', line 176 def to_png_file(filename) end |
#update ⇒ self
Please do not use this method, draw your stuff in a Image first and then copy the content to the texture
update the content of the texture if some illegal drawing were made over it
165 166 167 |
# File 'LiteRGSS.rb.yard.rb', line 165 def update end |