Class Geometry
Represents a Geometry which can be drawn by a Graphics device.
Implements
Inherited Members
Namespace: GameOverlay.Drawing
Assembly: GameOverlay.dll
Syntax
public class Geometry : IDisposable
Constructors
| Improve this Doc View SourceGeometry(Graphics)
Initializes a new Geometry using a Graphics device.
Declaration
public Geometry(Graphics device)
Parameters
Type | Name | Description |
---|---|---|
Graphics | device |
Properties
| Improve this Doc View SourceIsOpen
Determines whether this Geometry is open.
Declaration
public bool IsOpen { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
| Improve this Doc View SourceAddCurve(Point, Single, Single)
Adds a curved line to the currently open figure.
Declaration
public void AddCurve(Point point, float radius, float rotationAngle = 0F)
Parameters
Type | Name | Description |
---|---|---|
Point | point | The end point of the curved line. |
Single | radius | The radius of the resulting arc in degrees. |
Single | rotationAngle | A value determining the rotation angle this curve. |
AddCurve(Point, Single, Single, Single)
Adds a curved line to the currently open figure.
Declaration
public void AddCurve(Point point, float radius_x, float radius_y, float rotationAngle = 0F)
Parameters
Type | Name | Description |
---|---|---|
Point | point | The end point of the curved line. |
Single | radius_x | The radius on the X-Axis of the resulting arc in degrees. |
Single | radius_y | The radius on the Y-Axis of the resulting arc in degrees. |
Single | rotationAngle | A value determining the rotation angle this curve. |
AddPoint(Point)
Adds a new Point within the current figure.
Declaration
public void AddPoint(Point point)
Parameters
Type | Name | Description |
---|---|---|
Point | point | A Point which will be added to this figure |
AddRectangle(Rectangle, Boolean)
Creates a new figure from a Rectangle.
Declaration
public void AddRectangle(Rectangle rectangle, bool fill = false)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | rectangle | The Rectangle used to create a new figure. |
Boolean | fill | A Boolean value determining whether this figure can be filled by a Graphics device. |
BeginFigure(Line, Boolean)
Starts a new figure within this Geometry using a starting line.
Declaration
public void BeginFigure(Line line, bool fill = false)
Parameters
Type | Name | Description |
---|---|---|
Line | line | The first line within this figure. |
Boolean | fill | A Boolean value determining whether this figure can be filled by a Graphics device. |
BeginFigure(Point, Boolean)
Starts a new figure within this Geometry using a starting point.
Declaration
public void BeginFigure(Point point, bool fill = false)
Parameters
Type | Name | Description |
---|---|---|
Point | point | The start point for this figure. |
Boolean | fill | A Boolean value determining whether this figure can be filled by a Graphics device. |
Close()
Closes this Geometry and prevents further manipulation.
Declaration
public void Close()
Dispose()
Releases all resources used by this Geometry.
Declaration
public void Dispose()
Dispose(Boolean)
Releases all resources used by this Geometry.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposing | A Boolean value indicating whether this is called from the destructor. |
EndFigure(Boolean)
Ends the currently started figure.
Declaration
public void EndFigure(bool closed = true)
Parameters
Type | Name | Description |
---|---|---|
Boolean | closed | A Boolean value indicating whether this figure should automatically be closen by the Graphics device. |
Equals(Geometry)
Returns a value indicating whether two specified instances of Geometry represent the same value.
Declaration
public bool Equals(Geometry value)
Parameters
Type | Name | Description |
---|---|---|
Geometry | value | An object to compare to this instance. |
Returns
Type | Description |
---|---|
Boolean | true if |
Equals(Geometry, Geometry)
Returns a value indicating whether two specified instances of Geometry represent the same value.
Declaration
public static bool Equals(Geometry left, Geometry right)
Parameters
Type | Name | Description |
---|---|---|
Geometry | left | The first object to compare. |
Geometry | right | The second object to compare. |
Returns
Type | Description |
---|---|
Boolean | true if |
Equals(Object)
Returns a value indicating whether this instance and a specified Object represent the same type and value.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The object to compare with this instance. |
Returns
Type | Description |
---|---|
Boolean | true if |
Overrides
| Improve this Doc View SourceFinalize()
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
Declaration
protected void Finalize()
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A 32-bit signed integer hash code. |
Overrides
| Improve this Doc View SourceToString()
Converts this Geometry instance to a human-readable string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A string representation of this Geometry. |
Overrides
Operators
| Improve this Doc View SourceImplicit(Geometry to Geometry)
Returns the Direct2D Geometry used by this object.
Declaration
public static implicit operator Geometry(Geometry geometry)
Parameters
Type | Name | Description |
---|---|---|
Geometry | geometry |
Returns
Type | Description |
---|---|
SharpDX.Direct2D1.Geometry |