nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.Drawing.Windows / GDICanvas

GDICanvas

Full name Microsoft.VisualBasic.Drawing.GDICanvas Assembly Microsoft.VisualBasic.Drawing.Windows Members 30

这个对象是Graphics2D以及Wmf公用的基础类型

00 Remarks

the gdi+ graphics canvas base model

01 Syntax

Microsoft.VisualBasic.Drawing.GDICanvas

02 Methods

NameOverloadsSummary
DrawBézier 1 Draws a Bézier spline defined by four System.Drawing.Point structures.
DrawEllipse 1 Draws an ellipse defined by a bounding rectangle specified by a pair of coordinates, a height, and a width.
DrawImage 3 Draws the specified System.Drawing.Image, using its original physical size, at the specified location.
DrawImageUnscaled 3 Draws a specified image using its original physical size at a specified location.
DrawImageUnscaledAndClipped 1 Draws the specified image without scaling and clips it, if necessary, to fit in the specified rectangle.
DrawLine 2 Draws a line connecting two Point structures.
DrawPolygon 1 Draws a polygon defined by an array of System.Drawing.PointF structures.
DrawRectangle 1 Draws a rectangle specified by a System.Drawing.Rectangle structure.
DrawString 2 Draws the specified text string at the specified location with the specified Brush and Font objects.
FillEllipse 2 Fills the interior of an ellipse defined by a bounding rectangle specified by a System.Drawing.RectangleF structure.
FillPath 1 Fills the interior of a System.Drawing.Drawing2D.GraphicsPath.
FillPie 1 Fills the interior of a pie section defined by an ellipse specified by a pair of coordinates, a width, a height, and two radial lines.
FillRectangle 1 Fills the interior of a rectangle specified by a System.Drawing.Rectangle structure.
Flush 1 Forces execution of all pending graphics operations and returns immediately without waiting for the operations to finish.
ResetClip 1 Resets the clip region of this System.Drawing.Graphics to an infinite region.
ResetTransform 1 Resets the world transformation matrix of this System.Drawing.Graphics to the identity matrix.
RotateTransform 1 Applies the specified rotation to the transformation matrix of this System.Drawing.Graphics.
ScaleTransform 1 Applies the specified scaling operation to the transformation matrix of this System.Drawing.Graphics by prepending it to the object's transformation matrix.
TranslateTransform 1 Changes the origin of the coordinate system by prepending the specified translation to the transformation matrix of this System.Drawing.Graphics.
MeasureString 2 Measures the specified string when drawn with the specified IGraphics.Font.
ReleaseHandle 1 Releases all resources used by this GDICanvas.Graphics.

03 Properties

NameOverloadsSummary
Graphics 1 GDI+ device handle.(GDI+绘图设备句柄)

04 Members

method DrawBézier #
DrawBézier(Pen, Point, Point, Point, Point)

Draws a Bézier spline defined by four System.Drawing.Point structures.

Parameters
NameTypeDescription
penPen

System.Drawing.Pen structure that determines the color, width, and style of the curve.

pt1Point

System.Drawing.Point structure that represents the starting point of the curve.

pt2Point

System.Drawing.Point structure that represents the first control point for the curve.

pt3Point

System.Drawing.Point structure that represents the second control point for the curve.

pt4Point

System.Drawing.Point structure that represents the ending point of the curve.

method DrawEllipse #
DrawEllipse(Pen, Single, Single, Single, Single)

Draws an ellipse defined by a bounding rectangle specified by a pair of coordinates, a height, and a width.

Parameters
NameTypeDescription
penPen

System.Drawing.Pen that determines the color, width, and style of the ellipse.

xSingle

The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.

ySingle

The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.

widthSingle

Width of the bounding rectangle that defines the ellipse.

heightSingle

Height of the bounding rectangle that defines the ellipse.

method DrawImage #
DrawImage(Image, Point)

Draws the specified System.Drawing.Image, using its original physical size, at the specified location.

Parameters
NameTypeDescription
imageImage

System.Drawing.Image to draw.

pointPoint

System.Drawing.Point structure that represents the location of the upper-left corner of the drawn image.

method DrawImage overload 2 #
DrawImage(Image, Int32, Int32, Int32, Int32)

Draws the specified Image at the specified location and with the specified size.

Parameters
NameTypeDescription
imageImage

System.Drawing.Image to draw.

xInt32

The x-coordinate of the upper-left corner of the drawn image.

yInt32

The y-coordinate of the upper-left corner of the drawn image.

widthInt32

Width of the drawn image.

heightInt32

Height of the drawn image.

method DrawImage overload 3 #
DrawImage(Image, Int32, Int32, Int32, Int32)

Draws the specified Image at the specified location and with the specified size.

Parameters
NameTypeDescription
imageImage

System.Drawing.Image to draw.

xInt32

The x-coordinate of the upper-left corner of the drawn image.

yInt32

The y-coordinate of the upper-left corner of the drawn image.

widthInt32

Width of the drawn image.

heightInt32

Height of the drawn image.

method DrawImageUnscaled #
DrawImageUnscaled(Image, Point)

Draws a specified image using its original physical size at a specified location.

Parameters
NameTypeDescription
imageImage

Image to draw.

pointPoint

Point structure that specifies the upper-left corner of the drawn image.

method DrawImageUnscaled overload 3 #
DrawImageUnscaled(Image, Int32, Int32)

Draws the specified image using its original physical size at the location specified by a coordinate pair.

Parameters
NameTypeDescription
imageImage

System.Drawing.Image to draw.

xInt32

The x-coordinate of the upper-left corner of the drawn image.

yInt32

The y-coordinate of the upper-left corner of the drawn image.

method DrawImageUnscaled overload 2 #
DrawImageUnscaled(Image, Int32, Int32, Int32, Int32)

Draws a specified image using its original physical size at a specified location.

Parameters
NameTypeDescription
imageImage

Image to draw.

xInt32

The x-coordinate of the upper-left corner of the drawn image.

yInt32

The y-coordinate of the upper-left corner of the drawn image.

widthInt32

-

heightInt32

-

method DrawImageUnscaledAndClipped #
DrawImageUnscaledAndClipped(Image, Rectangle)

Draws the specified image without scaling and clips it, if necessary, to fit in the specified rectangle.

Parameters
NameTypeDescription
imageImage

The Image to draw.

rectRectangle

The Rectangle in which to draw the image.

method DrawLine #
DrawLine(Pen, Point, Point)

Draws a line connecting two Point structures.

Parameters
NameTypeDescription
penPen

Pen that determines the color, width, and style of the line.

pt1Point

Point structure that represents the first point to connect.

pt2Point

Point structure that represents the second point to connect.

method DrawLine overload 2 #
DrawLine(Pen, PointF, PointF)

Draws a line connecting two System.Drawing.PointF structures.

Parameters
NameTypeDescription
penPen

System.Drawing.Pen that determines the color, width, and style of the line.

pt1PointF

System.Drawing.PointF structure that represents the first point to connect.

pt2PointF

System.Drawing.PointF structure that represents the second point to connect.

method DrawPolygon #
DrawPolygon(Pen, PointF())

Draws a polygon defined by an array of System.Drawing.PointF structures.

Parameters
NameTypeDescription
penPen

System.Drawing.Pen that determines the color, width, and style of the polygon.

pointsPointF()

Array of System.Drawing.PointF structures that represent the vertices of the polygon.

method DrawRectangle #
DrawRectangle(Pen, Rectangle)

Draws a rectangle specified by a System.Drawing.Rectangle structure.

Parameters
NameTypeDescription
penPen

A System.Drawing.Pen that determines the color, width, and style of the rectangle.

rectRectangle

A System.Drawing.Rectangle structure that represents the rectangle to draw.

method DrawString overload 2 #
DrawString(String, Font, Brush, RectangleF)

Draws the specified text string in the specified rectangle with the specified System.Drawing.Brush and System.Drawing.Font objects.

Parameters
NameTypeDescription
sString

String to draw.

fontFont

System.Drawing.Font that defines the text format of the string.

brushBrush

System.Drawing.Brush that determines the color and texture of the drawn text.

layoutRectangleRectangleF

System.Drawing.RectangleF structure that specifies the location of the drawn text.

method DrawString #
DrawString(String, Font, Brush, PointF)

Draws the specified text string at the specified location with the specified Brush and Font objects.

Parameters
NameTypeDescription
sString

String to draw.

fontFont

System.Drawing.Font that defines the text format of the string.

brushBrush

System.Drawing.Brush that determines the color and texture of the drawn text.

pointPointF

System.Drawing.PointF structure that specifies the upper-left corner of the drawn text.

method FillEllipse #
FillEllipse(Brush, RectangleF)

Fills the interior of an ellipse defined by a bounding rectangle specified by a System.Drawing.RectangleF structure.

Parameters
NameTypeDescription
brushBrush

System.Drawing.Brush that determines the characteristics of the fill.

rectRectangleF

System.Drawing.RectangleF structure that represents the bounding rectangle that defines the ellipse.

method FillEllipse overload 2 #
FillEllipse(Brush, Single, Single, Single, Single)

Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.

Parameters
NameTypeDescription
brushBrush

System.Drawing.Brush that determines the characteristics of the fill.

xSingle

The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.

ySingle

The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.

widthSingle

Width of the bounding rectangle that defines the ellipse.

heightSingle

Height of the bounding rectangle that defines the ellipse.

method FillPath #
FillPath(Brush, GraphicsPath)

Fills the interior of a System.Drawing.Drawing2D.GraphicsPath.

Parameters
NameTypeDescription
brushBrush

System.Drawing.Brush that determines the characteristics of the fill.

pathGraphicsPath

System.Drawing.Drawing2D.GraphicsPath that represents the path to fill.

method FillPie #
FillPie(Brush, Single, Single, Single, Single, Single, Single)

Fills the interior of a pie section defined by an ellipse specified by a pair of coordinates, a width, a height, and two radial lines.

Parameters
NameTypeDescription
brushBrush

System.Drawing.Brush that determines the characteristics of the fill.

xSingle

The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.

ySingle

The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse from which the pie section comes.

widthSingle

Width of the bounding rectangle that defines the ellipse from which the pie section comes.

heightSingle

Height of the bounding rectangle that defines the ellipse from which the pie section comes.

startAngleSingle

Angle in degrees measured clockwise from the x-axis to the first side of the pie section.

sweepAngleSingle

Angle in degrees measured clockwise from the startAngle parameter to the second side of the pie section.

method FillRectangle #
FillRectangle(Brush, Rectangle)

Fills the interior of a rectangle specified by a System.Drawing.Rectangle structure.

Parameters
NameTypeDescription
brushBrush

System.Drawing.Brush that determines the characteristics of the fill.

rectRectangle

System.Drawing.Rectangle structure that represents the rectangle to fill.

method Flush #
Flush

Forces execution of all pending graphics operations and returns immediately without waiting for the operations to finish.

method ResetClip #
ResetClip

Resets the clip region of this System.Drawing.Graphics to an infinite region.

method ResetTransform #
ResetTransform

Resets the world transformation matrix of this System.Drawing.Graphics to the identity matrix.

method RotateTransform #
RotateTransform(Single)

Applies the specified rotation to the transformation matrix of this System.Drawing.Graphics.

Parameters
NameTypeDescription
angleSingle

Angle of rotation in degrees.

method ScaleTransform #
ScaleTransform(Single, Single)

Applies the specified scaling operation to the transformation matrix of this System.Drawing.Graphics by prepending it to the object's transformation matrix.

Parameters
NameTypeDescription
sxSingle

Scale factor in the x direction.

sySingle

Scale factor in the y direction.

method TranslateTransform #
TranslateTransform(Single, Single)

Changes the origin of the coordinate system by prepending the specified translation to the transformation matrix of this System.Drawing.Graphics.

Parameters
NameTypeDescription
dxSingle

The x-coordinate of the translation.

dySingle

The y-coordinate of the translation.

method MeasureString #
MeasureString(String, Font)

Measures the specified string when drawn with the specified IGraphics.Font.

Parameters
NameTypeDescription
textString

String to measure.

fontFont

IGraphics.Font that defines the text format of the string.

Returns

This method returns a System.Drawing.SizeF structure that represents the size, in the units specified by the Graphics.PageUnit property, of the string specified by the text parameter as drawn with the font parameter.

method MeasureString overload 2 #
MeasureString(String)

Using IGraphics.Font

Parameters
NameTypeDescription
textString

-

method ReleaseHandle #
ReleaseHandle

Releases all resources used by this GDICanvas.Graphics.

property Graphics #
Graphics

GDI+ device handle.(GDI+绘图设备句柄)