C# と VB.NET の質問掲示板

わんくま同盟

ASP.NET、C++/CLI、Java 何でもどうぞ

C# と VB.NET の入門サイト

■103050 / 5階層)  反転カラーの使い方
□投稿者/ KOZ (441回)-(2024/04/08(Mon) 22:17:15)
2024/04/10(Wed) 04:59:11 編集(投稿者)
No103049 (ぴーよ さん) に返信
> Formのダブルバッファーを使うわけなので、
> GUIスレッドを使用しているのでしょうか?

マルチスレッドで使う場合は、BufferedGraphicsContext を作成してください。

Dim bmp As New Bitmap(bmpSize.Width, bmpSize.Height)
Using g = Graphics.FromImage(bmp)
    Dim dc = g.GetHdc()
    Using bufferContext As New BufferedGraphicsContext()
        Using bufferedGraphics = bufferContext.Allocate(dc, New Rectangle(Point.Empty, bmpSize))
            bufferedGraphics.Graphics.Clear(backColor) 
            DrawReversibleLine(bufferedGraphics.Graphics, ......
            bufferedGraphics.Render()
        End Using
    End Using
    g.ReleaseHdc()
End Using

編集キー/

前の記事(元になった記事) 次の記事(この記事の返信)
←Re[4]: 反転カラーの使い方 /ぴーよ →Re[6]: 反転カラーの使い方 /ぴーよ
 
上記関連ツリー

反転カラーの使い方 / ぴーよ (24/04/06(Sat) 13:07) #103043
Re[1]: 反転カラーの使い方 / ぴーよ (24/04/06(Sat) 17:46) #103045
│└ Re[2]: 反転カラーの使い方 / とっちゃん (24/04/06(Sat) 21:29) #103046
Re[1]: 反転カラーの使い方 / とっちゃん (24/04/06(Sat) 16:17) #103044
  └ Re[2]: 反転カラーの使い方 / ぴーよ (24/04/07(Sun) 12:17) #103047
    └ Re[3]: 反転カラーの使い方 / KOZ (24/04/07(Sun) 18:42) #103048
      └ Re[4]: 反転カラーの使い方 / ぴーよ (24/04/08(Mon) 20:51) #103049
        └ 反転カラーの使い方 / KOZ (24/04/08(Mon) 22:17) #103050 ←Now
          └ Re[6]: 反転カラーの使い方 / ぴーよ (24/04/09(Tue) 11:33) #103051 解決済み

上記ツリーを一括表示 / 上記ツリーをトピック表示
 
上記の記事へ返信