C# Class Cyjb.Projects.JigsawGame.Renderer.JigsawRenderPanel

用于渲染拼图游戏的控件。
Inheritance: SharpDX.Windows.RenderControl
Mostrar archivo Open project: CYJB/Cyjb.Projects.JigsawGame Class Usage Examples

Private Properties

Property Type Description
UpdateAutoScrollPosition void
UpdateSize void

Public Methods

Method Description
PointToClient ( System.Vector2 location ) : System.Drawing.Point

将指定的拼图坐标转换为渲染区域的坐标。

PointToJigsaw ( System.Drawing.Point location ) : System.Vector2

将指定渲染区域的坐标转换为拼图的坐标。

SetJigsawScale ( float scale, System.Drawing.Point center ) : void

设置拼图的缩放比例。

ShowImage ( ) : void

缩放和滚动拼图,使得图片恰好居中显示在界面中。

Protected Methods

Method Description
OnMouseWheel ( MouseEventArgs e ) : void

鼠标滚轮滚动的事件。

OnSizeChanged ( EventArgs e ) : void

控件尺寸改变的事件。

Private Methods

Method Description
UpdateAutoScrollPosition ( object sender, EventArgs e ) : void

更新自动滚动的位置。

UpdateSize ( ) : void

更新拼图的尺寸。

Method Details

OnMouseWheel() protected method

鼠标滚轮滚动的事件。
protected OnMouseWheel ( MouseEventArgs e ) : void
e System.Windows.Forms.MouseEventArgs
return void

OnSizeChanged() protected method

控件尺寸改变的事件。
protected OnSizeChanged ( EventArgs e ) : void
e System.EventArgs
return void

PointToClient() public method

将指定的拼图坐标转换为渲染区域的坐标。
public PointToClient ( System.Vector2 location ) : System.Drawing.Point
location System.Vector2 拼图坐标。
return System.Drawing.Point

PointToJigsaw() public method

将指定渲染区域的坐标转换为拼图的坐标。
public PointToJigsaw ( System.Drawing.Point location ) : System.Vector2
location System.Drawing.Point 渲染区域的坐标。
return System.Vector2

SetJigsawScale() public method

设置拼图的缩放比例。
public SetJigsawScale ( float scale, System.Drawing.Point center ) : void
scale float 缩放比例。
center System.Drawing.Point
return void

ShowImage() public method

缩放和滚动拼图,使得图片恰好居中显示在界面中。
public ShowImage ( ) : void
return void