C# Class R3.Drawing.ImageSpace

Class to help converting from Image/Canvas coords <-> absolute coords.
Exibir arquivo Open project: roice3/Honeycombs Class Usage Examples

Public Methods

Method Description
Height ( double height ) : double

Returns a screen height from an absolute height.

ImageSpace ( double width, double height ) : R3.Geometry

Takes in width/height of an Image/Canvas. For a bitmap, this is number of pixels.

Pixel ( Vector3D point ) : Vector3D

Returns a screen pixel from an absolute location. NOTE: We don't return a 'Point' because it is different in Forms/Silverlight.

Pixel ( VectorND point ) : VectorND

VectorNDs are assumed to be 4D.

Point ( Vector3D Pixel ) : Vector3D

Returns an absolute location from a screen pixel. NOTE: We don't take in a 'Point' because it is different in Forms/Silverlight.

Width ( double width ) : double

Returns a screen width from an absolute width.

Method Details

Height() public method

Returns a screen height from an absolute height.
public Height ( double height ) : double
height double
return double

ImageSpace() public method

Takes in width/height of an Image/Canvas. For a bitmap, this is number of pixels.
public ImageSpace ( double width, double height ) : R3.Geometry
width double
height double
return R3.Geometry

Pixel() public method

Returns a screen pixel from an absolute location. NOTE: We don't return a 'Point' because it is different in Forms/Silverlight.
public Pixel ( Vector3D point ) : Vector3D
point Vector3D
return Vector3D

Pixel() public method

VectorNDs are assumed to be 4D.
public Pixel ( VectorND point ) : VectorND
point R3.Geometry.VectorND
return R3.Geometry.VectorND

Point() public method

Returns an absolute location from a screen pixel. NOTE: We don't take in a 'Point' because it is different in Forms/Silverlight.
public Point ( Vector3D Pixel ) : Vector3D
Pixel Vector3D
return Vector3D

Width() public method

Returns a screen width from an absolute width.
public Width ( double width ) : double
width double
return double