CreateCircle() public method

Creates a circle starting from 0, 0.
public CreateCircle ( float radius, int sides ) : void
radius float The radius (half the width) of the circle.
sides int The number of sides on the circle (the more the detailed).
return void
Example #1
0
        private void UpdatePoints()
        {
            mLinePrimitive.CreateCircle(Radius, 15);

            if (mCircleOrigin == Geometry.CircleOrigin.TopLeft)
            {
                if (Rotation != 0)
                {
                    Matrix matrix = Matrix.CreateRotationZ(-MathHelper.ToRadians(Rotation));

                    var vector = Radius * matrix.Right + Radius * matrix.Up;

                    mLinePrimitive.Shift(vector.X, vector.Y);
                }
                else
                {
                    mLinePrimitive.Shift(Radius, Radius);
                }
            }
        }
Example #2
0
 private void UpdatePoints()
 {
     mLinePrimitive.CreateCircle(Radius, 15);
 }