예제 #1
0
 public Circle(Vector2 centerPoint, float radius, Color fillColor, SpriteBatch spriteBatch)
 {
     FillColor   = fillColor;
     Radius      = radius;
     CenterPoint = centerPoint;
     Position    = CenterPoint - new Vector2(Radius, Radius);
     Sprite      = GeometricContent.GetCircleTexture(spriteBatch, this);
 }
예제 #2
0
파일: Triangle.cs 프로젝트: Morniee/Sketch
 public Triangle(Vector2 point1, Vector2 point2, Vector2 point3, Color fillColor, SpriteBatch spriteBatch)
 {
     Point1    = point1;
     Point2    = point2;
     Point3    = point3;
     FillColor = fillColor;
     Position  = new Vector2(GetSmallestXValue(), GetSmallestYValue());
     Sprite    = GeometricContent.GetTriangleTexture(spriteBatch, this);
 }
예제 #3
0
 public Line(Vector2 point1, Vector2 point2, int strokeThickness, Color fillColor, SpriteBatch spriteBatch)
 {
     Point1          = point1;
     Point2          = point2;
     StrokeThickness = strokeThickness;
     FillColor       = fillColor;
     Position        = new Vector2(GetSmallestXValue(), GetSmallestYValue());
     Sprite          = GeometricContent.GetLineTexture(spriteBatch, this);
 }