FerretEngine/src/Graphics/FeDraw.cs
/// <summary>
/// Draw a sprite on screen.
/// </summary>
/// <param name="sprite"></param>
/// <param name="position"></param>
/// <param name="color"></param>
/// <param name="rotation"></param>
/// <param name="origin"></param>
/// <param name="scale"></param>
/// <param name="effects"></param>
/// <param name="layerDepth"></param>
Draw a sprite on screen.
Draw a sprite on screen .
[MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static void SpriteExt(Sprite sprite, Vector2 position, Color color, float rotation,
                Vector2 scale, SpriteEffects effects, float layerDepth)
        {
            Assert.IsTrue(FeGraphics.IsRendering);
            if (!WillRender(sprite, position, scale))
                return;
            FeGraphics.BindMaterial();
            FeGraphics.SpriteBatch.Draw(
                    sprite.Texture,
                    position,
                    sprite.ClipRect,
                    color,
                    FeMath.DegToRad(rotation),
                    sprite.Origin,
                    scale,
                    effects,
                    layerDepth
                );
        }
[ MethodImpl ( MethodImplOptions . AggressiveInlining ) ] public static void SpriteExt ( Sprite sprite , Vector2 position , Color color , float rotation , Vector2 scale , SpriteEffects effects , float layerDepth ) { Assert . IsTrue ( FeGraphics . IsRendering ) ; if ( ! WillRender ( sprite , position , scale ) ) return ; FeGraphics . BindMaterial ( ) ; FeGraphics . SpriteBatch . Draw ( sprite . Texture , position , sprite . ClipRect , color , FeMath . DegToRad ( rotation ) , sprite . Origin , scale , effects , layerDepth ) ; }
Draw a sprite on screen.
Draw a sprite on screen .
sprite
Sprite
None
position
Vector2
None
color
Color
None
rotation
float
None
scale
Vector2
None
effects
SpriteEffects
None
layerDepth
float
None
origin
None