![]() |
Re: Rectangle zwischen 2 Kästen entfernen
Wenn das der Strich vom Rectangle ist, dann müßtest du diesen Strich übermalen,
wobei es andersrum besser sein sollte, also das Rectangle ohne Rahmen zeichnen und "wenn keine Zelle, dann in dieser Richtung einen Strich zeichnen" > Canvas.MoveTo, Canvas.LineTo und Canvas.Pen.Color |
Re: Rectangle zwischen 2 Kästen entfernen
Delphi-Quellcode:
var
z: ZlBereich; s: SpBereich; x1, y1, x2, y2: Integer; lZelle, lZelleR, lZelleU: TObject; begin {erstmal komplett Schwarz} Canvas.Brush.Color := clBlack; Canvas.FillRect(Canvas.ClipRect); for z:=0 to zMax do begin for s:=0 to sMax do begin lZelle := lab.zelle[s,z]; x1 := xWert(s); y1 := yWert(z); x2 := xWert(s) + ZW; y2 := yWert(z) + ZW; if Assigned(lZelle) then Canvas.Brush.Color := clBtnFace // belegte Zelle else Canvas.Brush.Color := clGray; // nicht belegte Zelle Canvas.FillRect(Rect(x1, y1, x2, y2)); if Assigned(lZelle) then begin {Rand rechts übermalen} lZelleR := lab.zelle[s + 1, z]; if Assigned(lZelleR) then Canvas.FillRect(Rect(x2, y1, xWert(s + 1), y2)); {Rand unten übermalen} lZelleU := lab.zelle[s, z + 1]; if Assigned(lZelleU) then Canvas.FillRect(Rect(x1, y2, x2, yWert(z + 1))); {Ecke rechts/unten} if Assigned(lZelleR) and Assigned(lZelleU) and Assigned(lab.zelle[s + 1, z + 1]) then Canvas.FillRect(Rect(x2, y2, xWert(s + 1), yWert(z + 1))); end; end; end; end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:05 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz