Class MonoPointExtensions
Extension methods for Microsoft.Xna.Framework.Point that enable operations involving
Point.
Inheritance
MonoPointExtensions
Assembly: SadConsole.Host.MonoGame.dll
Syntax
public static class MonoPointExtensions
Methods
Add(Point, Direction)
Adds a Direction to a Microsoft.Xna.Framework.Point.
Declaration
public static Point Add(this Point self, Direction dir)
Parameters
Type |
Name |
Description |
Point |
self |
|
Direction |
dir |
|
Returns
Add(Point, Point)
Adds a Point to a Microsoft.Xna.Framework.Point.
Declaration
public static Point Add(this Point self, Point other)
Parameters
Type |
Name |
Description |
Point |
self |
|
Point |
other |
|
Returns
Add(Point, int)
Adds an integer to both the X and Y values of a Microsoft.Xna.Framework.Point.
Declaration
public static Point Add(this Point self, int i)
Parameters
Type |
Name |
Description |
Point |
self |
|
int |
i |
|
Returns
Divide(Point, Point)
Divides a Microsoft.Xna.Framework.Point by a Point, and
rounds the resulting X and Y values to the nearest integer.
Declaration
public static Point Divide(this Point self, Point other)
Parameters
Type |
Name |
Description |
Point |
self |
|
Point |
other |
|
Returns
Divide(Point, double)
Divides the X and Y values of a Microsoft.Xna.Framework.Point by a double, then rounds the
values to the nearest integer.
Declaration
public static Point Divide(this Point self, double d)
Parameters
Type |
Name |
Description |
Point |
self |
|
double |
d |
|
Returns
Matches(Point, Point)
Compares a Microsoft.Xna.Framework.Point to a Point.
Declaration
public static bool Matches(this Point self, Point other)
Parameters
Type |
Name |
Description |
Point |
self |
|
Point |
other |
|
Returns
Multiply(Point, Point)
Multiplies a Microsoft.Xna.Framework.Point by a Point.
Declaration
public static Point Multiply(this Point self, Point other)
Parameters
Type |
Name |
Description |
Point |
self |
|
Point |
other |
|
Returns
Multiply(Point, double)
Multiplies the X and Y values of a Microsoft.Xna.Framework.Point by a double, then rounds the
values to the nearest integer.
Declaration
public static Point Multiply(this Point self, double d)
Parameters
Type |
Name |
Description |
Point |
self |
|
double |
d |
|
Returns
Multiply(Point, int)
Multiplies the X and Y values of a Microsoft.Xna.Framework.Point by an integer.
Declaration
public static Point Multiply(this Point self, int i)
Parameters
Type |
Name |
Description |
Point |
self |
|
int |
i |
|
Returns
Subtract(Point, Direction)
Subtracts a Direction from a Microsoft.Xna.Framework.Point.
Declaration
public static Point Subtract(this Point self, Direction dir)
Parameters
Type |
Name |
Description |
Point |
self |
|
Direction |
dir |
|
Returns
Subtract(Point, Point)
Subtracts a Point from a Microsoft.Xna.Framework.Point.
Declaration
public static Point Subtract(this Point self, Point other)
Parameters
Type |
Name |
Description |
Point |
self |
|
Point |
other |
|
Returns
Subtract(Point, int)
Subtracts an integer from both the X and Y values of a Microsoft.Xna.Framework.Point.
Declaration
public static Point Subtract(this Point self, int i)
Parameters
Type |
Name |
Description |
Point |
self |
|
int |
i |
|
Returns
ToPoint(Point)
Converts from Microsoft.Xna.Framework.Point to Point.
Declaration
public static Point ToPoint(this Point self)
Parameters
Type |
Name |
Description |
Point |
self |
|
Returns