Show / Hide Table of Contents

Class PointExtensions

Offers some extensions and helper-methods for Point related things.

Inheritance
object
PointExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: RGB.NET.Core
Assembly: RGB.NET.Core.dll
Syntax
public static class PointExtensions

Methods

| Edit this page View Source

Rotate(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.

| Edit this page View Source

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.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX