⚠ Preview docs — built from the develop branch and may be unstable. Go to the stable docs.

Sprite.Draw

void Draw(Matrix& transform, Pivot pivotPosition, RenderLayer layer)

Draws the sprite at the location specified by the transform matrix. A sprite is always sized in model space as 1 x Aspect meters on the x and y axes respectively, so scale appropriately. The ‘position’ attribute describes what corner of the sprite you’re specifying the transform of.

   
Matrix& transform A Matrix describing a transform from model space to world space. A sprite is always sized in model space as 1 x Aspect meters on the x and y axes respectively, so scale appropriately and remember that your anchor position may affect the transform as well.
Pivot pivotPosition Describes what corner of the sprite you’re specifying the transform of. The ‘Pivot’ point or ‘Origin’ of the Sprite.
RenderLayer layer The RenderLayer this sprite should be drawn on. This defaults to RenderLayer.Layer0.
void Draw(Matrix& transform, Pivot anchorPosition, Color32 linearColor, RenderLayer layer)

Draws the sprite at the location specified by the transform matrix. A sprite is always sized in model space as 1 x Aspect meters on the x and y axes respectively, so scale appropriately. The ‘position’ attribute describes what corner of the sprite you’re specifying the transform of.

   
Matrix& transform A Matrix describing a transform from model space to world space. A sprite is always sized in model space as 1 x Aspect meters on the x and y axes respectively, so scale appropriately and remember that your anchor position may affect the transform as well.
RenderLayer layer The RenderLayer this sprite should be drawn on. This defaults to RenderLayer.Layer0.
Color32 linearColor Per-instance color data for this render item. It is unmodified by StereoKit, and is generally interpreted as linear.




Found an issue with these docs, or have some additional questions? Create an Issue on Github!