C# Class Andwho.Windows.Helper.DrawHelper

关于 GDI+ 绘图的辅助类
Show file Open project: JimmyFung/DesktopHelper

Public Methods

Method Description
CreateRoundPath ( Rectangle rect, int cornerRadius ) : GraphicsPath

构建圆角路径

CreateRoundRect ( RectangleF r, float r1, float r2, float r3, float r4 ) : GraphicsPath

构建圆角路径

DrawImage ( Graphics g, Image image, int x1, int y1, int width1, int height1, int x2, int y2, int width2, int height2 ) : void

RendererBackground ( Graphics g, Rectangle rect, Image backgroundImage, bool method ) : void

渲染背景图片,使背景图片不失真

RendererBackground ( Graphics g, Rectangle rect, int cut, Image backgroundImage ) : void

渲染背景图片,使背景图片不失真

Method Details

CreateRoundPath() public static method

构建圆角路径
public static CreateRoundPath ( Rectangle rect, int cornerRadius ) : GraphicsPath
rect System.Drawing.Rectangle
cornerRadius int
return System.Drawing.Drawing2D.GraphicsPath

CreateRoundRect() public static method

构建圆角路径
public static CreateRoundRect ( RectangleF r, float r1, float r2, float r3, float r4 ) : GraphicsPath
r System.Drawing.RectangleF
r1 float
r2 float
r3 float
r4 float
return System.Drawing.Drawing2D.GraphicsPath

DrawImage() public static method

public static DrawImage ( Graphics g, Image image, int x1, int y1, int width1, int height1, int x2, int y2, int width2, int height2 ) : void
g System.Drawing.Graphics
image Image
x1 int
y1 int
width1 int
height1 int
x2 int
y2 int
width2 int
height2 int
return void

RendererBackground() public static method

渲染背景图片,使背景图片不失真
public static RendererBackground ( Graphics g, Rectangle rect, Image backgroundImage, bool method ) : void
g System.Drawing.Graphics
rect System.Drawing.Rectangle
backgroundImage Image
method bool
return void

RendererBackground() public static method

渲染背景图片,使背景图片不失真
public static RendererBackground ( Graphics g, Rectangle rect, int cut, Image backgroundImage ) : void
g System.Drawing.Graphics
rect System.Drawing.Rectangle
cut int
backgroundImage Image
return void