root
texturegamnit $ RelativeSubtexture :: SELF
Type of this instance, automatically specialized in every classgamnit $ RelativeSubtexture :: offset_bottom
Offset of the bottom border onroot
from 0.0 to 1.0
gamnit $ RelativeSubtexture :: offset_left
Offset of the left border onroot
from 0.0 to 1.0
gamnit $ RelativeSubtexture :: offset_right
Offset of the right border onroot
from 0.0 to 1.0
gamnit $ RelativeSubtexture :: offset_top
Offset of the top border onroot
from 0.0 to 1.0
core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
gamnit :: Texture :: defaultinit
core :: Object :: defaultinit
gamnit :: Subtexture :: defaultinit
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
gamnit :: Texture :: offset_bottom
Offset of the bottom border onroot
from 0.0 to 1.0
gamnit :: Texture :: offset_left
Offset of the left border onroot
from 0.0 to 1.0
gamnit :: Texture :: offset_right
Offset of the right border onroot
from 0.0 to 1.0
gamnit :: Texture :: offset_top
Offset of the top border onroot
from 0.0 to 1.0
core :: Object :: output_class_name
Display class name on stdout (debug only).gamnit :: Subtexture :: parent
Parent texture, from which this texture was createdgamnit :: Subtexture :: parent=
Parent texture, from which this texture was createdgamnit :: Texture :: pixelated=
Should this texture be drawn pixelated when magnified? otherwise it is interpolatedgamnit :: Texture :: subtexture
Prepare a subtexture from this texture, from the given pixel offsetsgamnit :: Texture :: to_animation
Convert to a sprite animation atfps
speed with x
or y
frames
gamnit :: Subtexture
Texture derived from another texture, does not own its pixels
# Subtexture created from relative coordinates ([0..1]) out of the `root` texture
class RelativeSubtexture
super Subtexture
redef var offset_left
redef var offset_top
redef var offset_right
redef var offset_bottom
redef fun width do return root.width * (offset_right - offset_left)
redef fun height do return root.height * (offset_bottom - offset_top)
end
lib/gamnit/textures.nit:372,1--383,3