C# 클래스 SilverFlow.Controls.Extensions.GeometryExtensions

Geometry extensions
파일 보기 프로젝트 열기: Zoomicon/ZUI

공개 메소드들

메소드 설명
Add ( this point, Distance distance ) : Point

Shifts the point to the specified distance.

Add ( this point, Size size ) : Point

Adds an offset specified by the Size to the specified point.

Add ( this point, double x, double y ) : Point

Adds an offset to the specified point.

Add ( this rect, double width, double height ) : Rect

Increases size if the rectangle to the specified width and height.

Add ( this size, double x, double y ) : Size

Increments size to the specified values.

BottomLeft ( this rect ) : Point

Gets position the lower left corner of the rectangle.

BottomRight ( this rect ) : Point

Gets position the lower right corner of the rectangle.

Center ( this rect ) : Point

Gets center of the specified rectangle.

CenterX ( this rect ) : double

Gets x-coordinate for center of the specified rectangle.

CenterY ( this rect ) : double

Gets y-coordinate for center of the specified rectangle.

EnsureInBounds ( this point, Rect bounds ) : Point

Ensures that coordinates of the point are in the specified bounds.

EnsureInHorizontalBounds ( this point, Rect bounds ) : Point

Ensures that the X-coordinate of the point is in the specified horizontal bounds.

EnsureInVerticalBounds ( this point, Rect bounds ) : Point

Ensures that the Y-coordinate of the point is in the specified vertical bounds.

EnsurePositive ( this point ) : Point

Ensures that coordinates are positive.

IsNotSet ( this point ) : bool

Determines whether coordinates of the point are Not a Number (NaN).

OverlapsHorizontally ( this rect, Rect testRect, double accuracy ) : bool

Tests whether the rectangle overlaps with another one horizontally.

OverlapsVertically ( this rect, Rect testRect, double accuracy ) : bool

Tests whether the rectangle overlaps with another one vertically.

Position ( this rect ) : Point

Gets position of the specified rectangle.

Round ( this point ) : Point

Rounds the specified point to the nearest integer coordinates.

Scaled ( this rect, double factor ) : Rect

Gets scaled rect.

Scaled ( this size, double factor ) : Size

Gets scaled size.

Subtract ( this point, Size size ) : Point

Subtracts an offset specified by the Size from the specified point.

TopLeft ( this rect ) : Point

Gets position the upper left corner of the rectangle.

TopRight ( this rect ) : Point

Gets position the upper right corner of the rectangle.

메소드 상세

Add() 공개 정적인 메소드

Shifts the point to the specified distance.
public static Add ( this point, Distance distance ) : Point
point this The point.
distance Distance The distance.
리턴 Point

Add() 공개 정적인 메소드

Adds an offset specified by the Size to the specified point.
public static Add ( this point, Size size ) : Point
point this The point.
size System.Windows.Size Distance to add.
리턴 Point

Add() 공개 정적인 메소드

Adds an offset to the specified point.
public static Add ( this point, double x, double y ) : Point
point this The point.
x double Distance along X-coordinate.
y double Distance along Y-coordinate.
리턴 Point

Add() 공개 정적인 메소드

Increases size if the rectangle to the specified width and height.
public static Add ( this rect, double width, double height ) : Rect
rect this The rectangle.
width double Value to add to the width of the rectangle.
height double Value to add to the height of the rectangle.
리턴 System.Windows.Rect

Add() 공개 정적인 메소드

Increments size to the specified values.
public static Add ( this size, double x, double y ) : Size
size this The size.
x double Increment by X-coordinate.
y double Increment by Y-coordinate.
리턴 System.Windows.Size

BottomLeft() 공개 정적인 메소드

Gets position the lower left corner of the rectangle.
public static BottomLeft ( this rect ) : Point
rect this Rectangle.
리턴 Point

BottomRight() 공개 정적인 메소드

Gets position the lower right corner of the rectangle.
public static BottomRight ( this rect ) : Point
rect this Rectangle.
리턴 Point

Center() 공개 정적인 메소드

Gets center of the specified rectangle.
public static Center ( this rect ) : Point
rect this Rectangle.
리턴 Point

CenterX() 공개 정적인 메소드

Gets x-coordinate for center of the specified rectangle.
public static CenterX ( this rect ) : double
rect this Rectangle.
리턴 double

CenterY() 공개 정적인 메소드

Gets y-coordinate for center of the specified rectangle.
public static CenterY ( this rect ) : double
rect this Rectangle.
리턴 double

EnsureInBounds() 공개 정적인 메소드

Ensures that coordinates of the point are in the specified bounds.
public static EnsureInBounds ( this point, Rect bounds ) : Point
point this The point.
bounds System.Windows.Rect The bounds.
리턴 Point

EnsureInHorizontalBounds() 공개 정적인 메소드

Ensures that the X-coordinate of the point is in the specified horizontal bounds.
public static EnsureInHorizontalBounds ( this point, Rect bounds ) : Point
point this The point.
bounds System.Windows.Rect The bounds.
리턴 Point

EnsureInVerticalBounds() 공개 정적인 메소드

Ensures that the Y-coordinate of the point is in the specified vertical bounds.
public static EnsureInVerticalBounds ( this point, Rect bounds ) : Point
point this The point.
bounds System.Windows.Rect The bounds.
리턴 Point

EnsurePositive() 공개 정적인 메소드

Ensures that coordinates are positive.
public static EnsurePositive ( this point ) : Point
point this The point.
리턴 Point

IsNotSet() 공개 정적인 메소드

Determines whether coordinates of the point are Not a Number (NaN).
public static IsNotSet ( this point ) : bool
point this The point.
리턴 bool

OverlapsHorizontally() 공개 정적인 메소드

Tests whether the rectangle overlaps with another one horizontally.
public static OverlapsHorizontally ( this rect, Rect testRect, double accuracy ) : bool
rect this The rectangle.
testRect System.Windows.Rect Test rectangle.
accuracy double Accuracy.
리턴 bool

OverlapsVertically() 공개 정적인 메소드

Tests whether the rectangle overlaps with another one vertically.
public static OverlapsVertically ( this rect, Rect testRect, double accuracy ) : bool
rect this The rectangle.
testRect System.Windows.Rect Test rectangle.
accuracy double Accuracy.
리턴 bool

Position() 공개 정적인 메소드

Gets position of the specified rectangle.
public static Position ( this rect ) : Point
rect this Rectangle.
리턴 Point

Round() 공개 정적인 메소드

Rounds the specified point to the nearest integer coordinates.
public static Round ( this point ) : Point
point this The point to round coordinates.
리턴 Point

Scaled() 공개 정적인 메소드

Gets scaled rect.
public static Scaled ( this rect, double factor ) : Rect
rect this
factor double
리턴 System.Windows.Rect

Scaled() 공개 정적인 메소드

Gets scaled size.
public static Scaled ( this size, double factor ) : Size
size this Size.
factor double
리턴 System.Windows.Size

Subtract() 공개 정적인 메소드

Subtracts an offset specified by the Size from the specified point.
public static Subtract ( this point, Size size ) : Point
point this The point.
size System.Windows.Size Distance to subtract.
리턴 Point

TopLeft() 공개 정적인 메소드

Gets position the upper left corner of the rectangle.
public static TopLeft ( this rect ) : Point
rect this Rectangle.
리턴 Point

TopRight() 공개 정적인 메소드

Gets position the upper right corner of the rectangle.
public static TopRight ( this rect ) : Point
rect this Rectangle.
리턴 Point