|
RB.DrawCopy
Method - Static
public static void DrawCopy(Rect2i srcRect, Vector2i pos)
|
public static void DrawCopy(Rect2i srcRect, Vector2i pos, int flags = 0)
|
public static void DrawCopy(Rect2i srcRect, Vector2i pos, Vector2i pivot, float rotation)
|
public static void DrawCopy(Rect2i srcRect, Vector2i pos, Vector2i pivot, float rotation, int flags = 0)
|
public static void DrawCopy(Rect2i srcRect, Rect2i destRect)
|
public static void DrawCopy(Rect2i srcRect, Rect2i destRect, int flags = 0)
|
public static void DrawCopy(Rect2i srcRect, Rect2i destRect, Vector2i pivot, float rotation)
|
public static void DrawCopy(Rect2i srcRect, Rect2i destRect, Vector2i pivot, float rotation, int flags = 0)
|
Parameters
Returns
Nothing.
Description
Draw to display by copying from a rectangular region in a sprite sheet.
The destination position is specified by pos, or destRect. When using destRect the destination size could be different than the source rectangle size, which allows for scaling to any size.
Optional parameter flags allows for flipping the copied region horizontally or vertically by using RB.FLIP_H and RB.FLIP_V respectively. The RB.ROT_90_CW flag can be used to rotate the region by 90 degrees. A combination of these flags can be used to rotate and flip in any cardinal direction, for convenience these combinations are provided:
For arbitrary rotations the pivot parameter can specify the rotation center (offset from the source region top-left corner), and the rotation parameter can specify any angle in degrees.
Example
See Also
RB.DrawSprite
RB.DrawNineSlice
RB.SpriteSheetSet
SpriteSheetAsset
See Docs
Features - Drawing
Features - Sprite Sheets
|