# Class `View.DisplaySprite`

Represents a display sprite.

## Functions

DisplaySprite(ID, int, pos, rot, scale[, color]) | Create a DisplaySprite object.
DisplaySprite:GetObjectID() | Get the object ID of the sprite sequence object used by the display sprite.
DisplaySprite:GetSpriteID() | Get the sprite ID in the sprite sequence object used by the display sprite.
DisplaySprite:GetPosition() | Get the display position of the display sprite in percent.
DisplaySprite:GetRotation() | Get the rotation of the display sprite in degrees.
DisplaySprite:GetScale() | Get the horizontal and vertical scale of the display sprite in percent.
DisplaySprite:GetColor() | Get the color of the display sprite.
DisplaySprite:SetObjectID(New) | Set the sprite sequence object ID used by the display sprite.
DisplaySprite:SetSpriteID(New) | Set the sprite ID in the sprite sequence object used by the display sprite.
DisplaySprite:SetPosition(New) | Set the display position of the display sprite in percent.
DisplaySprite:SetRotation(New) | Set the rotation of the display sprite in degrees.
DisplaySprite:SetScale(New) | Set the horizontal and vertical scale of the display sprite in percent.
DisplaySprite:SetColor(New) | Set the color of the display sprite.
DisplaySprite:Draw([priority][, alignMode][, scaleMode][, blendMode]) | Draw the display sprite in display space for the current frame.

## Functions

DisplaySprite(ID, int, pos, rot, scale[, color])
  Create a DisplaySprite object. ()

  ### Parameters:

  - ID ObjID of the sprite sequence object.
  - int int spriteID ID of the sprite in the sequence.
  - pos Vec2 Display position in percent.
  - rot float Rotation in degrees.
  - scale Vec2 Horizontal and vertical scale in percent. Scaling is interpreted by the DisplaySpriteEnum.ScaleMode passed to the Draw() function call.
  - color Color Color. Default: Color(255, 255, 255, 255) (optional)

  ### Returns:

  DisplaySprite A new DisplaySprite object.
DisplaySprite:GetObjectID()
  Get the object ID of the sprite sequence object used by the display sprite. ()

  ### Returns:

  ObjID Sprite sequence object ID.
DisplaySprite:GetSpriteID()
  Get the sprite ID in the sprite sequence object used by the display sprite. ()

  ### Returns:

  int Sprite ID in the sprite sequence object.
DisplaySprite:GetPosition()
  Get the display position of the display sprite in percent. ()

  ### Returns:

  Vec2 Display position in percent.
DisplaySprite:GetRotation()
  Get the rotation of the display sprite in degrees. ()

  ### Returns:

  float Rotation in degrees.
DisplaySprite:GetScale()
  Get the horizontal and vertical scale of the display sprite in percent. ()

  ### Returns:

  Vec2 Horizontal and vertical scale in percent.
DisplaySprite:GetColor()
  Get the color of the display sprite. ()

  ### Returns:

  Color Color.
DisplaySprite:SetObjectID(New)
  Set the sprite sequence object ID used by the display sprite. (Objects.ObjID)

  ### Parameters:

  - New ObjID sprite sequence object ID.
DisplaySprite:SetSpriteID(New)
  Set the sprite ID in the sprite sequence object used by the display sprite. (int)

  ### Parameters:

  - New int sprite ID in the sprite sequence object.
DisplaySprite:SetPosition(New)
  Set the display position of the display sprite in percent. (Vec2)

  ### Parameters:

  - New Vec2 display position in percent.
DisplaySprite:SetRotation(New)
  Set the rotation of the display sprite in degrees. (float)

  ### Parameters:

  - New float rotation in degrees.
DisplaySprite:SetScale(New)
  Set the horizontal and vertical scale of the display sprite in percent. (Vec2)

  ### Parameters:

  - New float horizontal and vertical scale in percent.
DisplaySprite:SetColor(New)
  Set the color of the display sprite. (Color)

  ### Parameters:

  - New float color.
DisplaySprite:Draw([priority][, alignMode][, scaleMode][, blendMode])
  Draw the display sprite in display space for the current frame.

  ### Parameters:

  - priority int Draw priority. Can be thought of as a layer, with higher values having precedence. Default: 0 (optional)
  - alignMode AlignMode Align mode interpreting an offset from the sprite's position. Default: View.AlignMode.CENTER (optional)
  - scaleMode ScaleMode Scale mode interpreting the display sprite's horizontal and vertical scale. Default: View.ScaleMode.FIT (optional)
  - blendMode BlendID Blend mode. Default: Effects.BlendID.ALPHABLEND (optional)

generated by TEN-LDoc (a fork of LDoc 1.4.6)