Skip to main content
Version: 1.0.0-preview.33

Velaptor.Graphics.CircleShape

Velaptor

Velaptor.Graphics

CircleShape Struct

Represents a circle shape with various attributes.

public struct CircleShape :
System.IEquatable<Velaptor.Graphics.CircleShape>

Implements System.IEquatable<CircleShape>

Constructors

CircleShape() Constructor

Initializes a new instance of the CircleShape struct.

public CircleShape();

Properties

BorderThickness

Gets or sets the thickness of the circle's border.

public float BorderThickness { get; set; }

Property Value

System.Single

Remarks

Only visible if the IsSolid property is set to false.


The border thickness is automatically restricted to a value no greater than the Radius.

Bottom

Gets or sets the bottom location of the bottom of the circle on the Y axis.

public float Bottom { get; set; }

Property Value

System.Single

Remarks

Will automatically update the Position of the circle.

Color

Gets or sets the color of the circle.

public System.Drawing.Color Color { get; set; }

Property Value

System.Drawing.Color

Remarks

Ignored if the GradientType is set to any value other than None.

Diameter

Gets or sets the diameter of the circle.

public float Diameter { get; set; }

Property Value

System.Single

Remarks

The diameter is restricted to a minimum value of one.

GradientStart

Gets or sets the starting color of the gradient.

public System.Drawing.Color GradientStart { get; set; }

Property Value

System.Drawing.Color

Remarks

This property is ignored if the GradientType is set to a value of None.

GradientStop

Gets or sets the ending color of the gradient.

public System.Drawing.Color GradientStop { get; set; }

Property Value

System.Drawing.Color

Remarks

This property is ignored if the GradientType is set to a value of None.

GradientType

Gets or sets the type of color gradient that will be applied to the circle.

public Velaptor.Graphics.ColorGradient GradientType { get; set; }

Property Value

ColorGradient

Remarks

A value of None will use the Color
property and render the circle with a solid color.

A value of Horizontal will ignore the Color
property and use the GradientStartGradientStop properties.
This will render the circle with GradientStart color on the left side and gradually
render it to the right side as the GradientStop color.

A value of Vertical will ignore the Color
property and use the GradientStart and GradientStop properties.
This will render the circle with GradientStart color on the top and gradually
render it to the bottom as the GradientStop color.

IsSolid

Gets or sets a value indicating whether or not the circle is solid.

public bool IsSolid { get; set; }

Property Value

System.Boolean

Left

Gets or sets the location of the left side of the circle on the X axis.

public float Left { get; set; }

Property Value

System.Single

Remarks

Will automatically update the Position of the circle.

Position

Gets or sets the position of the circle.

public System.Numerics.Vector2 Position { get; set; }

Property Value

System.Numerics.Vector2

Remarks

This position is relative to the center of the circle.

Radius

Gets or sets the radius of the circle.

public float Radius { get; set; }

Property Value

System.Single

Remarks

This is half of the Diameter.


Changing the radius will automatically update the Diameter.

Gets or sets the location of the right side of the circle on the X axis.

public float Right { get; set; }

Property Value

System.Single

Remarks

Will automatically update the Position of the circle.

Top

Gets or sets the top location of the top of the circle on the Y axis.

public float Top { get; set; }

Property Value

System.Single

Remarks

Will automatically update the Position of the circle.

Methods

Empty()

Empties the struct.

public void Empty();

IsEmpty()

Returns a value indicating whether or not the RectShape struct is empty.

public bool IsEmpty();

Returns

System.Boolean
True if empty.