Changeset 565 for trunk/Packages/CevoComponents
- Timestamp:
- May 1, 2024, 12:08:20 PM (8 months ago)
- Location:
- trunk/Packages/CevoComponents
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/CevoComponents/DrawDlg.pas
r554 r565 21 21 procedure DoDeactivate(Sender: TObject); 22 22 protected 23 // Defines area to grip the window for moving (from top) 23 24 TitleHeight: Integer; 24 // defines area to grip the window for moving (from top)25 25 procedure InitButtons; 26 26 procedure OnEraseBkgnd(var Msg: TMessage); message WM_ERASEBKGND; … … 237 237 procedure TDrawDlg.SmartInvalidate; 238 238 var 239 i: Integer; 240 r0, r1: HRgn; 241 begin 242 r0 := CreateRectRgn(0, 0, Width, Height); 243 for i := 0 to ControlCount - 1 do 244 if not (Controls[i] is TArea) and Controls[i].Visible then 245 begin 246 with Controls[i].BoundsRect do 247 r1 := CreateRectRgn(Left, Top, Right, Bottom); 248 CombineRgn(r0, r0, r1, RGN_DIFF); 249 DeleteObject(r1); 250 end; 251 InvalidateRgn(Handle, r0, False); 252 DeleteObject(r0); 239 I: Integer; 240 R0, R1: HRgn; 241 begin 242 R0 := CreateRectRgn(0, 0, Width, Height); 243 for I := 0 to ControlCount - 1 do 244 if not (Controls[I] is TArea) and Controls[I].Visible then begin 245 with Controls[I].BoundsRect do 246 R1 := CreateRectRgn(Left, Top, Right, Bottom); 247 CombineRgn(R0, R0, R1, RGN_DIFF); 248 DeleteObject(R1); 249 end; 250 InvalidateRgn(Handle, R0, False); 251 DeleteObject(R0); 253 252 end; 254 253 … … 272 271 begin 273 272 if csDesigning in ComponentState then Exit; 274 PaintBackground( Self, 3 + Border, 3 + Border, Width - (6 + 2 * Border),275 Height - (6 + 2 * Border) );273 PaintBackground(Canvas, 3 + Border, 3 + Border, Width - (6 + 2 * Border), 274 Height - (6 + 2 * Border), Width, Height); 276 275 for I := 0 to Border do 277 Frame(Canvas, I, I, Width - 1 - I, Height - 1 - I, 278 $000000, $000000); 276 Frame(Canvas, I, I, Width - 1 - I, Height - 1 - I, $000000, $000000); 279 277 Frame(Canvas, Border + 1, Border + 1, Width - (2 + Border), 280 278 Height - (2 + Border), MainTexture.ColorBevelLight, -
trunk/Packages/CevoComponents/ScreenTools.pas
r548 r565 75 75 procedure FillRectSeamless(Canvas: TCanvas; x0, y0, x1, y1, xOffset, yOffset: Integer; 76 76 const Texture: TBitmap); 77 procedure PaintBackground(Form: TForm; Left, Top, Width, Height: Integer); 77 procedure PaintBackground(Canvas: TCanvas; Left, Top, Width, Height, FormWidth, 78 FormHeight: Integer); 78 79 procedure Corner(Canvas: TCanvas; X, Y, Kind: Integer; T: TTexture); 79 80 procedure BiColorTextOut(Canvas: TCanvas; clMain, clBack: TColor; X, Y: Integer; S: string); … … 1202 1203 end; 1203 1204 1204 procedure PaintBackground(Form: TForm; Left, Top, Width, Height: Integer); 1205 begin 1206 Fill(Form.Canvas, Left, Top, Width, Height, (MainTexture.Width - Form.ClientWidth) div 1207 2, (MainTexture.Height - Form.ClientHeight) div 2); 1205 procedure PaintBackground(Canvas: TCanvas; Left, Top, Width, Height, FormWidth, 1206 FormHeight: Integer); 1207 begin 1208 Fill(Canvas, Left, Top, Width, Height, (MainTexture.Width - FormWidth) div 1209 2, (MainTexture.Height - FormHeight) div 2); 1208 1210 end; 1209 1211
Note:
See TracChangeset
for help on using the changeset viewer.