class
PF::Sprite
- PF::Sprite
- Reference
- Object
Included Modules
Defined in:
sprite.crConstructors
Class Method Summary
Instance Method Summary
-
#convert(other : SDL::Surface)
Convert the color mode of this sprite to another for optimization
-
#convert(other : Sprite)
ditto
-
#draw_point(x, y, value : UInt32 | Pixel)
Implements PF2d::Drawable(UInt32)
- #draw_string(string : String, x : Number, y : Number, font : Pixelfont::Font, pixel)
- #draw_string(string : String, pos : PF2d::Vec, font : Pixelfont::Font, pixel)
-
#draw_to(sprite : Sprite, source : PF2d::Vec, size : PF2d::Vec, dest : PF2d::Vec)
Draw this sprite to another given a source rect and destination
-
#draw_to(surface : SDL::Surface, x : Int = 0, y : Int = 0)
Draw this sprite to another
-
#draw_to(sprite : Sprite, x : Int = 0, y : Int = 0)
ditto
-
#draw_to(dest : SDL::Surface | Sprite, at : PF2d::Vec)
ditto
-
#fill(color : PF::Pixel)
Fill a sprite with a color
- #fill(*args, **options)
- #fill(*args, **options, &)
- #format(*args, **options)
- #format(*args, **options, &)
-
#get_point(x : Number, y : Number) : Pixel
To be implemented by the including class
- #height
- #lock(*args, **options)
- #lock(*args, **options, &)
-
#peak(x : Int, y : Int)
Peak at a raw pixel value at (x, y)
-
#peak(point : PF2d::Vec)
ditto
-
#pixel_pointer(x : Int32, y : Int32)
Get the pointer to a pixel
-
#pixels
Raw access to the pixels as a Slice
-
#sample(x : Int, y : Int, alpha : Bool)
Sample a color with alhpa
-
#sample(x : Int, y : Int)
Sample a color at an x and y position
-
#sample(point : PF2d::Vec, alpha : Bool)
ditto
-
#sample(point : PF2d::Vec)
ditto
- #size : PF2d::Vec2
- #surface : SDL::Surface
- #surface=(surface : SDL::Surface)
- #width
Constructor Detail
Class Method Detail
Instance Method Detail
def convert(other : SDL::Surface)
#
Convert the color mode of this sprite to another for optimization
def draw_string(string : String, x : Number, y : Number, font : Pixelfont::Font, pixel)
#
Draw this sprite to another given a source rect and destination
Draw this sprite to another
Description copied from module PF2d::Viewable(PF::Pixel)
To be implemented by the including class