diff --git a/Quik/QuikCommand.cs b/Quik/QuikCommand.cs index ac28fc7..cbd2a40 100644 --- a/Quik/QuikCommand.cs +++ b/Quik/QuikCommand.cs @@ -1,4 +1,3 @@ -using System.Numerics; namespace Quik { @@ -363,13 +362,13 @@ namespace Quik /// /// The vertices that make up the polygon. /// - public Vector2[] Polygon { get; } + public QuikVec2[] Polygon { get; } /// /// Create a draw polygon command. /// /// The polygon to draw. - public QuikCommandPolygon(Vector2[] polygon) + public QuikCommandPolygon(QuikVec2[] polygon) { Polygon = polygon; } @@ -392,14 +391,14 @@ namespace Quik /// /// The baseline start position of the character. /// - public Vector2 Position { get; } + public QuikVec2 Position { get; } /// /// Create a put character command. /// /// The character to put. /// The baseline start position of the character. - public QuikCommandPutChar(int character, Vector2 position) + public QuikCommandPutChar(int character, QuikVec2 position) { Character = character; Position = position; @@ -410,7 +409,7 @@ namespace Quik /// /// The character to put. /// The baseline start position of the character. - public QuikCommandPutChar(char character, Vector2 position) : this((int) character, position) + public QuikCommandPutChar(char character, QuikVec2 position) : this((int) character, position) { } } @@ -431,14 +430,14 @@ namespace Quik /// /// The baseline start position of the text. /// - public Vector2 Position { get; } + public QuikVec2 Position { get; } /// /// Create a put text command. /// /// The text to put. /// The baseline start position of the text. - public QuikCommandPutText(string text, Vector2 position) + public QuikCommandPutText(string text, QuikVec2 position) { Text = text; Position = position; diff --git a/Quik/QuikDraw.cs b/Quik/QuikDraw.cs index 7a1fe7b..cd1f972 100644 --- a/Quik/QuikDraw.cs +++ b/Quik/QuikDraw.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using System.Linq; -using System.Numerics; namespace Quik { @@ -29,8 +28,8 @@ namespace Quik public void Triangle(params QuikTriangle[] triangles) => Commands.Enqueue(new QuikCommandTriangles(triangles)); public void Triangle(IEnumerable triangles) => Commands.Enqueue(new QuikCommandTriangles(triangles.ToArray())); - public void Polygon(params Vector2[] polygon) => Commands.Enqueue(new QuikCommandPolygon(polygon)); - public void Polygon(IEnumerable polygon) => Commands.Enqueue(new QuikCommandPolygon(polygon.ToArray())); + public void Polygon(params QuikVec2[] polygon) => Commands.Enqueue(new QuikCommandPolygon(polygon)); + public void Polygon(IEnumerable polygon) => Commands.Enqueue(new QuikCommandPolygon(polygon.ToArray())); public void StencilClear() => Commands.Enqueue(new QuikCommandStencilClear()); public void StencilBegin() => Commands.Enqueue(new QuikCommandStencilBegin()); public void StencilEnd() => Commands.Enqueue(new QuikCommandStencilEnd()); diff --git a/Quik/QuikGeometry.cs b/Quik/QuikGeometry.cs index 9750fac..75e1981 100644 --- a/Quik/QuikGeometry.cs +++ b/Quik/QuikGeometry.cs @@ -1,7 +1,37 @@ -using System.Numerics; - namespace Quik { + /// + /// A 2 dimensional Vector. + /// + public struct QuikVec2 + { + public float X; + public float Y; + } + + /// + /// A RGBA color value. + /// + public struct QuikColor + { + /// + /// Red channel. + /// + public byte R; + /// + /// Green channel. + /// + public byte G; + /// + /// Blue channel. + /// + public byte B; + /// + /// Alpha channel. + /// + public byte A; + } + /// /// A bezier curve segment. /// @@ -10,22 +40,22 @@ namespace Quik /// /// Segment start point. /// - public Vector2 Start; + public QuikVec2 Start; /// /// Start point control point. /// - public Vector2 ControlA; + public QuikVec2 ControlA; /// /// End point control point. /// - public Vector2 ControlB; + public QuikVec2 ControlB; /// /// Segment end point. /// - public Vector2 End; + public QuikVec2 End; } /// @@ -36,12 +66,12 @@ namespace Quik /// /// Start point. /// - public Vector2 Start; + public QuikVec2 Start; /// /// End point. /// - public Vector2 End; + public QuikVec2 End; } /// @@ -52,12 +82,12 @@ namespace Quik /// /// Rectangle minimum point. /// - public Vector2 Min; + public QuikVec2 Min; /// /// Rectangle maximum point. /// - public Vector2 Max; + public QuikVec2 Max; } /// @@ -69,17 +99,17 @@ namespace Quik /// /// Ellipse center point. /// - public Vector2 Center; + public QuikVec2 Center; /// /// First ellipse axis. /// - public Vector2 AxisA; + public QuikVec2 AxisA; /// /// Second ellipse axis. /// - public Vector2 AxisB; + public QuikVec2 AxisB; } /// @@ -90,16 +120,16 @@ namespace Quik /// /// First vertex. /// - public Vector2 A; + public QuikVec2 A; /// /// Second vertex. /// - public Vector2 B; + public QuikVec2 B; /// /// Third vertex. /// - public Vector2 C; + public QuikVec2 C; } } \ No newline at end of file