C# Class Pinta.ImageManipulation.ScaleFactor

Encapsulates functionality for zooming/scaling coordinates. Includes methods for Size[F]'s, Point[F]'s, Rectangle[F]'s, and various scalars
Exibir arquivo Open project: PintaProject/Pinta.ImageManipulation Class Usage Examples

Public Properties

Property Type Description
MaxValue ScaleFactor
MinValue ScaleFactor
OneToOne ScaleFactor

Public Methods

Method Description
Equals ( object obj ) : bool
FromDouble ( double scalar ) : ScaleFactor
GetHashCode ( ) : int
GetNextLarger ( ) : ScaleFactor

Rounds the current scaling factor up to the next power of two.

GetNextSmaller ( ) : ScaleFactor
Max ( ScaleFactor lhs, ScaleFactor rhs ) : ScaleFactor
Max ( int n1, int d1, int n2, int d2, ScaleFactor lastResort ) : ScaleFactor
Min ( ScaleFactor lhs, ScaleFactor rhs ) : ScaleFactor
Min ( int n1, int d1, int n2, int d2, ScaleFactor lastResort ) : ScaleFactor
ScaleFactor ( int numerator, int denominator ) : System
ScalePoint ( Point p ) : Point
ScalePoint ( PointD p ) : PointD
ScalePointJustX ( Point p ) : Point
ScalePointJustX ( PointD p ) : PointD
ScalePointJustY ( Point p ) : Point
ScalePointJustY ( PointD p ) : PointD
ScaleRectangle ( Rectangle rect ) : Rectangle
ScaleScalar ( double x ) : double
ScaleScalar ( float x ) : float
ScaleScalar ( int x ) : int
ScaleSize ( Size s ) : Size
UnscalePoint ( Point p ) : Point
UnscalePoint ( PointD p ) : PointD
UnscalePointJustX ( Point p ) : Point
UnscalePointJustX ( PointD p ) : PointD
UnscalePointJustY ( Point p ) : Point
UnscalePointJustY ( PointD p ) : PointD
UnscaleRectangle ( Rectangle rect ) : Rectangle
UnscaleScalar ( double x ) : double
UnscaleScalar ( float x ) : float
UnscaleScalar ( int x ) : int
UnscaleSize ( Size s ) : Size
UseIfValid ( int numerator, int denominator, ScaleFactor lastResort ) : ScaleFactor
operator ( ) : bool

Private Methods

Method Description
Clamp ( ) : void
Reduce ( int numerator, int denominator ) : ScaleFactor

Method Details

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

FromDouble() public static method

public static FromDouble ( double scalar ) : ScaleFactor
scalar double
return ScaleFactor

GetHashCode() public method

public GetHashCode ( ) : int
return int

GetNextLarger() public method

Rounds the current scaling factor up to the next power of two.
public GetNextLarger ( ) : ScaleFactor
return ScaleFactor

GetNextSmaller() public method

public GetNextSmaller ( ) : ScaleFactor
return ScaleFactor

Max() public static method

public static Max ( ScaleFactor lhs, ScaleFactor rhs ) : ScaleFactor
lhs ScaleFactor
rhs ScaleFactor
return ScaleFactor

Max() public static method

public static Max ( int n1, int d1, int n2, int d2, ScaleFactor lastResort ) : ScaleFactor
n1 int
d1 int
n2 int
d2 int
lastResort ScaleFactor
return ScaleFactor

Min() public static method

public static Min ( ScaleFactor lhs, ScaleFactor rhs ) : ScaleFactor
lhs ScaleFactor
rhs ScaleFactor
return ScaleFactor

Min() public static method

public static Min ( int n1, int d1, int n2, int d2, ScaleFactor lastResort ) : ScaleFactor
n1 int
d1 int
n2 int
d2 int
lastResort ScaleFactor
return ScaleFactor

ScaleFactor() public method

public ScaleFactor ( int numerator, int denominator ) : System
numerator int
denominator int
return System

ScalePoint() public method

public ScalePoint ( Point p ) : Point
p Point
return Point

ScalePoint() public method

public ScalePoint ( PointD p ) : PointD
p PointD
return PointD

ScalePointJustX() public method

public ScalePointJustX ( Point p ) : Point
p Point
return Point

ScalePointJustX() public method

public ScalePointJustX ( PointD p ) : PointD
p PointD
return PointD

ScalePointJustY() public method

public ScalePointJustY ( Point p ) : Point
p Point
return Point

ScalePointJustY() public method

public ScalePointJustY ( PointD p ) : PointD
p PointD
return PointD

ScaleRectangle() public method

public ScaleRectangle ( Rectangle rect ) : Rectangle
rect Rectangle
return Rectangle

ScaleScalar() public method

public ScaleScalar ( double x ) : double
x double
return double

ScaleScalar() public method

public ScaleScalar ( float x ) : float
x float
return float

ScaleScalar() public method

public ScaleScalar ( int x ) : int
x int
return int

ScaleSize() public method

public ScaleSize ( Size s ) : Size
s Size
return Size

UnscalePoint() public method

public UnscalePoint ( Point p ) : Point
p Point
return Point

UnscalePoint() public method

public UnscalePoint ( PointD p ) : PointD
p PointD
return PointD

UnscalePointJustX() public method

public UnscalePointJustX ( Point p ) : Point
p Point
return Point

UnscalePointJustX() public method

public UnscalePointJustX ( PointD p ) : PointD
p PointD
return PointD

UnscalePointJustY() public method

public UnscalePointJustY ( Point p ) : Point
p Point
return Point

UnscalePointJustY() public method

public UnscalePointJustY ( PointD p ) : PointD
p PointD
return PointD

UnscaleRectangle() public method

public UnscaleRectangle ( Rectangle rect ) : Rectangle
rect Rectangle
return Rectangle

UnscaleScalar() public method

public UnscaleScalar ( double x ) : double
x double
return double

UnscaleScalar() public method

public UnscaleScalar ( float x ) : float
x float
return float

UnscaleScalar() public method

public UnscaleScalar ( int x ) : int
x int
return int

UnscaleSize() public method

public UnscaleSize ( Size s ) : Size
s Size
return Size

UseIfValid() public static method

public static UseIfValid ( int numerator, int denominator, ScaleFactor lastResort ) : ScaleFactor
numerator int
denominator int
lastResort ScaleFactor
return ScaleFactor

operator() public static method

public static operator ( ) : bool
return bool

Property Details

MaxValue public_oe static_oe property

public static ScaleFactor,Pinta.ImageManipulation MaxValue
return ScaleFactor

MinValue public_oe static_oe property

public static ScaleFactor,Pinta.ImageManipulation MinValue
return ScaleFactor

OneToOne public_oe static_oe property

public static ScaleFactor,Pinta.ImageManipulation OneToOne
return ScaleFactor