Class PointExtensions
Offers some extensions and helper-methods for Point related things.
Inherited Members
Namespace: RGB.NET.Core
Assembly: RGB.NET.Core.dll
Syntax
public static class PointExtensions
Methods
| Edit this page View SourceRotate(in Point, in Rotation, in Point)
Rotates the specified Point by the specified amuont around the specified origin.
Declaration
public static Point Rotate(this in Point point, in Rotation rotation, in Point origin = default)
Parameters
Type | Name | Description |
---|---|---|
Point | point | The Point to rotate. |
Rotation | rotation | The rotation. |
Point | origin | The origin to rotate around. [0,0] if not set. |
Returns
Type | Description |
---|---|
Point | The new location of the point. |
Translate(in Point, float, float)
Moves the specified Point by the specified amount.
Declaration
public static Point Translate(this in Point point, float x = 0, float y = 0)
Parameters
Type | Name | Description |
---|---|---|
Point | point | The Point to move. |
float | x | The x-ammount to move. |
float | y | The y-ammount to move. |
Returns
Type | Description |
---|---|
Point | The new location of the point. |