} // RenderOnScreenRelative4To3(relX, relY, pixelRect) /// <summary> /// Render on screen relative for 1600px width graphics. /// </summary> /// <param name="relX">Rel x</param> /// <param name="relY">Rel y</param> /// <param name="pixelRect">Pixel rectangle</param> public void RenderOnScreenRelative1600( int relX, int relY, Rectangle pixelRect) { SpriteHelper.AddSpriteToRender(this, BaseGame.CalcRectangle1600( relX, relY, pixelRect.Width, pixelRect.Height), pixelRect); } // RenderOnScreenRelative1600(relX, relY, pixelRect)
} // RenderOnScreenWithRotation(rocketPos, widthAndHeightDiv2, rotation) /// <summary> /// Render on screen with rotation /// </summary> /// <param name="rocketPos">Rocket position</param> /// <param name="widthAndHeightDiv2">Width and height div 2</param> /// <param name="rotation">Rotation</param> /// <param name="pixelRect">Pixel rectangle</param> public void RenderOnScreenWithRotation( Point pos, int widthAndHeightDiv2, float rotation, Rectangle pixelRect, Color col) { SpriteHelper.AddSpriteToRender(this, new Rectangle(pos.X - widthAndHeightDiv2, pos.Y - widthAndHeightDiv2, widthAndHeightDiv2 * 2, widthAndHeightDiv2 * 2), pixelRect, rotation, new Vector2(pos.X, pos.Y), col); } // RenderOnScreenWithRotation(rocketPos, widthAndHeightDiv2, rotation)
} // RenderOnScreen(rect, pixelRect, color) #endregion #region Rendering on screen with rotation /// <summary> /// Render on screen with rotation /// </summary> /// <param name="pos">Position</param> /// <param name="pixelRect">Pixel rectangle</param> /// <param name="rotation">Rotation</param> public void RenderOnScreenWithRotation( Rectangle rect, Rectangle pixelRect, float rotation, Vector2 rotationPoint) { //Rectangle rect = // new Rectangle(pos.X, pos.Y, pixelRect.Width, pixelRect.Height); SpriteHelper.AddSpriteToRender(this, rect, pixelRect, rotation, //new Vector2(rect.X + rect.Width / 2, rect.Y + rect.Height / 2)); rotationPoint); } // RenderOnScreenWithRotation(pos, pixelRect, rotation)
} // RenderOnScreen(rect, pixelRect, color) /// <summary> /// Render on screen /// </summary> /// <param name="rect">Rectangle</param> /// <param name="pixelRect">Pixel rectangle</param> /// <param name="color">Color</param> /// <param name="blendMode">Blend mode</param> public void RenderOnScreen(Rectangle rect, Rectangle pixelRect, Color color, SpriteBlendMode blendMode) { SpriteHelper.AddSpriteToRender(this, rect, pixelRect, color, blendMode); } // RenderOnScreen(rect, pixelRect, color)
} // RenderOnScreen(rect, pixelRect, color) /// <summary> /// Render texture at rect directly on screen using texture cordinates. /// This method allows to render with specific color and alpha values. /// </summary> /// <param name="rect">Rectangle</param> /// <param name="pixelRect">Pixel rectangle</param> /// <param name="color">Color</param> public void RenderOnScreen(Rectangle rect, Rectangle pixelRect, Color color, float alphaValue) { SpriteHelper.AddSpriteToRender(this, rect, pixelRect, ColorHelper.ApplyAlphaToColor(color, alphaValue)); } // RenderOnScreen(rect, pixelRect, color)
} // RenderOnScreen(pos) /// <summary> /// Render on screen /// </summary> /// <param name="renderRect">Render rectangle</param> public void RenderOnScreen(Rectangle renderRect) { SpriteHelper.AddSpriteToRender(this, renderRect, GfxRectangle); } // RenderOnScreen(renderRect)
} // RenderOnScreen(rect, pixelX, pixelY) /// <summary> /// Render on screen /// </summary> /// <param name="pos">Position</param> public void RenderOnScreen(Point pos) { SpriteHelper.AddSpriteToRender(this, new Rectangle(pos.X, pos.Y, texWidth, texHeight), new Rectangle(0, 0, texWidth, texHeight)); } // RenderOnScreen(pos)
} // RenderOnScreen(rect, pixelRect) /// <summary> /// Render on screen /// </summary> /// <param name="rect">Rectangle</param> /// <param name="pixelX">Pixel x</param> /// <param name="pixelY">Pixel y</param> /// <param name="pixelWidth">Pixel width</param> /// <param name="pixelHeight">Pixel height</param> public void RenderOnScreen(Rectangle rect, int pixelX, int pixelY, int pixelWidth, int pixelHeight) { SpriteHelper.AddSpriteToRender(this, rect, new Rectangle(pixelX, pixelY, pixelWidth, pixelHeight)); } // RenderOnScreen(rect, pixelX, pixelY)
} // Load() #endregion #region Render on screen /// <summary> /// Render texture at rect directly on screen using pixelRect. /// </summary> /// <param name="rect">Rectangle</param> /// <param name="pixelRect">Pixel rectangle</param> public void RenderOnScreen(Rectangle rect, Rectangle pixelRect) { SpriteHelper.AddSpriteToRender(this, rect, pixelRect); } // RenderOnScreen(rect, pixelRect)