struct
Eagle::TextureRegion
- Eagle::TextureRegion
- Struct
- Value
- Object
Overview
A rectangle inside a texture, drawable anywhere a texture is. Create one with
Texture#region or Texture#frames.
Defined in:
eagle/graphics/texture.crConstructors
-
.new(texture : Eagle::Texture, rect : Eagle::Rect)
Creates a region of texture covering rect, in pixels.
Instance Method Summary
-
#flipped_x : TextureRegion
The same region mirrored horizontally, for sprites that face left and right.
-
#flipped_y : TextureRegion
The same region mirrored vertically.
-
#height : Float32
Height in pixels.
-
#rect : Rect
The region in pixels.
-
#size : Vec2
(width, height). -
#texture : Texture
The texture this region is cut from.
-
#u0 : Float32
Left texture coordinate.
-
#u1 : Float32
Right texture coordinate.
-
#v0 : Float32
Top texture coordinate.
-
#v1 : Float32
Bottom texture coordinate.
-
#width : Float32
Width in pixels.
Constructor Detail
Creates a region of texture covering rect, in pixels.
Instance Method Detail
def flipped_x : TextureRegion
#
The same region mirrored horizontally, for sprites that face left and right.