Beispiel #1
0
        /// <summary>
        /// Draws a graphic to this surface.
        /// </summary>
        /// <param name="graphic">The Graphic to draw.</param>
        /// <param name="x">The X position of the Graphic.</param>
        /// <param name="y">The Y position of the Graphic.</param>
        public void Draw(Graphic graphic, float x = 0, float y = 0)
        {
            Surface tempSurface = Otter.Draw.Target;

            Otter.Draw.SetTarget(this);
            graphic.Render(x, y);
            Otter.Draw.SetTarget(tempSurface);
        }
Beispiel #2
0
 /// <summary>
 /// Draws a graphic to this surface.
 /// </summary>
 /// <param name="graphic">The Graphic to draw.</param>
 /// <param name="x">The X position of the Graphic.</param>
 /// <param name="y">The Y position of the Graphic.</param>
 public void Draw(Graphic graphic, float x = 0, float y = 0)
 {
     Surface tempSurface = Otter.Draw.Target;
     Otter.Draw.SetTarget(this);
     graphic.Render(x, y);
     Otter.Draw.SetTarget(tempSurface);
 }
Beispiel #3
0
 /// <summary>
 /// Renders a Graphic to the current target Surface.
 /// </summary>
 /// <param name="graphic">The Graphic to render.</param>
 /// <param name="x">The x offset to position the Graphic at.</param>
 /// <param name="y">The y offset to position the Graphic at.</param>
 static public void Graphic(Graphic graphic, float x = 0, float y = 0)
 {
     graphic.Render(x, y);
 }
Beispiel #4
0
 /// <summary>
 /// Renders a Graphic to the current target Surface.
 /// </summary>
 /// <param name="graphic">The Graphic to render.</param>
 /// <param name="x">The x offset to position the Graphic at.</param>
 /// <param name="y">The y offset to position the Graphic at.</param>
 public static void Graphic(Graphic graphic, float x = 0, float y = 0)
 {
     graphic.Render(x, y);
 }