public void DrawScaledImage(TextureImage tex, float x, float y, float scaleX, float scaleY) { Vector2 origin = new Vector2(0.5f * tex.GetWidth(), 0.5f * tex.GetHeight()); Vector2 scale = new Vector2(scaleX, scaleY); GetSpriteBatch(BatchMode.Sprite).Draw(tex.GetTexture(), new Vector2(x, y), null, drawColor, 0.0f, origin, scale, SpriteEffects.None, 0.0f); }
public void DrawImage(TextureImage tex, ref Rectangle src, ref Vector2 position, ref Color color, float rotation, ref Vector2 origin, ref Vector2 scale, ref Vector2 flip) { SpriteEffects flipEffects = flip.X == 1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; if (flip.Y == 1) { flipEffects |= SpriteEffects.FlipVertically; } GetSpriteBatch(BatchMode.Sprite).Draw(tex.GetTexture(), position, src, color, rotation, origin, scale, flipEffects, 0.0f); }
public void DrawImageRotated(TextureImage tex, float x, float y, Vector2 origin, float rotation) { GetSpriteBatch(BatchMode.Sprite).Draw(tex.GetTexture(), new Vector2(x, y), null, drawColor, rotation, origin, 1.0f, SpriteEffects.None, 0.0f); }
public void DrawImage(TextureImage tex, float x, float y, SpriteEffects flip) { GetSpriteBatch(BatchMode.Sprite).Draw(tex.GetTexture(), new Vector2(x, y), null, drawColor, 0.0f, Vector2.Zero, 1.0f, flip, 0.0f); }
public void DrawImagePart(TextureImage tex, Rectangle src, float x, float y, Color dc) { GetSpriteBatch(BatchMode.Sprite).Draw(tex.GetTexture(), new Vector2(x, y), src, dc); }
public void DrawImage(TextureImage tex, float x, float y, Color color) { GetSpriteBatch(BatchMode.Sprite).Draw(tex.GetTexture(), new Vector2(x, y), color); }
public void DrawImage(TextureImage tex, float x, float y, float opacity) { GetSpriteBatch(BatchMode.Sprite).Draw(tex.GetTexture(), new Vector2(x, y), new Color(1.0f, 1.0f, 1.0f, opacity)); }