Class: LiteRGSS::Viewport
- Inherits:
-
Disposable
- Object
- Disposable
- LiteRGSS::Viewport
- Defined in:
- LiteRGSS.rb.yard.rb
Overview
Class that describes a surface of the screen where texts and sprites are shown (with some global effect)
Direct Known Subclasses
Instance Attribute Summary collapse
-
#__index__ ⇒ Integer
readonly
Return the viewport “index” (used to know if the viewport has been created after an other sprite or viewport when z are the same.
-
#angle ⇒ Integer
Angle of the viewport contents.
-
#blendmode ⇒ Shader, BlendMode
Blend Mode of the viewport (can be specified in the shader).
-
#ox ⇒ Integer
The offset x of the viewport’s contents.
-
#oy ⇒ Integer
The offset y of the viewport’s contents.
-
#rect ⇒ Rect
The surface of the viewport on the screen.
-
#shader ⇒ Shader, BlendMode
Shader of the viewport (include the BlendMode properties).
-
#visible ⇒ Boolean
Viewport content visibility.
-
#z ⇒ Numeric
The viewport z property.
-
#zoom ⇒ Integer
Zoom of the viewport contents.
Class Method Summary collapse
-
.new(window, x, y, width, height)
Create a new Viewport.
Instance Method Summary collapse
-
#snap_to_bitmap ⇒ Bitmap
Return a snapshot of the viewport.
-
#sort_z ⇒ self
Sort all the elements inside the viewport according to their z index.
Methods inherited from Disposable
Instance Attribute Details
#__index__ ⇒ Integer (readonly)
Return the viewport “index” (used to know if the viewport has been created after an other sprite or viewport when z are the same
330 331 332 |
# File 'LiteRGSS.rb.yard.rb', line 330 def __index__ @__index__ end |
#angle ⇒ Integer
Returns Angle of the viewport contents.
311 312 313 |
# File 'LiteRGSS.rb.yard.rb', line 311 def angle @angle end |
#blendmode ⇒ Shader, BlendMode
Input is inverse of output due to internal logic (zoom=2 will make .zoom return 0.5) what matters is input, if you set 2, pixels will be 2x2
Returns Blend Mode of the viewport (can be specified in the shader).
317 318 319 |
# File 'LiteRGSS.rb.yard.rb', line 317 def blendmode @blendmode end |
#ox ⇒ Integer
Returns The offset x of the viewport’s contents.
303 304 305 |
# File 'LiteRGSS.rb.yard.rb', line 303 def ox @ox end |
#oy ⇒ Integer
Returns The offset y of the viewport’s contents.
305 306 307 |
# File 'LiteRGSS.rb.yard.rb', line 305 def oy @oy end |
#rect ⇒ Rect
Returns The surface of the viewport on the screen.
301 302 303 |
# File 'LiteRGSS.rb.yard.rb', line 301 def rect @rect end |
#shader ⇒ Shader, BlendMode
Returns Shader of the viewport (include the BlendMode properties).
319 320 321 |
# File 'LiteRGSS.rb.yard.rb', line 319 def shader @shader end |
#visible ⇒ Boolean
Returns Viewport content visibility.
307 308 309 |
# File 'LiteRGSS.rb.yard.rb', line 307 def visible @visible end |
#z ⇒ Numeric
Returns The viewport z property.
309 310 311 |
# File 'LiteRGSS.rb.yard.rb', line 309 def z @z end |
#zoom ⇒ Integer
Returns Zoom of the viewport contents.
313 314 315 |
# File 'LiteRGSS.rb.yard.rb', line 313 def zoom @zoom end |
Class Method Details
.new(window, x, y, width, height)
Create a new Viewport
326 327 328 |
# File 'LiteRGSS.rb.yard.rb', line 326 def self.new(window, x, y, width, height) end |
Instance Method Details
#snap_to_bitmap ⇒ Bitmap
Return a snapshot of the viewport
333 334 335 |
# File 'LiteRGSS.rb.yard.rb', line 333 def snap_to_bitmap end |
#sort_z ⇒ self
Sort all the elements inside the viewport according to their z index
338 339 340 |
# File 'LiteRGSS.rb.yard.rb', line 338 def sort_z end |