Пример #1
0
 public CircleShape(double x, double y, double radius, IDrawingApi drawingApi)
     : base(drawingApi)
 {
     this._x      = x;
     this._y      = y;
     this._radius = radius;
 }
Пример #2
0
 public Circle(int x, int y, int angle, IDrawingApi drawingApi)
     : base(drawingApi)
 {
     _x     = x;
     _y     = y;
     _angle = angle;
 }
Пример #3
0
 public CircleShape(double x, double y, double radius, IDrawingApi drawingApi)
     : base(drawingApi)
 {
     _x      = x;
     _y      = y;
     _radius = radius;
 }
Пример #4
0
 public Circle(int x, int y, int radius, IDrawingApi drawingAPI)
 {
     this.x          = x;
     this.y          = y;
     this.radius     = radius;
     this.drawingAPI = drawingAPI;
 }
Пример #5
0
 public Squre(int x, int y, int width, int height, IDrawingApi drawingApi)
     : base(drawingApi)
 {
     _x      = x;
     _y      = y;
     _width  = width;
     _height = height;
 }
Пример #6
0
        public void TestBridge(IDrawingApi drawingApi)
        {
            var circle = new Circle(0, 0, 10, drawingApi);

            circle.Draw();

            // OUTPUT: Drawing circle.
        }
Пример #7
0
		public CircleShape(double x, double y, double radius, IDrawingApi drawingApi)
			: base(drawingApi) {
			this._x = x;
			this._y = y;
			this._radius = radius;
		}
Пример #8
0
 protected Shape(IDrawingApi drawingApi)
 {
     DrawingApi = drawingApi;
 }
Пример #9
0
 /// <summary>Draws a filled rectangle.</summary>
 /// <param name="batch">The batch to draw to.</param>
 /// <param name="drawingApi">The drawing API to use.</param>
 /// <param name="bounds">The target rectangle to draw to.</param>
 /// <param name="color">The color of the rectangle</param>
 /// <param name="depth">The depth to draw to.</param>
 public static void FillRectangle(this SpriteBatch batch, IDrawingApi drawingApi, XnaRectangle bounds, Color color, float depth = 0f)
 {
     batch.Draw(drawingApi.WhitePixel, bounds, null, color, 0F, Vector2.Zero, SpriteEffects.None, depth);
 }
Пример #10
0
 /// <summary>Draws a filled rectangle.</summary>
 /// <param name="batch">The batch to draw to.</param>
 /// <param name="drawingApi">The drawing API to use.</param>
 /// <param name="bounds">The target rectangle to draw to.</param>
 /// <param name="color">The color of the rectangle</param>
 /// <param name="depth">The depth to draw to.</param>
 public static void FillRectangle(this SpriteBatch batch, IDrawingApi drawingApi, XTileRectangle bounds, Color color, float depth = 0f) => batch.FillRectangle(drawingApi, bounds.ToXnaRectangle(), color, depth);
Пример #11
0
 /// <summary>Draws a filled rectangle.</summary>
 /// <param name="batch">The batch to draw to.</param>
 /// <param name="drawingApi">The drawing API to use.</param>
 /// <param name="x">The top-left x-coordinate of the rectangle.</param>
 /// <param name="y">The top-left y-coordinate of the rectangle.</param>
 /// <param name="width">The width of the rectangle.</param>
 /// <param name="height">The height of the rectangle.</param>
 /// <param name="color">The color of the rectangle</param>
 /// <param name="depth">The depth to draw to.</param>
 public static void FillRectangle(this SpriteBatch batch, IDrawingApi drawingApi, int x, int y, int width, int height, Color color, float depth = 0f) => batch.FillRectangle(drawingApi, new XnaRectangle(x, y, width, height), color, depth);
Пример #12
0
 protected Shape(IDrawingApi drawingApi)
 {
     this.DrawingApi = drawingApi;
 }
Пример #13
0
 public Shape(IDrawingApi drawingApi)
 {
     DrawingApi = drawingApi;
 }
Пример #14
0
 public MyLogo(int x, int y, IDrawingApi drawingApi) : base(x, y, 10, drawingApi)
 {
     _x = x;
     _y = y;
 }
Пример #15
0
		protected Shape(IDrawingApi drawingApi) {
			this.DrawingApi = drawingApi;
		}