掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
四角形の中に線をいれ分割したい (ID:37256)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
6色巡りパターン。 procedure DrawManyRects(iCount: integer); var k, iUnit, iColor: integer; begin if iCount<1 then exit; iUnit:=512 div iCount; with Form1.PaintBox1.Canvas do for k:=0 to iCount-1 do begin iColor:=k mod 6; case iColor of 0:Brush.Color:=clBlue; 1:Brush.Color:=clYellow; 2:Brush.Color:=clRed; 3:Brush.Color:=clLime; 4:Brush.Color:=clAqua; 5:Brush.Color:=clWhite; end; Pen.Color:=Brush.Color; Rectangle(iUnit*k, 0, iUnit*(k+1), 100); end end; こんな感じで。
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.