Uses of Record Class
cit244.api.image.Sprite

Packages that use Sprite
Package
Description
Main API for CIT AViz sketches, including drawing, input, timing, and controls.
Images, sprite regions, sprite sheets, and frame-based animation.
  • Uses of Sprite in cit244.api

    Methods in cit244.api with parameters of type Sprite
    Modifier and Type
    Method
    Description
    default void
    Graphics.sprite(Sprite sprite, double x, double y)
    Draws a sprite at its native dimensions.
    void
    Graphics.sprite(Sprite sprite, double x, double y, double w, double h)
    Draws a region of an image at the given destination dimensions.
  • Uses of Sprite in cit244.api.image

    Methods in cit244.api.image that return Sprite
    Modifier and Type
    Method
    Description
    SpriteSheet.at(int col, int row)
    Selects a cell by column and row, starting from (0, 0).
    AnimationPlayer.frame()
    Returns the current sprite without advancing playback.
    Animation.frameAt(double seconds)
    Selects the sprite displayed at an animation-relative time.
    default Sprite
    Image.full()
    Selects the whole image as a sprite.
    default Sprite
    Image.region(int x, int y, int w, int h)
    Selects a rectangular region of this image.
    SpriteDraw.sprite()
    Returns the value of the sprite record component.
    AnimationPlayer.update(double dt)
    Advances playback and returns the current sprite.
    Methods in cit244.api.image with parameters of type Sprite
    Modifier and Type
    Method
    Description
    static Animation
    Animation.loop(double fps, Sprite... frames)
    Creates an animation that repeats after its last frame.
    static SpriteDraw
    SpriteDraw.of(Sprite sprite, double x, double y)
    Creates drawing instructions at native scale with a top-left anchor, no rotation, no flipping, and no local tint.
    static Animation
    Animation.once(double fps, Sprite... frames)
    Creates an animation that holds its final frame when finished.
    Constructors in cit244.api.image with parameters of type Sprite
    Modifier
    Constructor
    Description
     
    SpriteDraw(Sprite sprite, double x, double y, double anchorX, double anchorY, double scale, double rotation, boolean flippedX, boolean flippedY, Color tint)
    Requires a sprite, finite coordinates and transforms, and nonnegative scale.