C# Class Monobjc.Foundation.NSSize

Show file Open project: Monobjc/monobjc Class Usage Examples

Public Properties

Property Type Description
NSZeroSize NSSize

Public Methods

Method Description
Add ( NSSize size1, NSSize size2 ) : NSSize

Returns the sum of the two sizes instances.

CGSizeFromNSSize ( NSSize nssize ) : CGSize

Converts a NSSize instance to a CGSize

Divide ( NSSize size, CGFloat factor ) : NSSize

Returns the result of the division of the size instance by the given factor.

Multiply ( NSSize size, CGFloat factor ) : NSSize

Returns the product of the size instance by the given factor.

NSEqualSizes ( NSSize aSize, NSSize bSize ) : bool

Tests two size values for equality.

Original declaration is : BOOL NSEqualSizes(NSSize aSize, NSSize bSize)

NSMakeSize ( CGFloat width, CGFloat height ) : NSSize

Creates a new NSSize from the specified values.

Original declaration is : NSSize NSMakeSize(float width, float height)

NSSizeFromCGSize ( CGSize cgsize ) : NSSize

Converts a CGSize instance to a NSSize

Substract ( NSSize size1, NSSize size2 ) : NSSize

Returns the difference of the two sizes instances.

operator ( ) : NSSize

Implements the operator +.

Private Methods

Method Description
NSSizeFromString ( [ MarshalTypeRef = typeof(IdMarshaler<NSString>))]NSStringaString ) : NSSize
NSStringFromSize ( NSSize aSize ) : NSString

Method Details

Add() public static method

Returns the sum of the two sizes instances.
public static Add ( NSSize size1, NSSize size2 ) : NSSize
size1 NSSize A size.
size2 NSSize A size.
return NSSize

CGSizeFromNSSize() public static method

Converts a NSSize instance to a CGSize
public static CGSizeFromNSSize ( NSSize nssize ) : CGSize
nssize NSSize The to convert.
return Monobjc.ApplicationServices.CGSize

Divide() public static method

Returns the result of the division of the size instance by the given factor.
public static Divide ( NSSize size, CGFloat factor ) : NSSize
size NSSize The size.
factor Monobjc.ApplicationServices.CGFloat The factor.
return NSSize

Multiply() public static method

Returns the product of the size instance by the given factor.
public static Multiply ( NSSize size, CGFloat factor ) : NSSize
size NSSize The size.
factor Monobjc.ApplicationServices.CGFloat The factor.
return NSSize

NSEqualSizes() public static method

Tests two size values for equality.
Original declaration is : BOOL NSEqualSizes(NSSize aSize, NSSize bSize)
public static NSEqualSizes ( NSSize aSize, NSSize bSize ) : bool
aSize NSSize
bSize NSSize
return bool

NSMakeSize() public static method

Creates a new NSSize from the specified values.
Original declaration is : NSSize NSMakeSize(float width, float height)
public static NSMakeSize ( CGFloat width, CGFloat height ) : NSSize
width Monobjc.ApplicationServices.CGFloat
height Monobjc.ApplicationServices.CGFloat
return NSSize

NSSizeFromCGSize() public static method

Converts a CGSize instance to a NSSize
public static NSSizeFromCGSize ( CGSize cgsize ) : NSSize
cgsize Monobjc.ApplicationServices.CGSize The to convert.
return NSSize

Substract() public static method

Returns the difference of the two sizes instances.
public static Substract ( NSSize size1, NSSize size2 ) : NSSize
size1 NSSize A size.
size2 NSSize A size.
return NSSize

operator() public static method

Implements the operator +.
public static operator ( ) : NSSize
return NSSize

Property Details

NSZeroSize public static property

An NSSize with its width and height set to 0.
public static NSSize,Monobjc.Foundation NSZeroSize
return NSSize