C# Class StandardizedDiffuseAlbedoMaps.OutputPanel

Inheritance: System.Windows.Forms.Panel
ファイルを表示 Open project: Patapom/GodComplex

Private Properties

Property Type Description
Client2ImageUV ImageUtility.float2
Client2ImageUV_NoSquareAspectRatio ImageUtility.float2
ImageClientRect System.Drawing.RectangleF
ImageUV2Client System.Drawing.PointF
ImageUV2Client_NoSquareAspectRatio System.Drawing.PointF
InitializeComponent void
UpdateCropRectangleVertices void

Public Methods

Method Description
OutputPanel ( IContainer container ) : System
ResetCropRectangle ( ) : void

Resets the crop rectangle to the entire image

SetCropRectangle ( ImageUtility _Center, ImageUtility _HalfSize, float _Rotation ) : void

Sets the crop rectangle to a specific value

StartCalibrationTargetPicking ( CalibrationDone _Notify ) : void

Starts calibration target picking mode (user is expected to place the target with the mouse, then change the radius so the calibration can take place)

UpdateBitmap ( ) : void

Protected Methods

Method Description
BuildClipVertices ( ImageUtility _Center, ImageUtility _HalfSize, ImageUtility _AxisX, ImageUtility _AxisY ) : ImageUtility.float2[]
Dispose ( bool disposing ) : void

Clean up any resources being used.

OnMouseDown ( MouseEventArgs e ) : void
OnMouseMove ( MouseEventArgs e ) : void
OnMouseUp ( MouseEventArgs e ) : void
OnPaint ( PaintEventArgs e ) : void
OnPaintBackground ( PaintEventArgs e ) : void
OnSizeChanged ( EventArgs e ) : void

Private Methods

Method Description
Client2ImageUV ( PointF _Position ) : ImageUtility.float2

This is the UVs used for crop rectangle computation The V is in [0,1] mapping from [0,ImageHeight] as usual but U takes into account aspect ratio to ensure pixels are always squares so for example if you image has an aspect ratio of 2 (Width = 2 * Height) then U will go from [-0.5,1.5] assuming 0.5 is always the center of the image. U span is then 1.5+0.5 = 2, which is twice the span of V [0,1] and we keep the correct aspect ratio

Client2ImageUV_NoSquareAspectRatio ( PointF _Position ) : ImageUtility.float2

This is a simple UV as used in 3D engines: (0,0) is top left corner of the image, (1,1) is bottom right corner

ImageClientRect ( ) : RectangleF
ImageUV2Client ( ImageUtility _Position ) : PointF
ImageUV2Client_NoSquareAspectRatio ( ImageUtility _Position ) : PointF
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

UpdateCropRectangleVertices ( ) : void

Method Details

BuildClipVertices() protected method

protected BuildClipVertices ( ImageUtility _Center, ImageUtility _HalfSize, ImageUtility _AxisX, ImageUtility _AxisY ) : ImageUtility.float2[]
_Center ImageUtility
_HalfSize ImageUtility
_AxisX ImageUtility
_AxisY ImageUtility
return ImageUtility.float2[]

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

OnMouseDown() protected method

protected OnMouseDown ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnMouseMove() protected method

protected OnMouseMove ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnMouseUp() protected method

protected OnMouseUp ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnPaint() protected method

protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
return void

OnPaintBackground() protected method

protected OnPaintBackground ( PaintEventArgs e ) : void
e PaintEventArgs
return void

OnSizeChanged() protected method

protected OnSizeChanged ( EventArgs e ) : void
e System.EventArgs
return void

OutputPanel() public method

public OutputPanel ( IContainer container ) : System
container IContainer
return System

ResetCropRectangle() public method

Resets the crop rectangle to the entire image
public ResetCropRectangle ( ) : void
return void

SetCropRectangle() public method

Sets the crop rectangle to a specific value
public SetCropRectangle ( ImageUtility _Center, ImageUtility _HalfSize, float _Rotation ) : void
_Center ImageUtility
_HalfSize ImageUtility
_Rotation float
return void

StartCalibrationTargetPicking() public method

Starts calibration target picking mode (user is expected to place the target with the mouse, then change the radius so the calibration can take place)
public StartCalibrationTargetPicking ( CalibrationDone _Notify ) : void
_Notify CalibrationDone
return void

UpdateBitmap() public method

public UpdateBitmap ( ) : void
return void