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

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

Private Properties

Свойство Type Description
UpdateAutoScrollPosition void
UpdateSize void

Méthodes publiques

Méthode 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

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

Méthodes protégées

Méthode Description
OnMouseWheel ( MouseEventArgs e ) : void

鼠标滚轮滚动的事件。

OnSizeChanged ( EventArgs e ) : void

控件尺寸改变的事件。

Private Methods

Méthode Description
UpdateAutoScrollPosition ( object sender, EventArgs e ) : void

更新自动滚动的位置。

UpdateSize ( ) : void

更新拼图的尺寸。

Method Details

OnMouseWheel() protected méthode

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

OnSizeChanged() protected méthode

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

PointToClient() public méthode

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

PointToJigsaw() public méthode

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

SetJigsawScale() public méthode

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

ShowImage() public méthode

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