Search Results for

    Show / Hide Table of Contents

    Class OTZGraphics

    グラフィック(GDI/GDI+)関連の機能を提供します。

    Inheritance
    System.Object
    OTZGraphics
    名前空間: OTZControls.Utilities
    アセンブリ: OTZControls.dll
    Syntax
    public class OTZGraphics : IDisposable

    コンストラクタ

    OTZGraphics(IntPtr)

    コンストラクタ

    宣言
    public OTZGraphics(IntPtr handle)
    パラメーター
    型 名前 説明
    IntPtr handle

    ウィンドウハンドル。

    OTZGraphics(IntPtr, Font)

    コンストラクタ

    宣言
    public OTZGraphics(IntPtr handle, Font font)
    パラメーター
    型 名前 説明
    IntPtr handle

    ウィンドウハンドル。

    Font font

    フォント。

    OTZGraphics(IntPtr, Font, Boolean)

    コンストラクタ

    宣言
    public OTZGraphics(IntPtr hDc, Font font, bool isCustomMode)
    パラメーター
    型 名前 説明
    IntPtr hDc

    デバイスコンテキスト。

    Font font

    フォントハンドル。

    System.Boolean isCustomMode

    プロパティ

    BackColor

    背景色を取得または設定します。

    宣言
    public Color BackColor { set; }
    プロパティ値
    型 説明
    Color

    Font

    フォントを設定します。

    宣言
    public Font Font { get; set; }
    プロパティ値
    型 説明
    Font

    FontStyle

    フォントスタイルを設定します。

    宣言
    public FontStyle FontStyle { set; }
    プロパティ値
    型 説明
    FontStyle

    HDc

    宣言
    public IntPtr HDc { get; }
    プロパティ値
    型 説明
    IntPtr

    NullBrush

    空のブラシを取得します。

    宣言
    public IntPtr NullBrush { get; }
    プロパティ値
    型 説明
    IntPtr

    NullPen

    空のペンを取得します。

    宣言
    public IntPtr NullPen { get; }
    プロパティ値
    型 説明
    IntPtr

    PaintRectangle

    宣言
    public Rectangle PaintRectangle { get; }
    プロパティ値
    型 説明
    Rectangle

    PenColor

    線の色を取得または設定します。

    宣言
    public Color PenColor { get; set; }
    プロパティ値
    型 説明
    Color

    TextColor

    文字色を取得または設定します。

    宣言
    public Color TextColor { set; }
    プロパティ値
    型 説明
    Color

    メソッド

    BeginPaint()

    描画を開始します。

    宣言
    public void BeginPaint()

    BeginPaint(Rectangle, Boolean)

    描画を開始します。

    宣言
    public void BeginPaint(Rectangle paintRectangle, bool doubleBuffer)
    パラメーター
    型 名前 説明
    Rectangle paintRectangle

    描画範囲。

    System.Boolean doubleBuffer

    ダブルバッファを利用するかどうか。

    CreateTranslucentImage(Image, Single)

    指定された画像を指定された透明度で作成します。

    宣言
    public static Image CreateTranslucentImage(Image image, float alpha)
    パラメーター
    型 名前 説明
    Image image

    元の画像。

    System.Single alpha

    透明度。

    戻り値
    型 説明
    Image

    作成後の画像。

    Dispose()

    リソースを解放します。

    宣言
    public void Dispose()

    DrawIcon(Int32, Int32, IntPtr)

    アイコンを描画します。

    宣言
    public bool DrawIcon(int x, int y, IntPtr hIcon)
    パラメーター
    型 名前 説明
    System.Int32 x
    System.Int32 y
    IntPtr hIcon
    戻り値
    型 説明
    System.Boolean

    DrawImage(IntPtr, Int32, Int32, Int32)

    イメージリストのイメージを描画します。

    宣言
    public bool DrawImage(IntPtr handle, int x, int y, int index)
    パラメーター
    型 名前 説明
    IntPtr handle
    System.Int32 x
    System.Int32 y
    System.Int32 index
    戻り値
    型 説明
    System.Boolean

    DrawImage(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, IntPtr, Byte)

    イメージを描画します。

    宣言
    public void DrawImage(int x1, int y1, int width1, int height1, int x2, int y2, int width2, int height2, IntPtr image, byte alpha)
    パラメーター
    型 名前 説明
    System.Int32 x1
    System.Int32 y1
    System.Int32 width1
    System.Int32 height1
    System.Int32 x2
    System.Int32 y2
    System.Int32 width2
    System.Int32 height2
    IntPtr image
    System.Byte alpha

    DrawLine(Int32, Int32, Int32, Int32)

    宣言
    public void DrawLine(int x1, int y1, int x2, int y2)
    パラメーター
    型 名前 説明
    System.Int32 x1
    System.Int32 y1
    System.Int32 x2
    System.Int32 y2

    DrawLines(List<POINT>)

    線を描画します。

    宣言
    public void DrawLines(List<POINT> points)
    パラメーター
    型 名前 説明
    List<POINT> points

    DrawLines(List<POINT>, List<Int32>)

    線を描画します。

    宣言
    public void DrawLines(List<POINT> points, List<int> polyPoints)
    パラメーター
    型 名前 説明
    List<POINT> points
    List<System.Int32> polyPoints

    DrawLines(POINT[])

    線を描画します。

    宣言
    public void DrawLines(POINT[] points)
    パラメーター
    型 名前 説明
    POINT[] points

    DrawLines(POINT[], Int32[])

    線を描画します。

    宣言
    public void DrawLines(POINT[] points, int[] polyPoints)
    パラメーター
    型 名前 説明
    POINT[] points
    System.Int32[] polyPoints

    DrawPolygon(POINT[], FillMode)

    多角形を描画します。

    宣言
    public void DrawPolygon(POINT[] points, FillMode mode)
    パラメーター
    型 名前 説明
    POINT[] points
    System.Drawing.Drawing2D.FillMode mode

    DrawRectangle(Rectangle)

    四角形を描画します。

    宣言
    public void DrawRectangle(Rectangle rect)
    パラメーター
    型 名前 説明
    Rectangle rect

    DrawRectangle(Int32, Int32, Int32, Int32)

    四角形を描画します。

    宣言
    public void DrawRectangle(int x, int y, int width, int height)
    パラメーター
    型 名前 説明
    System.Int32 x
    System.Int32 y
    System.Int32 width
    System.Int32 height

    DrawText(Int32, Int32, Int32, Rectangle, String, Int32[])

    文字を描画します。

    宣言
    public void DrawText(int x, int y, int options, Rectangle rec, string text, int[] lpDX)
    パラメーター
    型 名前 説明
    System.Int32 x
    System.Int32 y
    System.Int32 options
    Rectangle rec
    System.String text
    System.Int32[] lpDX

    DrawText(Int32, Int32, String)

    文字を描画します。

    宣言
    public void DrawText(int x, int y, string text)
    パラメーター
    型 名前 説明
    System.Int32 x
    System.Int32 y
    System.String text

    EndPaint()

    描画を終了します。

    宣言
    public void EndPaint()

    EndPaint(Boolean)

    描画を終了します。

    宣言
    public void EndPaint(bool isColorInvert)
    パラメーター
    型 名前 説明
    System.Boolean isColorInvert

    反転する場合、true しない場合、false

    EndPaint(Int32)

    宣言
    public void EndPaint(int type)
    パラメーター
    型 名前 説明
    System.Int32 type

    FillRectangle(Rectangle)

    塗り潰した四角形を描画します。

    宣言
    public void FillRectangle(Rectangle rec)
    パラメーター
    型 名前 説明
    Rectangle rec

    FillRectangle(Int32, Int32, Int32, Int32)

    四角形を塗りつぶします。

    宣言
    public void FillRectangle(int x, int y, int width, int height)
    パラメーター
    型 名前 説明
    System.Int32 x
    System.Int32 y
    System.Int32 width
    System.Int32 height

    MeasureText(String)

    文字列の幅を計測します。

    宣言
    public Size MeasureText(string text)
    パラメーター
    型 名前 説明
    System.String text
    戻り値
    型 説明
    Size

    PatBlt(Int32, Int32, Int32, Int32, UInt32)

    指定されたデバイスコンテキストで現在選択されているブラシを使って、 指定された長方形を描画します。指定されたラスタオペレーションを使って、 ブラシの色と、サーフェスの 1 つまたは複数の色を組み合わせます。

    宣言
    public void PatBlt(int x, int y, int width, int height, uint opt)
    パラメーター
    型 名前 説明
    System.Int32 x

    塗りつぶす四角形の左上隅の x 座標 (論理単位)。

    System.Int32 y

    塗りつぶす四角形の左上隅の y 座標 (論理単位)。

    System.Int32 width

    四角形の幅 (論理単位)。

    System.Int32 height

    四角形の高さ (論理単位)。

    System.UInt32 opt

    ラスター演算コード。 このコードには、次のいずれかの値を指定できます。

    RoundRect(Int32, Int32, Int32, Int32, Int32, Int32)

    角の丸い長方形を 1 個描画します。現在のペンを使って角の丸い長方形を描画し、 現在のブラシを使って塗りつぶします。

    宣言
    public void RoundRect(int x, int y, int right, int bottom, int width = 10, int height = 10)
    パラメーター
    型 名前 説明
    System.Int32 x

    四角形の左上隅の x 座標 (論理座標)。

    System.Int32 y

    四角形の左上隅の y 座標 (論理座標)。

    System.Int32 right

    四角形の右下隅の x 座標 (論理座標)。

    System.Int32 bottom

    四角形の右下隅の y 座標 (論理座標)。

    System.Int32 width

    丸められた角を描画するために使用される楕円の幅 (論理座標)。

    System.Int32 height

    丸められた角を描画するために使用される楕円の高さ (論理座標)。

    SetClip(OTZRectangles)

    現在のクリッピングリージョンとして選択します。

    宣言
    public void SetClip(OTZRectangles clipRects)
    パラメーター
    型 名前 説明
    OTZRectangles clipRects

    SetClip(Rectangle)

    現在のクリッピングリージョンとして選択します。

    宣言
    public void SetClip(Rectangle clipRect)
    パラメーター
    型 名前 説明
    Rectangle clipRect

    SetTextAlign(Boolean)

    宣言
    public void SetTextAlign(bool isRight)
    パラメーター
    型 名前 説明
    System.Boolean isRight
    In This Article
    Back to top Generated by DocFX