コード例 #1
0
ファイル: DrawBuilder.cs プロジェクト: limocute/yak2d
 public IShape Arrow(float headWidth, float headLength)
 {
     _shape           = _shape == DrawBuilderShape.RoundedLine ? DrawBuilderShape.RoundedArrow : DrawBuilderShape.Arrow;
     _arrowHeadWidth  = headWidth;
     _arrowHeadLength = headLength;
     return(this);
 }
コード例 #2
0
ファイル: DrawBuilder.cs プロジェクト: limocute/yak2d
 public IShape Quad(Vector2 position, float width, float height)
 {
     _shape      = DrawBuilderShape.Quad;
     _position   = position;
     _quadWidth  = width;
     _quadHeight = height;
     return(this);
 }
コード例 #3
0
ファイル: DrawBuilder.cs プロジェクト: limocute/yak2d
 public IShape Poly(Vector2[] vertices, int[] indices)
 {
     _shape                      = DrawBuilderShape.PolyVerts;
     _polyVertsVertices          = vertices;
     _polyVertsIndices           = indices;
     _polyVertsSuppliedTexCoords = false;
     return(this);
 }
コード例 #4
0
ファイル: DrawBuilder.cs プロジェクト: limocute/yak2d
 public IShape Poly(Vector2 position, int numSides, float radius)
 {
     _shape        = DrawBuilderShape.PolyRegular;
     _position     = position;
     _polyNumSides = numSides;
     _polyRadius   = radius;
     return(this);
 }
コード例 #5
0
ファイル: DrawBuilder.cs プロジェクト: limocute/yak2d
        //Shapes

        public ILine Line(Vector2 from, Vector2 to, float width)
        {
            _shape     = DrawBuilderShape.Line;
            _from      = from;
            _to        = to;
            _lineWidth = width;
            return(this);
        }
コード例 #6
0
ファイル: DrawBuilder.cs プロジェクト: limocute/yak2d
 public ILine RoundedLine(Vector2 from, Vector2 to, float width, int roundedNumDivisions, bool endLineAtCentreRounded)
 {
     _shape     = DrawBuilderShape.RoundedLine;
     _from      = from;
     _to        = to;
     _lineWidth = width;
     _roundedLineNumDivisions = roundedNumDivisions;
     _roundedLineEndsAreCentreOfRoundedPart = endLineAtCentreRounded;
     return(this);
 }