Class: LiteRGSS::Bitmap

Inherits:
Disposable show all
Defined in:
LiteRGSS.rb.yard.rb

Overview

Class that stores an image loaded from file or memory into the VRAM

Direct Known Subclasses

Bitmap, Texture

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Disposable

#dispose, #disposed?

Instance Attribute Details

#heightInteger (readonly)

Returns the heigth of the texture

Returns:

  • (Integer)

    Returns the heigth of the texture



159
160
161
# File 'LiteRGSS.rb.yard.rb', line 159

def height
  @height
end

#rectRect (readonly)

Returns the surface of the texture (0, 0, width, height)

Returns:

  • (Rect)

    Returns the surface of the texture (0, 0, width, height)



161
162
163
# File 'LiteRGSS.rb.yard.rb', line 161

def rect
  @rect
end

#widthInteger (readonly)

Returns the width of the texture

Returns:

  • (Integer)

    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

Parameters:

  • width (Integer)

    width of the new texture

  • height (Integer)

    height of the new 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_pngString?

Convert bitmap to PNG

Returns:

  • (String, nil)

    contents of the PNG, nil if couldn’t be converted 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

Parameters:

  • filename (String)

    Name of the PNG file

Returns:

  • (Boolean)

    success of the operation



176
177
178
# File 'LiteRGSS.rb.yard.rb', line 176

def to_png_file(filename)

end

#updateself

Deprecated.

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

Returns:

  • (self)


165
166
167
# File 'LiteRGSS.rb.yard.rb', line 165

def update

end