「Graphicsクラス」の版間の差分

提供: AB開発Wiki
ナビゲーションに移動検索に移動
(#127)
1行目: 1行目:
 
'''Graphics'''は、各種の描画を行うクラスです。
 
'''Graphics'''は、各種の描画を行うクラスです。
  
== クラスの機能 ==
+
==クラスの機能==
 
+
===プロパティ===
=== プロパティ ===
 
 
 
 
==== Clip ====
 
==== Clip ====
 
描画領域を限定する領域を取得・設定します。
 
描画領域を限定する領域を取得・設定します。
 
  Const Function Clip() As Region
 
  Const Function Clip() As Region
  Sub Clip(ByRef region As /*Const*/ Region)
+
  Sub Clip(region As /*Const*/ Region)
 
[[#GetClip|GetClip]]/[[#SetClip|SetClip]]を呼びます。
 
[[#GetClip|GetClip]]/[[#SetClip|SetClip]]を呼びます。
  
参考:[[Region クラス]]
+
参考:[[Regionクラス]]
  
 
==== ClipBounds ====
 
==== ClipBounds ====
19行目: 17行目:
 
[[#GetClipBounds|GetClipBounds]]/[[#SetClipBounds|SetClipBounds]]を呼びます。
 
[[#GetClipBounds|GetClipBounds]]/[[#SetClipBounds|SetClipBounds]]を呼びます。
  
参考:[[RectangleF クラス]]
+
参考:[[RectangleFクラス]]
  
 
==== CompositingMode ====
 
==== CompositingMode ====
27行目: 25行目:
 
[[#GetCompositingMode|GetCompositingMode]]/[[#SetCompositingMode|SetCompositingMode]]を呼びます。
 
[[#GetCompositingMode|GetCompositingMode]]/[[#SetCompositingMode|SetCompositingMode]]を呼びます。
  
参考:[[CompositingMode 列挙体]]
+
参考:[[CompositingMode列挙体]]
  
 
==== CompositingQuality ====
 
==== CompositingQuality ====
35行目: 33行目:
 
[[#GetCompositingQuality|GetCompositingQuality]]/[[#SetCompositingQuality|SetCompositingQuality]]を呼びます。
 
[[#GetCompositingQuality|GetCompositingQuality]]/[[#SetCompositingQuality|SetCompositingQuality]]を呼びます。
  
参考:[[CompositingQuality 列挙体]]
+
参考:[[CompositingQuality列挙体]]
  
 
==== DpiX ====
 
==== DpiX ====
55行目: 53行目:
 
[[#GetInterpolationMode|GetInterpolationMode]]/[[#SetInterpolationMode|SetInterpolationMode]]を呼びます。
 
[[#GetInterpolationMode|GetInterpolationMode]]/[[#SetInterpolationMode|SetInterpolationMode]]を呼びます。
  
参考:[[InterpolationMode 列挙体]]
+
参考:[[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 *Image)
+
  Sub Graphics(image As Image)
  
 
==== デストラクタ ====
 
==== デストラクタ ====
112行目: 110行目:
  
 
==== FromHDC ====
 
==== FromHDC ====
  Static Function FromHDC(hdc As HDC) As *Graphics
+
  Static Function FromHDC(hdc As HDC) As Graphics
  Static Function FromHDC(hdc As HDC, hdevice As HANDLE) As *Graphics
+
  Static Function FromHDC(hdc As HDC, hdevice As HANDLE) As Graphics
 
引数が対応する[[#コンストラクタ|コンストラクタ]]を使用し、Newで新しいGraphicsインスタンスを作成します。
 
引数が対応する[[#コンストラクタ|コンストラクタ]]を使用し、Newで新しいGraphicsインスタンスを作成します。
; 戻り値
+
;戻り値
: 作成されたインスタンスへのポインタ。不要になったらDeleteで削除する必要があります。
+
:作成されたインスタンス。
  
 
==== FromHWND ====
 
==== FromHWND ====
  Static Function FromHWND(hwnd As HWND) As *Graphics
+
  Static Function FromHWND(hwnd As HWND) As Graphics
  Static Function FromHWND(hwnd As DWord, icm As BOOL) As *Graphics
+
  Static Function FromHWND(hwnd As DWord, icm As BOOL) As Graphics
 
引数が対応する[[#コンストラクタ|コンストラクタ]]を使用し、Newで新しいGraphicsインスタンスを作成します。
 
引数が対応する[[#コンストラクタ|コンストラクタ]]を使用し、Newで新しいGraphicsインスタンスを作成します。
; 戻り値
+
;戻り値
: 作成されたインスタンスへのポインタ。不要になったらDeleteで削除する必要があります。
+
: 作成されたインスタンス。
  
 
==== FromImage ====
 
==== FromImage ====
  Static Function FromImage(image As *Image) As *Graphics
+
  Static Function FromImage(image As Image) As Graphics
 
引数が対応する[[#コンストラクタ|コンストラクタ]]を使用し、Newで新しいGraphicsインスタンスを作成します。
 
引数が対応する[[#コンストラクタ|コンストラクタ]]を使用し、Newで新しいGraphicsインスタンスを作成します。
; 戻り値
+
;戻り値
: 作成されたインスタンスへのポインタ。不要になったらDeleteで削除する必要があります。
+
:作成されたインスタンスへのポインタ。
  
 
==== Flush ====
 
==== Flush ====
190行目: 188行目:
  
 
==== SetTransform ====
 
==== SetTransform ====
  Function SetTransform(ByRef matrix As /*Const*/ *Matrix) As Status
+
  Function SetTransform(matrix As /*Const*/ *Matrix) As Status
  
 
==== ResetTransform ====
 
==== ResetTransform ====
196行目: 194行目:
  
 
==== MultiplyTransform ====
 
==== MultiplyTransform ====
  Function MultiplyTransform(ByRef matrix As /*Const*/ Matrix) As Status
+
  Function MultiplyTransform(matrix As /*Const*/ Matrix) As Status
  Function MultiplyTransform(ByRef matrix As /*Const*/ Matrix, order As MatrixOrder) As Status
+
  Function MultiplyTransform(matrix As /*Const*/ Matrix, order As MatrixOrder) As Status
  
 
==== TranslateTransform ====
 
==== TranslateTransform ====
211行目: 209行目:
  
 
==== GetTransform ====
 
==== GetTransform ====
  Const Function GetTransform(ByRef matrix As Matrix) As Status
+
  Const Function GetTransform(matrix As Matrix) As Status
  
 
==== TransformPoints ====
 
==== TransformPoints ====
221行目: 219行目:
  
 
==== DrawLine ====
 
==== DrawLine ====
  Function DrawLine(ByRef pen As /*Const*/ Pen, x1 As Single, y1 As Single, x2 As Single, y2 As Single) As Status
+
  Function DrawLine(pen As /*Const*/ Pen, x1 As Single, y1 As Single, x2 As Single, y2 As Single) As Status
  Function DrawLine(ByRef pen As /*Const*/ Pen, ByRef pt1 As /*Const*/ PointF, ByRef pt2 As /*Const*/ PointF) As Status
+
  Function DrawLine(pen As /*Const*/ Pen, pt1 As /*Const*/ PointF, pt2 As /*Const*/ PointF) As Status
  Function DrawLine(ByRef pen As /*Const*/ Pen, x1 As Long, y1 As Long, x2 As Long, y2 As Long) As Status
+
  Function DrawLine(pen As /*Const*/ Pen, x1 As Long, y1 As Long, x2 As Long, y2 As Long) As Status
  Function DrawLine(ByRef pen As /*Const*/ Pen, ByRef pt1 As /*Const*/ Point, ByRef pt2 As /*Const*/ Point) As Status
+
  Function DrawLine(pen As /*Const*/ Pen, pt1 As /*Const*/ Point, pt2 As /*Const*/ Point) As Status
  
 
==== DrawLines ====
 
==== DrawLines ====
  Function DrawLines(ByRef pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long) As Status
+
  Function DrawLines(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long) As Status
  Function DrawLines(ByRef pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long) As Status
+
  Function DrawLines(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long) As Status
  
 
==== DrawArc ====
 
==== DrawArc ====
  Function DrawArc(ByRef 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, x As Single, y As Single, width As Single, height As Single, startAngle As Single, sweepAngle As Single) As Status
  Function DrawArc(ByRef pen As /*Const*/ Pen, ByRef rect As /*Const*/ RectangleF, 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(ByRef 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, x As Long, y As Long, width As Long, height As Long, startAngle As Single, sweepAngle As Single) As Status
  Function DrawArc(ByRef pen As /*Const*/ Pen, ByRef rect As /*Const*/ RectangleF, 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 ====
 
==== DrawBezier ====
  Function DrawBezier(ByRef 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, 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(ByRef pen As /*Const*/ Pen, ByRef pt1 As /*Const*/ PointF, ByRef pt2 As /*Const*/ PointF, ByRef pt3 As /*Const*/ PointF, ByRef pt4 As /*Const*/ PointF) 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(ByRef 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, 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(ByRef pen As /*Const*/ Pen, ByRef pt1 As /*Const*/ Point, ByRef pt2 As /*Const*/ Point, ByRef pt3 As /*Const*/ Point, ByRef pt4 As /*Const*/ Point) 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 ====
 
==== DrawBeziers ====
  Function DrawBeziers(ByRef pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long) As Status
+
  Function DrawBeziers(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long) As Status
  Function DrawBeziers(ByRef pen As /*Const*/ Pen, points As /*Const*/ *Point count As Long) As Status
+
  Function DrawBeziers(pen As /*Const*/ Pen, points As /*Const*/ *Point count As Long) As Status
  
 
==== DrawRectangle ====
 
==== DrawRectangle ====
  Function DrawRectangle(ByRef pen As /*Const*/ Pen, ByRef rect As /*Const*/ RectangleF) As Status
+
  Function DrawRectangle(pen As /*Const*/ Pen, rect As /*Const*/ RectangleF) As Status
  Function DrawRectangle(ByRef pen As /*Const*/ Pen, x As Single, y As Single, width As Single, height As Single) As Status
+
  Function DrawRectangle(pen As /*Const*/ Pen, x As Single, y As Single, width As Single, height As Single) As Status
  Function DrawRectangle(ByRef pen As /*Const*/ Pen, ByRef rect As /*Const*/ Rectangle) As Status
+
  Function DrawRectangle(pen As /*Const*/ Pen, rect As /*Const*/ Rectangle) As Status
  Function DrawRectangle(ByRef pen As /*Const*/ Pen, x As Long, y As Long, width As Long, height As Long) As Status
+
  Function DrawRectangle(pen As /*Const*/ Pen, x As Long, y As Long, width As Long, height As Long) As Status
  
 
==== DrawRectangles ====
 
==== DrawRectangles ====
  Function DrawRectangles(ByRef pen As /*Const*/ Pen, rects As /*Const*/ *RectangleF, count As Long) As Status
+
  Function DrawRectangles(pen As /*Const*/ Pen, rects As /*Const*/ *RectangleF, count As Long) As Status
  Function DrawRectangles(ByRef pen As /*Const*/ Pen, rects As /*Const*/ *Rectangle,  count As Long) As Status
+
  Function DrawRectangles(pen As /*Const*/ Pen, rects As /*Const*/ *Rectangle,  count As Long) As Status
  
 
==== DrawEllipse ====
 
==== DrawEllipse ====
  Function DrawEllipse(ByRef pen As /*Const*/ Pen, ByRef rect As /*Const*/ RectangleF) As Status
+
  Function DrawEllipse(pen As /*Const*/ Pen, rect As /*Const*/ RectangleF) As Status
  Function DrawEllipse(ByRef pen As /*Const*/ Pen, x As Single, y As Single, width As Single, height As Single) As Status
+
  Function DrawEllipse(pen As /*Const*/ Pen, x As Single, y As Single, width As Single, height As Single) As Status
  Function DrawEllipse(ByRef pen As /*Const*/ Pen, ByRef rect As /*Const*/ Rectangle) As Status
+
  Function DrawEllipse(pen As /*Const*/ Pen, rect As /*Const*/ Rectangle) As Status
  Function DrawEllipse(ByRef pen As /*Const*/ Pen, x As Long, y As Long, width As Long, height As Long) As Status
+
  Function DrawEllipse(pen As /*Const*/ Pen, x As Long, y As Long, width As Long, height As Long) As Status
  
 
==== DrawPie ====
 
==== DrawPie ====
  Function DrawPie(ByRef pen As /*Const*/ Pen, ByRef rect As /*Const*/ RectangleF, startAngle As Single, sweepAngle As Single) As Status
+
  Function DrawPie(pen As /*Const*/ Pen, rect As /*Const*/ RectangleF, startAngle As Single, sweepAngle As Single) As Status
  Function DrawPie(ByRef 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, x As Single, y As Single, width As Single, height As Single, startAngle As Single, sweepAngle As Single) As Status
  Function DrawPie(ByRef pen As /*Const*/ Pen, ByRef rect As /*Const*/ Rectangle, 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(ByRef 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 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(ByRef pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long) As Status
+
  Function DrawPolygon(pen As /*Const*/ Pen, points As /*Const*/ *PointF, count As Long) As Status
  Function DrawPolygon(ByRef pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long) As Status
+
  Function DrawPolygon(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long) As Status
  
 
==== DrawPath ====
 
==== DrawPath ====
  Function DrawPath(ByRef pen As /*Const*/ Pen, ByRef path As /*Const*/ GraphicsPath) As Status
+
  Function DrawPath(pen As /*Const*/ Pen, path As /*Const*/ GraphicsPath) As Status
  
 
==== DrawCurve ====
 
==== DrawCurve ====
  Function DrawCurve(ByRef 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) As Status
  Function DrawCurve(ByRef 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, tension As Single) As Status
  Function DrawCurve(ByRef 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) As Status
  Function DrawCurve(ByRef 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*/ *PointF, count As Long, offset As Long, numberOfSegments As Long, tension As Single) As Status
  Function DrawCurve(ByRef 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) As Status
  Function DrawCurve(ByRef 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, tension As Single) As Status
  Function DrawCurve(ByRef 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) As Status
  Function DrawCurve(ByRef pen As /*Const*/ Pen, points As /*Const*/ *Point, 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, offset As Long, numberOfSegments As Long, tension As Single) As Status
  
 
==== DrawClosedCurve ====
 
==== DrawClosedCurve ====
  Function DrawClosedCurve(ByRef 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) As Status
  Function DrawClosedCurve(ByRef 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*/ *PointF, count As Long, tension As Single) As Status
  Function DrawClosedCurve(ByRef 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) As Status
  Function DrawClosedCurve(ByRef pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long, tension As Single) As Status
+
  Function DrawClosedCurve(pen As /*Const*/ Pen, points As /*Const*/ *Point, count As Long, tension As Single) As Status
  
 
==== Clear ====
 
==== Clear ====
  Function Clear(ByRef color As /*Const*/ Color) As Status
+
  Function Clear(color As /*Const*/ Color) As Status
  
 
==== FillRectangle ====
 
==== FillRectangle ====
  Function FillRectangle(ByRef brush As /*Const*/ Brush, ByRef rect As /*Const*/ RectangleF) As Status
+
  Function FillRectangle(brush As /*Const*/ Brush, rect As /*Const*/ RectangleF) As Status
  Function FillRectangle(ByRef brush As /*Const*/ Brush, x As Single, y As Single, width As Single, height As Single) As Status
+
  Function FillRectangle(brush As /*Const*/ Brush, x As Single, y As Single, width As Single, height As Single) As Status
  Function FillRectangle(ByRef brush As /*Const*/ Brush, ByRef rect As /*Const*/ Rectangle) As Status
+
  Function FillRectangle(brush As /*Const*/ Brush, rect As /*Const*/ Rectangle) As Status
  Function FillRectangle(ByRef brush As /*Const*/ Brush, x As Long, y As Long, width As Long, height As Long) As Status
+
  Function FillRectangle(brush As /*Const*/ Brush, x As Long, y As Long, width As Long, height As Long) As Status
  
 
==== FillRectangles ====
 
==== FillRectangles ====
  Function FillRectangles(ByRef brush As /*Const*/ Brush, rects As /*Const*/ *RectangleF, count As Long) As Status
+
  Function FillRectangles(brush As /*Const*/ Brush, rects As /*Const*/ *RectangleF, count As Long) As Status
  Function FillRectangles(ByRef brush As /*Const*/ Brush, rects As /*Const*/ *Rectangle, count As Long) As Status
+
  Function FillRectangles(brush As /*Const*/ Brush, rects As /*Const*/ *Rectangle, count As Long) As Status
  
 
==== FillPolygon ====
 
==== FillPolygon ====
  Function FillPolygon(ByRef 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) As Status
  Function FillPolygon(ByRef 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*/ *PointF, count As Long, fillMode As FillMode) As Status
  Function FillPolygon(ByRef 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) As Status
  Function FillPolygon(ByRef brush As /*Const*/ Brush, points As /*Const*/ *Point, count As Long, fillMode As FillMode) As Status
+
  Function FillPolygon(brush As /*Const*/ Brush, points As /*Const*/ *Point, count As Long, fillMode As FillMode) As Status
  
 
==== FillEllipse ====
 
==== FillEllipse ====
  Function FillEllipse(ByRef brush As /*Const*/ Brush, ByRef rect As /*Const*/ RectangleF) As Status
+
  Function FillEllipse(brush As /*Const*/ Brush, rect As /*Const*/ RectangleF) As Status
  Function FillEllipse(ByRef brush As /*Const*/ Brush, x As Single, y As Single, width As Single, height As Single) As Status
+
  Function FillEllipse(brush As /*Const*/ Brush, x As Single, y As Single, width As Single, height As Single) As Status
  Function FillEllipse(ByRef brush As /*Const*/ Brush, ByRef rect As /*Const*/ Rectangle) As Status
+
  Function FillEllipse(brush As /*Const*/ Brush, rect As /*Const*/ Rectangle) As Status
  Function FillEllipse(ByRef brush As /*Const*/ Brush, x As Long, y As Long, width As Long, height As Long) As Status
+
  Function FillEllipse(brush As /*Const*/ Brush, x As Long, y As Long, width As Long, height As Long) As Status
  
 
==== FillPie ====
 
==== FillPie ====
  Function FillPie(ByRef brush As /*Const*/ Brush, ByRef rect As /*Const*/ RectangleF, startAngle As Single, sweepAngle As Single) As Status
+
  Function FillPie(brush As /*Const*/ Brush, rect As /*Const*/ RectangleF, startAngle As Single, sweepAngle As Single) As Status
  Function FillPie(ByRef 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, x As Single, y As Single, width As Single, height As Single, startAngle As Single, sweepAngle As Single) As Status
  Function FillPie(ByRef brush As /*Const*/ Brush, ByRef rect As /*Const*/ Rectangle, 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(ByRef brush As /*Const*/ Brush, x As Long, y As Long, width As Long, height As Long, 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 ====
 
==== FillPath ====
  Function FillPath(ByRef brush As /*Const*/ Brush, ByRef path As /*Const*/ GraphicsPath) As Status
+
  Function FillPath(brush As /*Const*/ Brush, path As /*Const*/ GraphicsPath) As Status
  
 
==== FillClosedCurve ====
 
==== FillClosedCurve ====
  Function FillClosedCurve(ByRef 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) As Status
  Function FillClosedCurve(ByRef 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) As Status
  Function FillClosedCurve(ByRef 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*/ *PointF, count As Long, fillMode As FillMode, tension As Single) As Status
  Function FillClosedCurve(ByRef 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) As Status
  Function FillClosedCurve(ByRef 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) As Status
  Function FillClosedCurve(ByRef brush As /*Const*/ Brush, points As /*Const*/ *Point, count As Long, fillMode As FillMode, tension As Single) As Status
+
  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(ByRef brush As /*Const*/ Brush, ByRef region As /*Const*/ Region) As Status
+
  Function FillRegion(brush As /*Const*/ Brush, region As /*Const*/ Region) As Status
  
 
==== DrawString ====
 
==== DrawString ====
  Function DrawString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef layoutRect As /*Const*/ RectangleF) As Status
+
  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, ByRef font As /*Const*/ Font, ByRef layoutRect As /*Const*/ RectangleF,
+
  Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF,
   ByRef stringFormat As /*Const*/ StringFormat, ByRef brush As /*Const*/ Brush) As Status
+
   stringFormat As /*Const*/ StringFormat, brush As /*Const*/ Brush) As Status
  Function DrawString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef layoutRect As /*Const*/ RectangleF,
+
  Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF,
   ByRef stringFormat As /*Const*/ StringFormat, ByRef brush As /*Const*/ Brush) As Status
+
   stringFormat As /*Const*/ StringFormat, brush As /*Const*/ Brush) As Status
  Function DrawString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef origin As /*Const*/ PointF) 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, ByRef font As /*Const*/ Font, ByRef origin As /*Const*/ PointF,
+
  Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, origin As /*Const*/ PointF,
   ByRef brush As /*Const*/ Brush) As Status
+
   brush As /*Const*/ Brush) As Status
  Function DrawString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef origin As /*Const*/ PointF) 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, ByRef font As /*Const*/ Font, ByRef origin As /*Const*/ PointF,
+
  Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, origin As /*Const*/ PointF,
   ByRef stringFormat As /*Const*/ StringFormat) As Status
+
   stringFormat As /*Const*/ StringFormat) As Status
  Function DrawString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef origin As /*Const*/ PointF,
+
  Function DrawString(str As PCWSTR, length As Long, font As /*Const*/ Font, origin As /*Const*/ PointF,
   ByRef stringFormat As /*Const*/ StringFormat, ByRef brush As /*Const*/ Brush) As Status
+
   stringFormat As /*Const*/ StringFormat, brush As /*Const*/ Brush) As Status
  
 
==== MeasureString ====
 
==== MeasureString ====
  Const Function MeasureString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef layoutRect As /*Const*/ RectangleF,
+
  Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF,
   ByRef stringFormat As /*Const*/ StringFormat, ByRef boundingBox As RectangleF) As Status
+
   stringFormat As /*Const*/ StringFormat, boundingBox As RectangleF) As Status
  Const Function MeasureString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef layoutRect As /*Const*/ RectangleF,
+
  Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF,
   ByRef stringFormat As /*Const*/ StringFormat, ByRef boundingBox As RectangleF,
+
   stringFormat As /*Const*/ StringFormat, boundingBox As RectangleF,
   ByRef codepointsFitted As Long) As Status
+
   codepointsFitted As Long) As Status
  Const Function MeasureString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font, ByRef layoutRect As /*Const*/ RectangleF,
+
  Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font, layoutRect As /*Const*/ RectangleF,
   ByRef stringFormat As /*Const*/ StringFormat, ByRef boundingBox As RectangleF,
+
   stringFormat As /*Const*/ StringFormat, boundingBox As RectangleF,
   ByRef codepointsFitted As Long, ByRef linesFilled As Long) As Status
+
   codepointsFitted As Long, linesFilled As Long) As Status
  Const Function MeasureString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font,
+
  Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font,
   ByRef layoutRectSize As /*Const*/ SizeF, ByRef stringFormat As /*Const*/ StringFormat,
+
   layoutRectSize As /*Const*/ SizeF, stringFormat As /*Const*/ StringFormat,
   ByRef size As SizeF) As Status
+
   size As SizeF) As Status
  Const Function MeasureString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font,
+
  Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font,
   ByRef layoutRectSize As /*Const*/ SizeF, ByRef stringFormat As /*Const*/ StringFormat,
+
   layoutRectSize As /*Const*/ SizeF, stringFormat As /*Const*/ StringFormat,
   ByRef size As SizeF, ByRef codepointsFitted As Long) As Status
+
   size As SizeF, codepointsFitted As Long) As Status
  Const Function MeasureString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font,
+
  Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font,
   ByRef layoutRectSize As /*Const*/ SizeF, ByRef stringFormat As /*Const*/ StringFormat,
+
   layoutRectSize As /*Const*/ SizeF, stringFormat As /*Const*/ StringFormat,
   ByRef size As SizeF, ByRef codepointsFitted As Long, ByRef linesFilled As Long) As Status
+
   size As SizeF, codepointsFitted As Long, linesFilled As Long) As Status
  Const Function MeasureString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font,
+
  Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font,
   ByRef origin As /*Const*/ PointF, ByRef stringFormat As /*Const*/ StringFormat,
+
   origin As /*Const*/ PointF, stringFormat As /*Const*/ StringFormat,
   ByRef boundingBox As RectangleF) As Status
+
   boundingBox As RectangleF) As Status
  Const Function MeasureString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font,
+
  Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font,
   ByRef layoutRect As /*Const*/ RectangleF, ByRef boundingBox As RectangleF) As Status
+
   layoutRect As /*Const*/ RectangleF, boundingBox As RectangleF) As Status
  Const Function MeasureString(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font,
+
  Const Function MeasureString(str As PCWSTR, length As Long, font As /*Const*/ Font,
   ByRef origin As /*Const*/ PointF, ByRef boundingBox As RectangleF) As Status
+
   origin As /*Const*/ PointF, boundingBox As RectangleF) As Status
  
 
==== MeasureCharacterRanges ====
 
==== MeasureCharacterRanges ====
  Const Function MeasureCharacterRanges(str As PCWSTR, length As Long, ByRef font As /*Const*/ Font,
+
  Const Function MeasureCharacterRanges(str As PCWSTR, length As Long, font As /*Const*/ Font,
   ByRef layoutRect As /*Const*/ RectangleF, ByRef stringFormat As /*Const*/ StringFormat,
+
   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, ByRef font As /*Const*/ Font,
+
  Function DrawDriverString(text As /*Const*/ Word, length As Long, font As /*Const*/ Font,
   ByRef brush As /*Const*/ Brush, positions As /*Const*/ *PointF, flags As Long) As Status
+
   brush As /*Const*/ Brush, positions As /*Const*/ *PointF, flags As Long) As Status
  Function DrawDriverString(text As /*Const*/ Word, length As Long, ByRef font As /*Const*/ Font,
+
  Function DrawDriverString(text As /*Const*/ Word, length As Long, font As /*Const*/ Font,
   ByRef brush As /*Const*/ Brush, positions As /*Const*/ *PointF, flags As Long, ByRef matrix As /*Const*/ Matrix) As Status
+
   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, ByRef font As /*Const*/ Font,
+
  Const Function MeasureDriverString(text As /*Const*/ Word, length As Long, font As /*Const*/ Font,
   positions As /*Const*/ *PointF, flags As Long, ByRef matrix As /*Const*/ Matrix, ByRef boundingBox As RectangleF) As Status
+
   positions As /*Const*/ *PointF, flags As Long, matrix As /*Const*/ Matrix, boundingBox As RectangleF) As Status
  
 
==== DrawCachedBitmap ====
 
==== DrawCachedBitmap ====
  Function DrawCachedBitmap(ByRef cb As CachedBitma, x As Long, y As Long) As Status
+
  Function DrawCachedBitmap(cb As CachedBitmap, x As Long, y As Long) As Status
  
 
==== DrawImage ====
 
==== DrawImage ====
402行目: 400行目:
  
 
==== SetClip ====
 
==== SetClip ====
  Function SetClip(ByRef g As /*Const*/ Graphics) As Status
+
  Function SetClip(g As /*Const*/ Graphics) As Status
  Function SetClip(ByRef rc As /*Const*/ RectangleF) As Status
+
  Function SetClip(rc As /*Const*/ RectangleF) As Status
  Function SetClip(ByRef rc As /*Const*/ Rectangle) As Status
+
  Function SetClip(rc As /*Const*/ Rectangle) As Status
  Function SetClip(ByRef path As /*Const*/ GraphicsPath) As Status
+
  Function SetClip(path As /*Const*/ GraphicsPath) As Status
  Function SetClip(ByRef region As /*Const*/ Region) As Status
+
  Function SetClip(region As /*Const*/ Region) As Status
  Function SetClip(ByRef g As /*Const*/ Graphics, combineMode As CombineMode) As Status
+
  Function SetClip(g As /*Const*/ Graphics, combineMode As CombineMode) As Status
  Function SetClip(ByRef rc As /*Const*/ RectangleF, combineMode As CombineMode) As Status
+
  Function SetClip(rc As /*Const*/ RectangleF, combineMode As CombineMode) As Status
  Function SetClip(ByRef rc As /*Const*/ Rectangle, combineMode As CombineMode) As Status
+
  Function SetClip(rc As /*Const*/ Rectangle, combineMode As CombineMode) As Status
  Function SetClip(ByRef path As /*Const*/ GraphicsPath, combineMode As CombineMode) As Status
+
  Function SetClip(path As /*Const*/ GraphicsPath, combineMode As CombineMode) As Status
  Function SetClip(ByRef region As /*Const*/ Region, 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
 
  Function SetClip(hrgn As HRGN, combineMode As CombineMode) As Status
  
 
==== IntersectClip ====
 
==== IntersectClip ====
  Function IntersectClip(ByRef rc As /*Const*/ RectangleF) As Status
+
  Function IntersectClip(rc As /*Const*/ RectangleF) As Status
  Function IntersectClip(ByRef rc As /*Const*/ Rectangle) As Status
+
  Function IntersectClip(rc As /*Const*/ Rectangle) As Status
  Function IntersectClip(ByRef region As /*Const*/ Region) As Status
+
  Function IntersectClip(region As /*Const*/ Region) As Status
  
 
==== ExcludeClip ====
 
==== ExcludeClip ====
  Function ExcludeClip(ByRef rc As /*Const*/ RectangleF) As Status
+
  Function ExcludeClip(rc As /*Const*/ RectangleF) As Status
  Function ExcludeClip(ByRef rc As /*Const*/ Rectangle) As Status
+
  Function ExcludeClip(rc As /*Const*/ Rectangle) As Status
  Function ExcludeClip(ByRef region As /*Const*/ Region) As Status
+
  Function ExcludeClip(region As /*Const*/ Region) As Status
  
 
==== ResetClip ====
 
==== ResetClip ====
432行目: 430行目:
  
 
==== GetClip ====
 
==== GetClip ====
  Const Function GetClip(ByRef region As Region) As Status
+
  Const Function GetClip(region As Region) As Status
  
 
==== GetClipBounds ====
 
==== GetClipBounds ====
  Const Function GetClipBounds(ByRef rc As RectangleF) As Status
+
  Const Function GetClipBounds(rc As RectangleF) As Status
  Const Function GetClipBounds(ByRef rc As Rectangle) As Status
+
  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(ByRef pt As /*Const*/ Point) 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(x As Long, y As Long, width As Long, height As Long) As BOOL
  Const Function IsVisible(ByRef rc As /*Const*/ Rectangle) 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(x As Single, y As Single) As BOOL
  Const Function IsVisible(ByRef point As /*Const*/ PointF) 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(x As Single, y As Single, width As Single, height As Single) As BOOL
  Const Function IsVisible(ByRef rect As /*Const*/ RectangleF) As BOOL
+
  Const Function IsVisible(rect As /*Const*/ RectangleF) As BOOL
  
 
==== Save ====
 
==== Save ====
459行目: 457行目:
  
 
==== BeginContainer ====
 
==== BeginContainer ====
  Function BeginContainer(ByRef dstrect As /*Const*/ RectangleF, ByRef srcrect As /*Const*/ RectangleF, unit As GraphicsUnit) As GraphicsContainer
+
  Function BeginContainer(dstrect As /*Const*/ RectangleF, srcrect As /*Const*/ RectangleF, unit As GraphicsUnit) As GraphicsContainer
  Function BeginContainer(ByRef dstrect As /*Const*/ Rectangle, ByRef srcrect As /*Const*/ Rectangle, unit As GraphicsUnit) As GraphicsContainer
+
  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:Drawing 名前空間]]
+
[[Category:System.Drawing名前空間]]

2007年8月5日 (日) 12:01時点における版

Graphicsは、各種の描画を行うクラスです。

クラスの機能

プロパティ

Clip

描画領域を限定する領域を取得・設定します。

Const Function Clip() As Region
Sub Clip(region As /*Const*/ Region)

GetClip/SetClipを呼びます。

参考:Regionクラス

ClipBounds

描画領域を限定する領域に概説する四角形を取得・設定します。

Const Function ClipBounds() As RectangleF
Sub ClipBounds(rc As RectangleF)

GetClipBounds/SetClipBoundsを呼びます。

参考:RectangleFクラス

CompositingMode

描画方法を取得・設定します。

Function CompositingMode() As CompositingMode
Sub CompositingMode(mode As CompositingMode)

GetCompositingMode/SetCompositingModeを呼びます。

参考:CompositingMode列挙体

CompositingQuality

描画品質を取得・設定します。

Function CompositingQuality() As CompositingQuality
Sub CompositingQuality(cq As CompositingQuality)

GetCompositingQuality/SetCompositingQualityを呼びます。

参考:CompositingQuality列挙体

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を呼びます。

参考:InterpolationMode列挙体

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 クラスに存在するメソッド(オーバーロードされている場合はその全て)は、全て対応するものが存在しますが、一部はプロパティに分類されているものもあります(無論メソッドとして呼び出すことも可能です)。