「Graphicsクラス」の版間の差分
細 (→その他のGraphicsとの相違: cat) |
細 (差し戻し) |
||
(6人の利用者による、間の9版が非表示) | |||
1行目: | 1行目: | ||
'''Graphics'''は、各種の描画を行うクラスです。 | '''Graphics'''は、各種の描画を行うクラスです。 | ||
== クラスの機能 == | ==クラスの機能== | ||
===プロパティ=== | |||
=== プロパティ === | |||
==== Clip ==== | ==== Clip ==== | ||
描画領域を限定する領域を取得・設定します。 | 描画領域を限定する領域を取得・設定します。 | ||
Const Function Clip() As Region | Const Function Clip() As Region | ||
Sub Clip( | Sub Clip(region As /*Const*/ Region) | ||
[[#GetClip|GetClip]]/[[#SetClip|SetClip]]を呼びます。 | [[#GetClip|GetClip]]/[[#SetClip|SetClip]]を呼びます。 | ||
参考:[[ | 参考:[[Regionクラス]] | ||
==== ClipBounds ==== | ==== ClipBounds ==== | ||
19行目: | 17行目: | ||
[[#GetClipBounds|GetClipBounds]]/[[#SetClipBounds|SetClipBounds]]を呼びます。 | [[#GetClipBounds|GetClipBounds]]/[[#SetClipBounds|SetClipBounds]]を呼びます。 | ||
参考:[[ | 参考:[[RectangleFクラス]] | ||
==== CompositingMode ==== | ==== CompositingMode ==== | ||
27行目: | 25行目: | ||
[[#GetCompositingMode|GetCompositingMode]]/[[#SetCompositingMode|SetCompositingMode]]を呼びます。 | [[#GetCompositingMode|GetCompositingMode]]/[[#SetCompositingMode|SetCompositingMode]]を呼びます。 | ||
参考:[[ | 参考:[[CompositingMode列挙体]] | ||
==== CompositingQuality ==== | ==== CompositingQuality ==== | ||
35行目: | 33行目: | ||
[[#GetCompositingQuality|GetCompositingQuality]]/[[#SetCompositingQuality|SetCompositingQuality]]を呼びます。 | [[#GetCompositingQuality|GetCompositingQuality]]/[[#SetCompositingQuality|SetCompositingQuality]]を呼びます。 | ||
参考:[[ | 参考:[[CompositingQuality列挙体]] | ||
==== DpiX ==== | ==== DpiX ==== | ||
55行目: | 53行目: | ||
[[#GetInterpolationMode|GetInterpolationMode]]/[[#SetInterpolationMode|SetInterpolationMode]]を呼びます。 | [[#GetInterpolationMode|GetInterpolationMode]]/[[#SetInterpolationMode|SetInterpolationMode]]を呼びます。 | ||
参考:[[ | 参考:[[InterpolationMode列挙体]] | ||
==== IsClipEmpty ==== | ==== IsClipEmpty ==== | ||
106行目: | 104行目: | ||
Sub Graphics(hwnd As HWND) | Sub Graphics(hwnd As HWND) | ||
Sub Graphics(hwnd As HWND, icm As BOOL) | Sub Graphics(hwnd As HWND, icm As BOOL) | ||
Sub Graphics(image As | Sub Graphics(image As Image) | ||
==== デストラクタ ==== | ==== デストラクタ ==== | ||
112行目: | 110行目: | ||
==== FromHDC ==== | ==== FromHDC ==== | ||
Static Function FromHDC(hdc As HDC) As | Static Function FromHDC(hdc As HDC) As Graphics | ||
Static Function FromHDC(hdc As HDC, hdevice As HANDLE) As | Static Function FromHDC(hdc As HDC, hdevice As HANDLE) As Graphics | ||
引数が対応する[[#コンストラクタ|コンストラクタ]]を使用し、Newで新しいGraphicsインスタンスを作成します。 | 引数が対応する[[#コンストラクタ|コンストラクタ]]を使用し、Newで新しいGraphicsインスタンスを作成します。 | ||
; 戻り値 | ;戻り値 | ||
: | :作成されたインスタンス。 | ||
==== FromHWND ==== | ==== FromHWND ==== | ||
Static Function FromHWND(hwnd As HWND) As | Static Function FromHWND(hwnd As HWND) As Graphics | ||
Static Function FromHWND(hwnd As DWord, icm As BOOL) As | Static Function FromHWND(hwnd As DWord, icm As BOOL) As Graphics | ||
引数が対応する[[#コンストラクタ|コンストラクタ]]を使用し、Newで新しいGraphicsインスタンスを作成します。 | 引数が対応する[[#コンストラクタ|コンストラクタ]]を使用し、Newで新しいGraphicsインスタンスを作成します。 | ||
; 戻り値 | ;戻り値 | ||
: | : 作成されたインスタンス。 | ||
==== FromImage ==== | ==== FromImage ==== | ||
Static Function FromImage(image As | Static Function FromImage(image As Image) As Graphics | ||
引数が対応する[[#コンストラクタ|コンストラクタ]]を使用し、Newで新しいGraphicsインスタンスを作成します。 | 引数が対応する[[#コンストラクタ|コンストラクタ]]を使用し、Newで新しいGraphicsインスタンスを作成します。 | ||
; 戻り値 | ;戻り値 | ||
: | :作成されたインスタンスへのポインタ。 | ||
==== Flush ==== | ==== Flush ==== | ||
190行目: | 188行目: | ||
==== SetTransform ==== | ==== SetTransform ==== | ||
Function SetTransform( | Function SetTransform(matrix As /*Const*/ *Matrix) As Status | ||
==== ResetTransform ==== | ==== ResetTransform ==== | ||
196行目: | 194行目: | ||
==== MultiplyTransform ==== | ==== MultiplyTransform ==== | ||
Function MultiplyTransform( | Function MultiplyTransform(matrix As /*Const*/ Matrix) As Status | ||
Function MultiplyTransform( | Function MultiplyTransform(matrix As /*Const*/ Matrix, order As MatrixOrder) As Status | ||
==== TranslateTransform ==== | ==== TranslateTransform ==== | ||
211行目: | 209行目: | ||
==== GetTransform ==== | ==== GetTransform ==== | ||
Const Function GetTransform( | Const Function GetTransform(matrix As Matrix) As Status | ||
==== TransformPoints ==== | ==== TransformPoints ==== | ||
221行目: | 219行目: | ||
==== DrawLine ==== | ==== DrawLine ==== | ||
Function DrawLine( | Function DrawLine(pen As /*Const*/ Pen, x1 As Single, y1 As Single, x2 As Single, y2 As Single) As Status | ||
Function DrawLine( | Function DrawLine(pen As /*Const*/ Pen, pt1 As /*Const*/ PointF, pt2 As /*Const*/ PointF) As Status | ||
Function DrawLine( | Function DrawLine(pen As /*Const*/ Pen, x1 As Long, y1 As Long, x2 As Long, y2 As Long) As Status | ||
Function DrawLine( | Function DrawLine(pen As /*Const*/ Pen, pt1 As /*Const*/ Point, pt2 As /*Const*/ Point) As Status | ||
==== DrawLines ==== | ==== DrawLines ==== | ||
Function DrawLines( | Function DrawLines(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long) As Status | ||
Function DrawLines( | Function DrawLines(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long) As Status | ||
==== DrawArc ==== | ==== DrawArc ==== | ||
Function DrawArc( | Function DrawArc(pen As /*Const*/ Pen, x As Single, y As Single, width As Single, height As Single, startAngle As Single, sweepAngle As Single) As Status | ||
Function DrawArc( | Function DrawArc(pen As /*Const*/ Pen, rect As /*Const*/ RectangleF, startAngle As Single, sweepAngle As Single) As Status | ||
Function DrawArc( | Function DrawArc(pen As /*Const*/ Pen, x As Long, y As Long, width As Long, height As Long, startAngle As Single, sweepAngle As Single) As Status | ||
Function DrawArc( | Function DrawArc(pen As /*Const*/ Pen, rect As /*Const*/ RectangleF, startAngle As Single, sweepAngle As Single) As Status | ||
==== DrawBezier ==== | ==== DrawBezier ==== | ||
Function DrawBezier( | Function DrawBezier(pen As /*Const*/ Pen, x1 As Single, y1 As Single, x2 As Single, y2 As Single, x3 As Single, y3 As Single, x4 As Single, y4 As Single) As Status | ||
Function DrawBezier( | Function DrawBezier(pen As /*Const*/ Pen, pt1 As /*Const*/ PointF, pt2 As /*Const*/ PointF, pt3 As /*Const*/ PointF, pt4 As /*Const*/ PointF) As Status | ||
Function DrawBezier( | Function DrawBezier(pen As /*Const*/ Pen, x1 As Long, y1 As Long, x2 As Long, y2 As Long, x3 As Long, y3 As Long, x4 As Long, y4 As Long) As Status | ||
Function DrawBezier( | Function DrawBezier(pen As /*Const*/ Pen, pt1 As /*Const*/ Point, pt2 As /*Const*/ Point, pt3 As /*Const*/ Point, pt4 As /*Const*/ Point) As Status | ||
==== DrawBeziers ==== | ==== DrawBeziers ==== | ||
Function DrawBeziers( | Function DrawBeziers(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long) As Status | ||
Function DrawBeziers( | Function DrawBeziers(pen As /*Const*/ Pen, points As /*Const*/ *Point count As Long) As Status | ||
==== DrawRectangle ==== | ==== DrawRectangle ==== | ||
Function DrawRectangle( | Function DrawRectangle(pen As /*Const*/ Pen, rect As /*Const*/ RectangleF) As Status | ||
Function DrawRectangle( | Function DrawRectangle(pen As /*Const*/ Pen, x As Single, y As Single, width As Single, height As Single) As Status | ||
Function DrawRectangle( | Function DrawRectangle(pen As /*Const*/ Pen, rect As /*Const*/ Rectangle) As Status | ||
Function DrawRectangle( | Function DrawRectangle(pen As /*Const*/ Pen, x As Long, y As Long, width As Long, height As Long) As Status | ||
==== DrawRectangles ==== | ==== DrawRectangles ==== | ||
Function DrawRectangles( | Function DrawRectangles(pen As /*Const*/ Pen, rects As /*Const*/ *RectangleF, count As Long) As Status | ||
Function DrawRectangles( | Function DrawRectangles(pen As /*Const*/ Pen, rects As /*Const*/ *Rectangle, count As Long) As Status | ||
==== DrawEllipse ==== | ==== DrawEllipse ==== | ||
Function DrawEllipse( | Function DrawEllipse(pen As /*Const*/ Pen, rect As /*Const*/ RectangleF) As Status | ||
Function DrawEllipse( | Function DrawEllipse(pen As /*Const*/ Pen, x As Single, y As Single, width As Single, height As Single) As Status | ||
Function DrawEllipse( | Function DrawEllipse(pen As /*Const*/ Pen, rect As /*Const*/ Rectangle) As Status | ||
Function DrawEllipse( | Function DrawEllipse(pen As /*Const*/ Pen, x As Long, y As Long, width As Long, height As Long) As Status | ||
==== DrawPie ==== | ==== DrawPie ==== | ||
Function DrawPie( | Function DrawPie(pen As /*Const*/ Pen, rect As /*Const*/ RectangleF, startAngle As Single, sweepAngle As Single) As Status | ||
Function DrawPie( | Function DrawPie(pen As /*Const*/ Pen, x As Single, y As Single, width As Single, height As Single, startAngle As Single, sweepAngle As Single) As Status | ||
Function DrawPie( | Function DrawPie(pen As /*Const*/ Pen, rect As /*Const*/ Rectangle, startAngle As Single, sweepAngle As Single) As Status | ||
Function DrawPie( | Function DrawPie(pen As /*Const*/ Pen, x As Long, y As Long, width As Long, height As Long, startAngle As Single, sweepAngle As Single) As Status | ||
==== DrawPolygon ==== | ==== DrawPolygon ==== | ||
Function DrawPolygon( | Function DrawPolygon(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long) As Status | ||
Function DrawPolygon( | Function DrawPolygon(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long) As Status | ||
==== DrawPath ==== | ==== DrawPath ==== | ||
Function DrawPath( | Function DrawPath(pen As /*Const*/ Pen, path As /*Const*/ GraphicsPath) As Status | ||
==== DrawCurve ==== | ==== DrawCurve ==== | ||
Function DrawCurve( | Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long) As Status | ||
Function DrawCurve( | Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long, tension As Single) As Status | ||
Function DrawCurve( | Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long, offset As Long, numberOfSegments As Long) As Status | ||
Function DrawCurve( | Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long, offset As Long, numberOfSegments As Long, tension As Single) As Status | ||
Function DrawCurve( | Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long) As Status | ||
Function DrawCurve( | Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long, tension As Single) As Status | ||
Function DrawCurve( | Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long, offset As Long, numberOfSegments As Long) As Status | ||
Function DrawCurve( | Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long, offset As Long, numberOfSegments As Long, tension As Single) As Status | ||
==== DrawClosedCurve ==== | ==== DrawClosedCurve ==== | ||
Function DrawClosedCurve( | Function DrawClosedCurve(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long) As Status | ||
Function DrawClosedCurve( | Function DrawClosedCurve(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long, tension As Single) As Status | ||
Function DrawClosedCurve( | Function DrawClosedCurve(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long) As Status | ||
Function DrawClosedCurve( | Function DrawClosedCurve(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long, tension As Single) As Status | ||
==== Clear ==== | ==== Clear ==== | ||
Function Clear( | Function Clear(color As /*Const*/ Color) As Status | ||
==== FillRectangle ==== | ==== FillRectangle ==== | ||
Function FillRectangle( | Function FillRectangle(brush As /*Const*/ Brush, rect As /*Const*/ RectangleF) As Status | ||
Function FillRectangle( | Function FillRectangle(brush As /*Const*/ Brush, x As Single, y As Single, width As Single, height As Single) As Status | ||
Function FillRectangle( | Function FillRectangle(brush As /*Const*/ Brush, rect As /*Const*/ Rectangle) As Status | ||
Function FillRectangle( | Function FillRectangle(brush As /*Const*/ Brush, x As Long, y As Long, width As Long, height As Long) As Status | ||
==== FillRectangles ==== | ==== FillRectangles ==== | ||
Function FillRectangles( | Function FillRectangles(brush As /*Const*/ Brush, rects As /*Const*/ *RectangleF, count As Long) As Status | ||
Function FillRectangles( | Function FillRectangles(brush As /*Const*/ Brush, rects As /*Const*/ *Rectangle, count As Long) As Status | ||
==== FillPolygon ==== | ==== FillPolygon ==== | ||
Function FillPolygon( | Function FillPolygon(brush As /*Const*/ Brush, points As /*Const*/ *PointF, count As Long) As Status | ||
Function FillPolygon( | Function FillPolygon(brush As /*Const*/ Brush, points As /*Const*/ *PointF, count As Long, fillMode As FillMode) As Status | ||
Function FillPolygon( | Function FillPolygon(brush As /*Const*/ Brush, points As /*Const*/ *Point, count As Long) As Status | ||
Function FillPolygon( | Function FillPolygon(brush As /*Const*/ Brush, points As /*Const*/ *Point, count As Long, fillMode As FillMode) As Status | ||
==== FillEllipse ==== | ==== FillEllipse ==== | ||
Function FillEllipse( | Function FillEllipse(brush As /*Const*/ Brush, rect As /*Const*/ RectangleF) As Status | ||
Function FillEllipse( | Function FillEllipse(brush As /*Const*/ Brush, x As Single, y As Single, width As Single, height As Single) As Status | ||
Function FillEllipse( | Function FillEllipse(brush As /*Const*/ Brush, rect As /*Const*/ Rectangle) As Status | ||
Function FillEllipse( | Function FillEllipse(brush As /*Const*/ Brush, x As Long, y As Long, width As Long, height As Long) As Status | ||
==== FillPie ==== | ==== FillPie ==== | ||
Function FillPie( | Function FillPie(brush As /*Const*/ Brush, rect As /*Const*/ RectangleF, startAngle As Single, sweepAngle As Single) As Status | ||
Function FillPie( | Function FillPie(brush As /*Const*/ Brush, x As Single, y As Single, width As Single, height As Single, startAngle As Single, sweepAngle As Single) As Status | ||
Function FillPie( | Function FillPie(brush As /*Const*/ Brush, rect As /*Const*/ Rectangle, startAngle As Single, sweepAngle As Single) As Status | ||
Function FillPie( | Function FillPie(brush As /*Const*/ Brush, x As Long, y As Long, width As Long, height As Long, startAngle As Single, sweepAngle As Single) As Status | ||
==== FillPath ==== | ==== FillPath ==== | ||
Function FillPath( | Function FillPath(brush As /*Const*/ Brush, path As /*Const*/ GraphicsPath) As Status | ||
==== FillClosedCurve ==== | ==== FillClosedCurve ==== | ||
Function FillClosedCurve( | Function FillClosedCurve(brush As /*Const*/ Brush, points As /*Const*/ *PointF, count As Long) As Status | ||
Function FillClosedCurve( | Function FillClosedCurve(brush As /*Const*/ Brush, points As /*Const*/ *PointF, count As Long, fillMode As FillMode) As Status | ||
Function FillClosedCurve( | Function FillClosedCurve(brush As /*Const*/ Brush, points As /*Const*/ *PointF, count As Long, fillMode As FillMode, tension As Single) As Status | ||
Function FillClosedCurve( | Function FillClosedCurve(brush As /*Const*/ Brush, points As /*Const*/ *Point, count As Long) As Status | ||
Function FillClosedCurve( | Function FillClosedCurve(brush As /*Const*/ Brush, points As /*Const*/ *Point, count As Long, fillMode As FillMode) As Status | ||
Function FillClosedCurve( | Function FillClosedCurve(brush As /*Const*/ Brush, points As /*Const*/ *Point, count As Long, fillMode As FillMode, tension As Single) As Status | ||
==== FillRegion ==== | ==== FillRegion ==== | ||
Function FillRegion( | Function FillRegion(brush As /*Const*/ Brush, region As /*Const*/ Region) As Status | ||
==== DrawString ==== | ==== DrawString ==== | ||
Function DrawString(str As PCWSTR, length As Long, | Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF) As Status | ||
Function DrawString(str As PCWSTR, length As Long, | Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF, | ||
stringFormat As /*Const*/ StringFormat, brush As /*Const*/ Brush) As Status | |||
Function DrawString(str As PCWSTR, length As Long, | Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF, | ||
stringFormat As /*Const*/ StringFormat, brush As /*Const*/ Brush) As Status | |||
Function DrawString(str As PCWSTR, length As Long, | Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, origin As /*Const*/ PointF) As Status | ||
Function DrawString(str As PCWSTR, length As Long, | Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, origin As /*Const*/ PointF, | ||
brush As /*Const*/ Brush) As Status | |||
Function DrawString(str As PCWSTR, length As Long, | Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, origin As /*Const*/ PointF) As Status | ||
Function DrawString(str As PCWSTR, length As Long, | Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, origin As /*Const*/ PointF, | ||
stringFormat As /*Const*/ StringFormat) As Status | |||
Function DrawString(str As PCWSTR, length As Long, | Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, origin As /*Const*/ PointF, | ||
stringFormat As /*Const*/ StringFormat, brush As /*Const*/ Brush) As Status | |||
==== MeasureString ==== | ==== MeasureString ==== | ||
Const Function MeasureString(str As PCWSTR, length As Long, | Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF, | ||
stringFormat As /*Const*/ StringFormat, boundingBox As RectangleF) As Status | |||
Const Function MeasureString(str As PCWSTR, length As Long, | Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF, | ||
stringFormat As /*Const*/ StringFormat, boundingBox As RectangleF, | |||
codepointsFitted As Long) As Status | |||
Const Function MeasureString(str As PCWSTR, length As Long, | Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF, | ||
stringFormat As /*Const*/ StringFormat, boundingBox As RectangleF, | |||
codepointsFitted As Long, linesFilled As Long) As Status | |||
Const Function MeasureString(str As PCWSTR, length As Long, | Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, | ||
layoutRectSize As /*Const*/ SizeF, stringFormat As /*Const*/ StringFormat, | |||
size As SizeF) As Status | |||
Const Function MeasureString(str As PCWSTR, length As Long, | Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, | ||
layoutRectSize As /*Const*/ SizeF, stringFormat As /*Const*/ StringFormat, | |||
size As SizeF, codepointsFitted As Long) As Status | |||
Const Function MeasureString(str As PCWSTR, length As Long, | Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, | ||
layoutRectSize As /*Const*/ SizeF, stringFormat As /*Const*/ StringFormat, | |||
size As SizeF, codepointsFitted As Long, linesFilled As Long) As Status | |||
Const Function MeasureString(str As PCWSTR, length As Long, | Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, | ||
origin As /*Const*/ PointF, stringFormat As /*Const*/ StringFormat, | |||
boundingBox As RectangleF) As Status | |||
Const Function MeasureString(str As PCWSTR, length As Long, | Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, | ||
layoutRect As /*Const*/ RectangleF, boundingBox As RectangleF) As Status | |||
Const Function MeasureString(str As PCWSTR, length As Long, | Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, | ||
origin As /*Const*/ PointF, boundingBox As RectangleF) As Status | |||
==== MeasureCharacterRanges ==== | ==== MeasureCharacterRanges ==== | ||
Const Function MeasureCharacterRanges(str As PCWSTR, length As Long, | Const Function MeasureCharacterRanges(str As PCWSTR, length As Long, font As /*Const*/ Font, | ||
layoutRect As /*Const*/ RectangleF, stringFormat As /*Const*/ StringFormat, | |||
regionCount As Long, regions As *Region) As Status | regionCount As Long, regions As *Region) As Status | ||
==== DrawDriverString ==== | ==== DrawDriverString ==== | ||
Function DrawDriverString(text As /*Const*/ Word, length As Long, | Function DrawDriverString(text As /*Const*/ Word, length As Long, font As /*Const*/ Font, | ||
brush As /*Const*/ Brush, positions As /*Const*/ *PointF, flags As Long) As Status | |||
Function DrawDriverString(text As /*Const*/ Word, length As Long, | Function DrawDriverString(text As /*Const*/ Word, length As Long, font As /*Const*/ Font, | ||
brush As /*Const*/ Brush, positions As /*Const*/ *PointF, flags As Long, matrix As /*Const*/ Matrix) As Status | |||
==== MeasureDriverString ==== | ==== MeasureDriverString ==== | ||
Const Function MeasureDriverString(text As /*Const*/ Word, length As Long, | Const Function MeasureDriverString(text As /*Const*/ Word, length As Long, font As /*Const*/ Font, | ||
positions As /*Const*/ *PointF, flags As Long, | positions As /*Const*/ *PointF, flags As Long, matrix As /*Const*/ Matrix, boundingBox As RectangleF) As Status | ||
==== DrawCachedBitmap ==== | ==== DrawCachedBitmap ==== | ||
Function DrawCachedBitmap( | Function DrawCachedBitmap(cb As CachedBitmap, x As Long, y As Long) As Status | ||
==== DrawImage ==== | ==== DrawImage ==== | ||
402行目: | 400行目: | ||
==== SetClip ==== | ==== SetClip ==== | ||
Function SetClip( | Function SetClip(g As /*Const*/ Graphics) As Status | ||
Function SetClip( | Function SetClip(rc As /*Const*/ RectangleF) As Status | ||
Function SetClip( | Function SetClip(rc As /*Const*/ Rectangle) As Status | ||
Function SetClip( | Function SetClip(path As /*Const*/ GraphicsPath) As Status | ||
Function SetClip( | Function SetClip(region As /*Const*/ Region) As Status | ||
Function SetClip( | Function SetClip(g As /*Const*/ Graphics, combineMode As CombineMode) As Status | ||
Function SetClip( | Function SetClip(rc As /*Const*/ RectangleF, combineMode As CombineMode) As Status | ||
Function SetClip( | Function SetClip(rc As /*Const*/ Rectangle, combineMode As CombineMode) As Status | ||
Function SetClip( | Function SetClip(path As /*Const*/ GraphicsPath, combineMode As CombineMode) As Status | ||
Function SetClip( | Function SetClip(region As /*Const*/ Region, combineMode As CombineMode) As Status | ||
Function SetClip(hrgn As HRGN, combineMode As CombineMode) As Status | Function SetClip(hrgn As HRGN, combineMode As CombineMode) As Status | ||
==== IntersectClip ==== | ==== IntersectClip ==== | ||
Function IntersectClip( | Function IntersectClip(rc As /*Const*/ RectangleF) As Status | ||
Function IntersectClip( | Function IntersectClip(rc As /*Const*/ Rectangle) As Status | ||
Function IntersectClip( | Function IntersectClip(region As /*Const*/ Region) As Status | ||
==== ExcludeClip ==== | ==== ExcludeClip ==== | ||
Function ExcludeClip( | Function ExcludeClip(rc As /*Const*/ RectangleF) As Status | ||
Function ExcludeClip( | Function ExcludeClip(rc As /*Const*/ Rectangle) As Status | ||
Function ExcludeClip( | Function ExcludeClip(region As /*Const*/ Region) As Status | ||
==== ResetClip ==== | ==== ResetClip ==== | ||
432行目: | 430行目: | ||
==== GetClip ==== | ==== GetClip ==== | ||
Const Function GetClip( | Const Function GetClip(region As Region) As Status | ||
==== GetClipBounds ==== | ==== GetClipBounds ==== | ||
Const Function GetClipBounds( | Const Function GetClipBounds(rc As RectangleF) As Status | ||
Const Function GetClipBounds( | Const Function GetClipBounds(rc As Rectangle) As Status | ||
==== GetVisibleClipBounds ==== | ==== GetVisibleClipBounds ==== | ||
444行目: | 442行目: | ||
==== IsVisible ==== | ==== IsVisible ==== | ||
Const Function IsVisible(x As Long, y As Long) As BOOL | Const Function IsVisible(x As Long, y As Long) As BOOL | ||
Const Function IsVisible( | Const Function IsVisible(pt As /*Const*/ Point) As BOOL | ||
Const Function IsVisible(x As Long, y As Long, width As Long, height As Long) As BOOL | Const Function IsVisible(x As Long, y As Long, width As Long, height As Long) As BOOL | ||
Const Function IsVisible( | Const Function IsVisible(rc As /*Const*/ Rectangle) As BOOL | ||
Const Function IsVisible(x As Single, y As Single) As BOOL | Const Function IsVisible(x As Single, y As Single) As BOOL | ||
Const Function IsVisible( | Const Function IsVisible(point As /*Const*/ PointF) As BOOL | ||
Const Function IsVisible(x As Single, y As Single, width As Single, height As Single) As BOOL | Const Function IsVisible(x As Single, y As Single, width As Single, height As Single) As BOOL | ||
Const Function IsVisible( | Const Function IsVisible(rect As /*Const*/ RectangleF) As BOOL | ||
==== Save ==== | ==== Save ==== | ||
459行目: | 457行目: | ||
==== BeginContainer ==== | ==== BeginContainer ==== | ||
Function BeginContainer( | Function BeginContainer(dstrect As /*Const*/ RectangleF, srcrect As /*Const*/ RectangleF, unit As GraphicsUnit) As GraphicsContainer | ||
Function BeginContainer( | Function BeginContainer(dstrect As /*Const*/ Rectangle, srcrect As /*Const*/ Rectangle, unit As GraphicsUnit) As GraphicsContainer | ||
Function BeginContainer() As GraphicsContainer | Function BeginContainer() As GraphicsContainer | ||
478行目: | 476行目: | ||
=== その他のGraphicsとの相違 === | === その他のGraphicsとの相違 === | ||
.NET Framework 2.0のSystem.Graphics.Graphics クラスに存在する次のメソッドは、実装されません。 | .NET Framework 2.0のSystem.Graphics.Graphics クラスに存在する次のメソッドは、実装されません。 | ||
* ReleaseDCの引数を取らないオーバーロード | *ReleaseDCの引数を取らないオーバーロード | ||
* FromHdcInternal | *FromHdcInternal | ||
* FromHow | *FromHow | ||
* FromHwndInternal | *FromHwndInternal | ||
* ReleaseHdcInternal | *ReleaseHdcInternal | ||
次のメソッドは、現在実装されていませんが、将来的に実装される予定です。 | 次のメソッドは、現在実装されていませんが、将来的に実装される予定です。 | ||
* CopyFromScreenの全てのオーバーロード | *CopyFromScreenの全てのオーバーロード | ||
* DrawIconの全てのオーバーロード | *DrawIconの全てのオーバーロード | ||
* DrawIconUnstretchedの全てのオーバーロード | *DrawIconUnstretchedの全てのオーバーロード | ||
* DrawImageUnscaled | *DrawImageUnscaled | ||
* DrawImageUnscaledAndClipped | *DrawImageUnscaledAndClipped | ||
次のメソッドはオーバーロードの引数が大きく異なっています。将来的に修正される予定です。 | 次のメソッドはオーバーロードの引数が大きく異なっています。将来的に修正される予定です。 | ||
* DrawString | *DrawString | ||
* MeasureString | *MeasureString | ||
その他のメソッドも引数の型が一部異なっています([[#GetDC|GetDC]]など)。 | その他のメソッドも引数の型が一部異なっています([[#GetDC|GetDC]]など)。 | ||
ネイティブC++用のGdiplus::Graphics クラスに存在するメソッド(オーバーロードされている場合はその全て)は、全て対応するものが存在しますが、一部はプロパティに分類されているものもあります(無論メソッドとして呼び出すことも可能です)。 | ネイティブC++用のGdiplus::Graphics クラスに存在するメソッド(オーバーロードされている場合はその全て)は、全て対応するものが存在しますが、一部はプロパティに分類されているものもあります(無論メソッドとして呼び出すことも可能です)。 | ||
[[Category: | [[Category:System.Drawing名前空間]] |
2011年1月15日 (土) 17:49時点における最新版
Graphicsは、各種の描画を行うクラスです。
クラスの機能
プロパティ
Clip
描画領域を限定する領域を取得・設定します。
Const Function Clip() As Region Sub Clip(region As /*Const*/ Region)
参考:Regionクラス
ClipBounds
描画領域を限定する領域に概説する四角形を取得・設定します。
Const Function ClipBounds() As RectangleF Sub ClipBounds(rc As RectangleF)
GetClipBounds/SetClipBoundsを呼びます。
CompositingMode
描画方法を取得・設定します。
Function CompositingMode() As CompositingMode Sub CompositingMode(mode As CompositingMode)
GetCompositingMode/SetCompositingModeを呼びます。
CompositingQuality
描画品質を取得・設定します。
Function CompositingQuality() As CompositingQuality Sub CompositingQuality(cq As CompositingQuality)
GetCompositingQuality/SetCompositingQualityを呼びます。
DpiX
水平方向の解像度を取得します。
Const Function DpiX() As Single
- 戻り値
- このインスタンスが使用している水平方向の解像度
DqiY
垂直方向の解像度を取得します。
Const Function DpiY() As Single
- 戻り値
- このインスタンスが使用している垂直方向の解像度
InterpolationMode
補間方法取得・設定します。
Const Function InterpolationMode() As InterpolationMode Sub InterpolationMode(im As InterpolationMode)
GetInterpolationMode/SetInterpolationModeを呼びます。
IsClipEmpty
Const Function IsClipEmpty() As BOOL
IsVisibleClipEmpty
Const Function IsVisibleClipEmpty() As BOOL
PageScale
Function PageScale(scale As Single) As Status Const Function PageScale() As Single
PageUnit
Const Function PageUnit() As GraphicsUnit Function PageUnit(unit As GraphicsUnit) As Status
PixelOffsetMode
Function PixelOffsetMode() As PixelOffsetMode Sub PixelOffsetMode(mode As PixelOffsetMode)
RenderingOrigin
Function RenderingOrigin() As Point Sub RenderingOrigin(pt As Point)
SmoothingMode
Function SmoothingMode() As SmoothingMode Sub SmoothingMode(mode As SmoothingMode)
TextContrast
Function TextContrast() As DWord Sub TextContrast(contrast As DWord)
TextRenderingHint
Function TextRenderingHint() As TextRenderingHint Sub TextRenderingHint(mode As TextRenderingHint)
Transform
Function Transform() As Matrix Sub Transform(ByRef matrix As Matrix)
ワールド変換行列を取得・設定します。
VisibleClipBounds
Function VisibleClipBounds() As RectangleF
メソッド
コンストラクタ
Sub Graphics(hdc As HDC) Sub Graphics(hdc As HDC, hdevice As HANDLE) Sub Graphics(hwnd As HWND) Sub Graphics(hwnd As HWND, icm As BOOL) Sub Graphics(image As Image)
デストラクタ
Sub ~Graphics()
FromHDC
Static Function FromHDC(hdc As HDC) As Graphics Static Function FromHDC(hdc As HDC, hdevice As HANDLE) As Graphics
引数が対応するコンストラクタを使用し、Newで新しいGraphicsインスタンスを作成します。
- 戻り値
- 作成されたインスタンス。
FromHWND
Static Function FromHWND(hwnd As HWND) As Graphics Static Function FromHWND(hwnd As DWord, icm As BOOL) As Graphics
引数が対応するコンストラクタを使用し、Newで新しいGraphicsインスタンスを作成します。
- 戻り値
- 作成されたインスタンス。
FromImage
Static Function FromImage(image As Image) As Graphics
引数が対応するコンストラクタを使用し、Newで新しいGraphicsインスタンスを作成します。
- 戻り値
- 作成されたインスタンスへのポインタ。
Flush
Sub Flush() Sub Flush(intention As FlushIntention)
GetHDC
Function GetHDC() As HDC
ReleaseHDC
Sub ReleaseHDC(hdc As HDC)
SetRenderingOrigin
Function SetRenderingOrigin(x As Long, y As Long) As Status
GetRenderingOrigin
Const Function GetRenderingOrigin(ByRef x As Long, ByRef y As Long) As Status
SetCompositingMode
Function SetCompositingMode(compositingMode As CompositingMode) As Status
GetCompositingMode
Const Function GetCompositingMode() As CompositingMode
SetCompositingQuality
Function SetCompositingQuality(compositingQuality As CompositingQuality)
GetCompositingQuality
Const Function GetCompositingQuality() As CompositingQuality
SetTextRenderingHint
Function SetTextRenderingHint(newMode As TextRenderingHint) As Status
GetTextRenderingHint
Const Function GetTextRenderingHint() As TextRenderingHint
SetTextContrast
Function SetTextContrast(contrast As DWord) As Status
GetTextContrast
Const Function GetTextContrast() As DWord
GetInterpolationMode
Const Function GetInterpolationMode() As InterpolationMode
SetInterpolationMode
Function SetInterpolationMode(interpolationMode As InterpolationMode) As Status
GetSmoothingMode
Const Function GetSmoothingMode() As SmoothingMode
SetSmoothingMode
Function SetSmoothingMode(smoothingMode As SmoothingMode) As Status
GetPixelOffsetMode
Const Function GetPixelOffsetMode() As PixelOffsetMode
SetPixelOffsetMode
Function SetPixelOffsetMode(pixelOffsetMode As PixelOffsetMode) As Status
SetTransform
Function SetTransform(matrix As /*Const*/ *Matrix) As Status
ResetTransform
Function ResetTransform() As Status
MultiplyTransform
Function MultiplyTransform(matrix As /*Const*/ Matrix) As Status Function MultiplyTransform(matrix As /*Const*/ Matrix, order As MatrixOrder) As Status
TranslateTransform
Function TranslateTransform(dx As Single, dy As Single) As Status Function TranslateTransform(dx As Single, dy As Single, order As MatrixOrder) As Status
ScaleTransform
Function ScaleTransform(sx As Single, sy As Single) As Status Function ScaleTransform(sx As Single, sy As Single, order As MatrixOrder) As Status
RotateTransform
Function RotateTransform(angle As Single, order As MatrixOrder) As Status
GetTransform
Const Function GetTransform(matrix As Matrix) As Status
TransformPoints
Const Function TransformPoints(destSpace As CoordinateSpace, srcSpace As CoordinateSpace, pts As PointF, count As Long) As Status Const Function TransformPoints(destSpace As CoordinateSpace, srcSpace As CoordinateSpace, pts As Point, count As Long) As Status
GetNearestColor
Const Function GetNearestColor(ByRef color As Color) As Status
DrawLine
Function DrawLine(pen As /*Const*/ Pen, x1 As Single, y1 As Single, x2 As Single, y2 As Single) As Status Function DrawLine(pen As /*Const*/ Pen, pt1 As /*Const*/ PointF, pt2 As /*Const*/ PointF) As Status Function DrawLine(pen As /*Const*/ Pen, x1 As Long, y1 As Long, x2 As Long, y2 As Long) As Status Function DrawLine(pen As /*Const*/ Pen, pt1 As /*Const*/ Point, pt2 As /*Const*/ Point) As Status
DrawLines
Function DrawLines(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long) As Status Function DrawLines(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long) As Status
DrawArc
Function DrawArc(pen As /*Const*/ Pen, x As Single, y As Single, width As Single, height As Single, startAngle As Single, sweepAngle As Single) As Status Function DrawArc(pen As /*Const*/ Pen, rect As /*Const*/ RectangleF, startAngle As Single, sweepAngle As Single) As Status Function DrawArc(pen As /*Const*/ Pen, x As Long, y As Long, width As Long, height As Long, startAngle As Single, sweepAngle As Single) As Status Function DrawArc(pen As /*Const*/ Pen, rect As /*Const*/ RectangleF, startAngle As Single, sweepAngle As Single) As Status
DrawBezier
Function DrawBezier(pen As /*Const*/ Pen, x1 As Single, y1 As Single, x2 As Single, y2 As Single, x3 As Single, y3 As Single, x4 As Single, y4 As Single) As Status Function DrawBezier(pen As /*Const*/ Pen, pt1 As /*Const*/ PointF, pt2 As /*Const*/ PointF, pt3 As /*Const*/ PointF, pt4 As /*Const*/ PointF) As Status Function DrawBezier(pen As /*Const*/ Pen, x1 As Long, y1 As Long, x2 As Long, y2 As Long, x3 As Long, y3 As Long, x4 As Long, y4 As Long) As Status Function DrawBezier(pen As /*Const*/ Pen, pt1 As /*Const*/ Point, pt2 As /*Const*/ Point, pt3 As /*Const*/ Point, pt4 As /*Const*/ Point) As Status
DrawBeziers
Function DrawBeziers(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long) As Status Function DrawBeziers(pen As /*Const*/ Pen, points As /*Const*/ *Point count As Long) As Status
DrawRectangle
Function DrawRectangle(pen As /*Const*/ Pen, rect As /*Const*/ RectangleF) As Status Function DrawRectangle(pen As /*Const*/ Pen, x As Single, y As Single, width As Single, height As Single) As Status Function DrawRectangle(pen As /*Const*/ Pen, rect As /*Const*/ Rectangle) As Status Function DrawRectangle(pen As /*Const*/ Pen, x As Long, y As Long, width As Long, height As Long) As Status
DrawRectangles
Function DrawRectangles(pen As /*Const*/ Pen, rects As /*Const*/ *RectangleF, count As Long) As Status Function DrawRectangles(pen As /*Const*/ Pen, rects As /*Const*/ *Rectangle, count As Long) As Status
DrawEllipse
Function DrawEllipse(pen As /*Const*/ Pen, rect As /*Const*/ RectangleF) As Status Function DrawEllipse(pen As /*Const*/ Pen, x As Single, y As Single, width As Single, height As Single) As Status Function DrawEllipse(pen As /*Const*/ Pen, rect As /*Const*/ Rectangle) As Status Function DrawEllipse(pen As /*Const*/ Pen, x As Long, y As Long, width As Long, height As Long) As Status
DrawPie
Function DrawPie(pen As /*Const*/ Pen, rect As /*Const*/ RectangleF, startAngle As Single, sweepAngle As Single) As Status Function DrawPie(pen As /*Const*/ Pen, x As Single, y As Single, width As Single, height As Single, startAngle As Single, sweepAngle As Single) As Status Function DrawPie(pen As /*Const*/ Pen, rect As /*Const*/ Rectangle, startAngle As Single, sweepAngle As Single) As Status Function DrawPie(pen As /*Const*/ Pen, x As Long, y As Long, width As Long, height As Long, startAngle As Single, sweepAngle As Single) As Status
DrawPolygon
Function DrawPolygon(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long) As Status Function DrawPolygon(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long) As Status
DrawPath
Function DrawPath(pen As /*Const*/ Pen, path As /*Const*/ GraphicsPath) As Status
DrawCurve
Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long) As Status Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long, tension As Single) As Status Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long, offset As Long, numberOfSegments As Long) As Status Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long, offset As Long, numberOfSegments As Long, tension As Single) As Status Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long) As Status Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long, tension As Single) As Status Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long, offset As Long, numberOfSegments As Long) As Status Function DrawCurve(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long, offset As Long, numberOfSegments As Long, tension As Single) As Status
DrawClosedCurve
Function DrawClosedCurve(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long) As Status Function DrawClosedCurve(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long, tension As Single) As Status Function DrawClosedCurve(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long) As Status Function DrawClosedCurve(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long, tension As Single) As Status
Clear
Function Clear(color As /*Const*/ Color) As Status
FillRectangle
Function FillRectangle(brush As /*Const*/ Brush, rect As /*Const*/ RectangleF) As Status Function FillRectangle(brush As /*Const*/ Brush, x As Single, y As Single, width As Single, height As Single) As Status Function FillRectangle(brush As /*Const*/ Brush, rect As /*Const*/ Rectangle) As Status Function FillRectangle(brush As /*Const*/ Brush, x As Long, y As Long, width As Long, height As Long) As Status
FillRectangles
Function FillRectangles(brush As /*Const*/ Brush, rects As /*Const*/ *RectangleF, count As Long) As Status Function FillRectangles(brush As /*Const*/ Brush, rects As /*Const*/ *Rectangle, count As Long) As Status
FillPolygon
Function FillPolygon(brush As /*Const*/ Brush, points As /*Const*/ *PointF, count As Long) As Status Function FillPolygon(brush As /*Const*/ Brush, points As /*Const*/ *PointF, count As Long, fillMode As FillMode) As Status Function FillPolygon(brush As /*Const*/ Brush, points As /*Const*/ *Point, count As Long) As Status Function FillPolygon(brush As /*Const*/ Brush, points As /*Const*/ *Point, count As Long, fillMode As FillMode) As Status
FillEllipse
Function FillEllipse(brush As /*Const*/ Brush, rect As /*Const*/ RectangleF) As Status Function FillEllipse(brush As /*Const*/ Brush, x As Single, y As Single, width As Single, height As Single) As Status Function FillEllipse(brush As /*Const*/ Brush, rect As /*Const*/ Rectangle) As Status Function FillEllipse(brush As /*Const*/ Brush, x As Long, y As Long, width As Long, height As Long) As Status
FillPie
Function FillPie(brush As /*Const*/ Brush, rect As /*Const*/ RectangleF, startAngle As Single, sweepAngle As Single) As Status Function FillPie(brush As /*Const*/ Brush, x As Single, y As Single, width As Single, height As Single, startAngle As Single, sweepAngle As Single) As Status Function FillPie(brush As /*Const*/ Brush, rect As /*Const*/ Rectangle, startAngle As Single, sweepAngle As Single) As Status Function FillPie(brush As /*Const*/ Brush, x As Long, y As Long, width As Long, height As Long, startAngle As Single, sweepAngle As Single) As Status
FillPath
Function FillPath(brush As /*Const*/ Brush, path As /*Const*/ GraphicsPath) As Status
FillClosedCurve
Function FillClosedCurve(brush As /*Const*/ Brush, points As /*Const*/ *PointF, count As Long) As Status Function FillClosedCurve(brush As /*Const*/ Brush, points As /*Const*/ *PointF, count As Long, fillMode As FillMode) As Status Function FillClosedCurve(brush As /*Const*/ Brush, points As /*Const*/ *PointF, count As Long, fillMode As FillMode, tension As Single) As Status Function FillClosedCurve(brush As /*Const*/ Brush, points As /*Const*/ *Point, count As Long) As Status Function FillClosedCurve(brush As /*Const*/ Brush, points As /*Const*/ *Point, count As Long, fillMode As FillMode) As Status Function FillClosedCurve(brush As /*Const*/ Brush, points As /*Const*/ *Point, count As Long, fillMode As FillMode, tension As Single) As Status
FillRegion
Function FillRegion(brush As /*Const*/ Brush, region As /*Const*/ Region) As Status
DrawString
Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF) As Status Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF, stringFormat As /*Const*/ StringFormat, brush As /*Const*/ Brush) As Status Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF, stringFormat As /*Const*/ StringFormat, brush As /*Const*/ Brush) As Status Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, origin As /*Const*/ PointF) As Status Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, origin As /*Const*/ PointF, brush As /*Const*/ Brush) As Status Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, origin As /*Const*/ PointF) As Status Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, origin As /*Const*/ PointF, stringFormat As /*Const*/ StringFormat) As Status Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, origin As /*Const*/ PointF, stringFormat As /*Const*/ StringFormat, brush As /*Const*/ Brush) As Status
MeasureString
Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF, stringFormat As /*Const*/ StringFormat, boundingBox As RectangleF) As Status Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF, stringFormat As /*Const*/ StringFormat, boundingBox As RectangleF, codepointsFitted As Long) As Status Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF, stringFormat As /*Const*/ StringFormat, boundingBox As RectangleF, codepointsFitted As Long, linesFilled As Long) As Status Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRectSize As /*Const*/ SizeF, stringFormat As /*Const*/ StringFormat, size As SizeF) As Status Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRectSize As /*Const*/ SizeF, stringFormat As /*Const*/ StringFormat, size As SizeF, codepointsFitted As Long) As Status Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRectSize As /*Const*/ SizeF, stringFormat As /*Const*/ StringFormat, size As SizeF, codepointsFitted As Long, linesFilled As Long) As Status Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, origin As /*Const*/ PointF, stringFormat As /*Const*/ StringFormat, boundingBox As RectangleF) As Status Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF, boundingBox As RectangleF) As Status Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, origin As /*Const*/ PointF, boundingBox As RectangleF) As Status
MeasureCharacterRanges
Const Function MeasureCharacterRanges(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF, stringFormat As /*Const*/ StringFormat, regionCount As Long, regions As *Region) As Status
DrawDriverString
Function DrawDriverString(text As /*Const*/ Word, length As Long, font As /*Const*/ Font, brush As /*Const*/ Brush, positions As /*Const*/ *PointF, flags As Long) As Status Function DrawDriverString(text As /*Const*/ Word, length As Long, font As /*Const*/ Font, brush As /*Const*/ Brush, positions As /*Const*/ *PointF, flags As Long, matrix As /*Const*/ Matrix) As Status
MeasureDriverString
Const Function MeasureDriverString(text As /*Const*/ Word, length As Long, font As /*Const*/ Font, positions As /*Const*/ *PointF, flags As Long, matrix As /*Const*/ Matrix, boundingBox As RectangleF) As Status
DrawCachedBitmap
Function DrawCachedBitmap(cb As CachedBitmap, x As Long, y As Long) As Status
DrawImage
詳しくはGraphics.DrawImageをご覧ください。
EnumerateMetafile
詳しくはGraphics.EnumerateMetafileをご覧ください。
SetClip
Function SetClip(g As /*Const*/ Graphics) As Status Function SetClip(rc As /*Const*/ RectangleF) As Status Function SetClip(rc As /*Const*/ Rectangle) As Status Function SetClip(path As /*Const*/ GraphicsPath) As Status Function SetClip(region As /*Const*/ Region) As Status Function SetClip(g As /*Const*/ Graphics, combineMode As CombineMode) As Status Function SetClip(rc As /*Const*/ RectangleF, combineMode As CombineMode) As Status Function SetClip(rc As /*Const*/ Rectangle, combineMode As CombineMode) As Status Function SetClip(path As /*Const*/ GraphicsPath, combineMode As CombineMode) As Status Function SetClip(region As /*Const*/ Region, combineMode As CombineMode) As Status Function SetClip(hrgn As HRGN, combineMode As CombineMode) As Status
IntersectClip
Function IntersectClip(rc As /*Const*/ RectangleF) As Status Function IntersectClip(rc As /*Const*/ Rectangle) As Status Function IntersectClip(region As /*Const*/ Region) As Status
ExcludeClip
Function ExcludeClip(rc As /*Const*/ RectangleF) As Status Function ExcludeClip(rc As /*Const*/ Rectangle) As Status Function ExcludeClip(region As /*Const*/ Region) As Status
ResetClip
Function ResetClip() As Status
TranslateClip
Function TranslateClip(dx As Single, dy As Single) As Status Function TranslateClip(dx As Long, dy As Long) As Status
GetClip
Const Function GetClip(region As Region) As Status
GetClipBounds
Const Function GetClipBounds(rc As RectangleF) As Status Const Function GetClipBounds(rc As Rectangle) As Status
GetVisibleClipBounds
Const Function GetVisibleClipBounds(ByRef rc As RectangleF) As Status Const Function GetVisibleClipBounds(ByRef rc As Rectangle) As Status
IsVisible
Const Function IsVisible(x As Long, y As Long) As BOOL Const Function IsVisible(pt As /*Const*/ Point) As BOOL Const Function IsVisible(x As Long, y As Long, width As Long, height As Long) As BOOL Const Function IsVisible(rc As /*Const*/ Rectangle) As BOOL Const Function IsVisible(x As Single, y As Single) As BOOL Const Function IsVisible(point As /*Const*/ PointF) As BOOL Const Function IsVisible(x As Single, y As Single, width As Single, height As Single) As BOOL Const Function IsVisible(rect As /*Const*/ RectangleF) As BOOL
Save
Const Function Save() As GraphicsState
Restore
Function Restore(gstate As GraphicsState)
BeginContainer
Function BeginContainer(dstrect As /*Const*/ RectangleF, srcrect As /*Const*/ RectangleF, unit As GraphicsUnit) As GraphicsContainer Function BeginContainer(dstrect As /*Const*/ Rectangle, srcrect As /*Const*/ Rectangle, unit As GraphicsUnit) As GraphicsContainer Function BeginContainer() As GraphicsContainer
EndContainer
Function EndContainer(state As GraphicsContainer) As Status
AddMetafileComment
Function AddMetafileComment(data As /*Const*/ *Byte, sizeData As DWord)
GetHalftonePalette
Static Function GetHalftonePalette() As HPALETTE
GetLastStatus
Const Function GetLastStatus() As Status
備考
その他のGraphicsとの相違
.NET Framework 2.0のSystem.Graphics.Graphics クラスに存在する次のメソッドは、実装されません。
- ReleaseDCの引数を取らないオーバーロード
- FromHdcInternal
- FromHow
- FromHwndInternal
- ReleaseHdcInternal
次のメソッドは、現在実装されていませんが、将来的に実装される予定です。
- CopyFromScreenの全てのオーバーロード
- DrawIconの全てのオーバーロード
- DrawIconUnstretchedの全てのオーバーロード
- DrawImageUnscaled
- DrawImageUnscaledAndClipped
次のメソッドはオーバーロードの引数が大きく異なっています。将来的に修正される予定です。
- DrawString
- MeasureString
その他のメソッドも引数の型が一部異なっています(GetDCなど)。
ネイティブC++用のGdiplus::Graphics クラスに存在するメソッド(オーバーロードされている場合はその全て)は、全て対応するものが存在しますが、一部はプロパティに分類されているものもあります(無論メソッドとして呼び出すことも可能です)。