Changeset 468 for trunk/Packages/CevoComponents
- Timestamp:
- Dec 3, 2023, 11:28:08 AM (12 months ago)
- Location:
- trunk/Packages/CevoComponents
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/CevoComponents/Area.pas
r184 r468 4 4 5 5 uses 6 Classes, Graphics, Controls; 6 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls,{$ELSE} 7 Graphics, Controls,{$ENDIF} 8 Classes; 7 9 8 10 type -
trunk/Packages/CevoComponents/BaseWin.pas
r464 r468 4 4 5 5 uses 6 ScreenTools, LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, 7 DrawDlg; 6 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms,{$ELSE} 7 Graphics, Controls, Forms,{$ENDIF} 8 ScreenTools, LCLIntf, LCLType, SysUtils, Classes, DrawDlg, System.UITypes; 8 9 9 10 type … … 133 134 begin 134 135 if Key = VK_ESCAPE then begin 135 if fsModal in FormState then136 if TFormStateType.fsModal in FormState then 136 137 ModalResult := mrCancel; 137 138 end else 138 139 if Key = VK_RETURN then begin 139 if fsModal in FormState then140 if TFormStateType.fsModal in FormState then 140 141 ModalResult := mrOK; 141 142 end else … … 245 246 TexOverride := False; 246 247 ModalIndication := True; 247 Canvas.Brush.Style := bsClear;248 Canvas.Brush.Style := TBrushStyle.bsClear; 248 249 InnerWidth := Width - 2 * SideFrame; 249 250 InnerHeight := Height - TitleHeight - NarrowFrame; … … 479 480 Exit; 480 481 Offscreen := TBitmap.Create; 481 Offscreen.PixelFormat := pf24bit;482 Offscreen.PixelFormat := TPixelFormat.pf24bit; 482 483 if Screen.Height - yUnused < 480 then 483 484 Offscreen.SetSize(Screen.Width, 480) … … 485 486 Offscreen.SetSize(Screen.Width, Screen.Height - yUnused); 486 487 Offscreen.Canvas.FillRect(0, 0, Offscreen.Width, OffScreen.Height); 487 Offscreen.Canvas.Brush.Style := bsClear;488 Offscreen.Canvas.Brush.Style := TBrushStyle.bsClear; 488 489 end; 489 490 -
trunk/Packages/CevoComponents/ButtonA.pas
r431 r468 4 4 5 5 uses 6 ButtonBase, Classes, Graphics, LCLIntf, LCLType, ScreenTools, Types; 6 {$IFDEF DPI}Dpi.Graphics,{$ELSE}Graphics,{$ENDIF} 7 ButtonBase, Classes, LCLIntf, LCLType, ScreenTools, Types; 7 8 8 9 type … … 48 49 BitBltCanvas(Canvas, 0, 0, 100, 25, Graphic.Canvas, 195, 49 50 243 + 26 * Byte(Down)); 50 Canvas.Brush.Style := bsClear;51 Canvas.Brush.Style := TBrushStyle.bsClear; 51 52 TextSize := TextExtent(FCaption); 52 53 TextOut(50 - (TextSize.Width + 1) div 2, -
trunk/Packages/CevoComponents/ButtonB.pas
r462 r468 4 4 5 5 uses 6 ButtonBase, Classes, Graphics, LCLIntf, LCLType; 6 {$IFDEF DPI}Dpi.Graphics,{$ELSE}Graphics,{$ENDIF} 7 ButtonBase, Classes, LCLIntf, LCLType; 7 8 8 9 type -
trunk/Packages/CevoComponents/ButtonBase.pas
r464 r468 4 4 5 5 uses 6 Classes, Graphics, Controls; 6 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls,{$ELSE} 7 Graphics, Controls,{$ENDIF} 8 Classes; 7 9 8 10 type … … 84 86 DownChangedProc(self); 85 87 end; 86 if (Button = mbLeft) and (@ClickProc <> nil) then88 if (Button = TMouseButton.mbLeft) and (@ClickProc <> nil) then 87 89 ClickProc(self); 88 90 end -
trunk/Packages/CevoComponents/ButtonN.pas
r447 r468 4 4 5 5 uses 6 Classes, Graphics, Controls, LCLIntf, LCLType, ScreenTools; 6 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls,{$ELSE}Graphics, Controls,{$ENDIF} 7 Classes, LCLIntf, LCLType, ScreenTools; 7 8 8 9 type … … 85 86 X, Y: Integer); 86 87 begin 87 if FPossible and (Button = mbLeft) and (@ChangeProc <> nil) then88 if FPossible and (Button = TMouseButton.mbLeft) and (@ChangeProc <> nil) then 88 89 ChangeProc(Self); 89 90 end; -
trunk/Packages/CevoComponents/CevoComponents.lpk
r456 r468 112 112 </Files> 113 113 <CompatibilityMode Value="True"/> 114 <RequiredPkgs Count=" 3">114 <RequiredPkgs Count="4"> 115 115 <Item1> 116 <PackageName Value=" Common"/>116 <PackageName Value="DpiControls"/> 117 117 </Item1> 118 118 <Item2> 119 <PackageName Value=" LCL"/>119 <PackageName Value="Common"/> 120 120 </Item2> 121 121 <Item3> 122 <PackageName Value="LCL"/> 123 </Item3> 124 <Item4> 122 125 <PackageName Value="FCL"/> 123 </Item 3>126 </Item4> 124 127 </RequiredPkgs> 125 128 <UsageOptions> -
trunk/Packages/CevoComponents/DrawDlg.pas
r460 r468 4 4 5 5 uses 6 Classes, SysUtils, Forms, LCLIntf, LCLType, {$IFDEF UNIX}LMessages,{$ENDIF} 6 {$IFDEF DPI}Dpi.Forms, Dpi.Common,{$ELSE} 7 Forms,{$ENDIF} 8 Classes, SysUtils, LCLIntf, LCLType, {$IFDEF UNIX}LMessages,{$ENDIF} 7 9 Messages, Graphics, Controls, ButtonBase, ButtonA, ButtonB, Area, ScreenTools 8 10 {$IFDEF LCLGTK2}, Gtk2Globals{$ENDIF}; -
trunk/Packages/CevoComponents/EOTButton.pas
r447 r468 4 4 5 5 uses 6 ButtonBase, Classes, SysUtils, Graphics, LCLIntf, LCLType; 6 {$IFDEF DPI}Dpi.Graphics,{$ELSE}Graphics,{$ENDIF} 7 ButtonBase, Classes, SysUtils, LCLIntf, LCLType; 7 8 8 9 const … … 53 54 inherited; 54 55 Buffer := TBitmap.Create; 55 Buffer.PixelFormat := pf24bit;56 Buffer.PixelFormat := TPixelFormat.pf24bit; 56 57 Buffer.SetSize(48, 48); 57 58 Buffer.Canvas.FillRect(0, 0, Buffer.Width, Buffer.Height); 58 59 Back := TBitmap.Create; 59 Back.PixelFormat := pf24bit;60 Back.PixelFormat := TPixelFormat.pf24bit; 60 61 Back.SetSize(48, 48); 61 62 Back.Canvas.FillRect(0, 0, Back.Width, Back.Height); -
trunk/Packages/CevoComponents/GraphicSet.pas
r464 r468 4 4 5 5 uses 6 Classes, SysUtils, Graphics, Generics.Collections, LCLType, DOM, 6 {$IFDEF DPI}Dpi.Graphics,{$ELSE} 7 Graphics,{$ENDIF} 8 Classes, SysUtils, Generics.Collections, LCLType, DOM, 7 9 XMLRead, XMLWrite, XML; 8 10 … … 228 230 begin 229 231 Data := TBitmap.Create; 230 Data.PixelFormat := pf24bit;232 Data.PixelFormat := TPixelFormat.pf24bit; 231 233 Mask := TBitmap.Create; 232 Mask.PixelFormat := pf24bit;234 Mask.PixelFormat := TPixelFormat.pf24bit; 233 235 Items := TGraphicSetItems.Create; 234 236 Items.GraphicSet := Self; -
trunk/Packages/CevoComponents/ScreenTools.pas
r456 r468 7 7 Windows, 8 8 {$ENDIF} 9 StringTables, LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Math, 10 Forms, Menus, GraphType, GraphicSet, LazFileUtils, Texture; 9 StringTables, LCLIntf, LCLType, SysUtils, Classes, Math, 10 GraphType, GraphicSet, LazFileUtils, Texture, 11 {$IFDEF DPI}Dpi.Forms, Dpi.Menus, Dpi.Graphics, Dpi.Controls, Dpi.Common{$ELSE} 12 Forms, Menus, Graphics, Controls{$ENDIF}; 11 13 12 14 type … … 96 98 procedure Texturize(Dest, Texture: TBitmap; TransparentColor: Cardinal); 97 99 procedure DarkenImage(Bitmap: TBitmap; Change: Integer); 100 {$IFNDEF DPI} 98 101 function ScaleToNative(Value: Integer): Integer; 99 102 function ScaleFromNative(Value: Integer): Integer; 103 {$ENDIF} 100 104 procedure UnshareBitmap(Bitmap: TBitmap); 101 105 procedure Gtk2Fix; … … 199 203 200 204 uses 201 Directories, Sound, PixelPointer; 205 {$IFDEF DPI}Dpi.PixelPointer,{$ELSE}PixelPointer,{$ENDIF} 206 Directories, Sound; 202 207 203 208 var … … 419 424 Jpeg.LoadFromFile(FileName); 420 425 if not (gfNoGamma in Options) then 421 Bmp.PixelFormat := pf24bit;426 Bmp.PixelFormat := TPixelFormat.pf24bit; 422 427 Bmp.SetSize(Jpeg.Width, Jpeg.Height); 423 428 Bmp.Canvas.Draw(0, 0, Jpeg); … … 434 439 Png.LoadFromFile(FileName); 435 440 if not (gfNoGamma in Options) then 436 Bmp.PixelFormat := pf24bit;441 Bmp.PixelFormat := TPixelFormat.pf24bit; 437 442 Bmp.SetSize(Png.Width, Png.Height); 438 443 if (Png.RawImage.Description.Format = ricfGray) then 439 444 begin 440 445 // LCL doesn't support 8-bit colors properly. Use 24-bit instead. 441 Bmp.PixelFormat := pf24bit;446 Bmp.PixelFormat := TPixelFormat.pf24bit; 442 447 CopyGray8BitTo24bitBitmap(Bmp, Png); 443 448 end … … 454 459 Bmp.LoadFromFile(FileName); 455 460 if not (gfNoGamma in Options) then 456 Bmp.PixelFormat := pf24bit;461 Bmp.PixelFormat := TPixelFormat.pf24bit; 457 462 Result := True; 458 463 except … … 634 639 Height := ScaleToNative(Height); 635 640 //Assert(Src.PixelFormat = pf8bit); 636 Assert(dst.PixelFormat = pf24bit);641 Assert(dst.PixelFormat = TPixelFormat.pf24bit); 637 642 if xDst < 0 then begin 638 643 Width := Width + xDst; … … 821 826 Height := ScaleToNative(Height); 822 827 bmp.BeginUpdate; 823 Assert(bmp.PixelFormat = pf24bit);828 Assert(bmp.PixelFormat = TPixelFormat.pf24bit); 824 829 Height := Y + Height; 825 830 PixelPtr := TPixelPointer.Create(Bmp, X, Y); … … 1524 1529 Brush.Color := $000000; 1525 1530 FillRect(Rect(X + Pos + abs(Growth), Y, X + Max, Y + 7)); 1526 Brush.Style := bsClear;1531 Brush.Style := TBrushStyle.bsClear; 1527 1532 end; 1528 1533 end; … … 1627 1632 end; 1628 1633 1634 {$IFNDEF DPI} 1629 1635 function ScaleToNative(Value: Integer): Integer; 1630 1636 begin … … 1636 1642 Result := Value; 1637 1643 end; 1644 {$ENDIF} 1638 1645 1639 1646 procedure UnshareBitmap(Bitmap: TBitmap); … … 1691 1698 Size := Size * 10 + Byte(S[I]) - 48; 1692 1699 'B', 'b': 1693 UniFont[section].Style := UniFont[section].Style + [ fsBold];1700 UniFont[section].Style := UniFont[section].Style + [TFontStyle.fsBold]; 1694 1701 'I', 'i': 1695 UniFont[section].Style := UniFont[section].Style + [ fsItalic];1702 UniFont[section].Style := UniFont[section].Style + [TFontStyle.fsItalic]; 1696 1703 end; 1697 UniFont[section].Size := Round(Size * 72/ UniFont[section].PixelsPerInch);1704 UniFont[section].Size := Round(Size * ScaleToNative(72) / UniFont[section].PixelsPerInch); 1698 1705 end; 1699 1706 end; … … 1783 1790 1784 1791 Colors := TBitmap.Create; 1785 Colors.PixelFormat := pf24bit;1792 Colors.PixelFormat := TPixelFormat.pf24bit; 1786 1793 Paper := TBitmap.Create; 1787 Paper.PixelFormat := pf24bit;1794 Paper.PixelFormat := TPixelFormat.pf24bit; 1788 1795 BigImp := TBitmap.Create; 1789 BigImp.PixelFormat := pf24bit;1796 BigImp.PixelFormat := TPixelFormat.pf24bit; 1790 1797 MainTexture := TTexture.Create; 1791 1798 ClickFrameColor := HGrSystem.Data.Canvas.Pixels[187, 175]; … … 1796 1803 1797 1804 LogoBuffer := TBitmap.Create; 1798 LogoBuffer.PixelFormat := pf24bit;1805 LogoBuffer.PixelFormat := TPixelFormat.pf24bit; 1799 1806 LogoBuffer.SetSize(BigBook.Width, BigBook.Height); 1800 1807 end; -
trunk/Packages/CevoComponents/Texture.pas
r456 r468 4 4 5 5 uses 6 Classes, SysUtils, Graphics; 6 {$IFDEF DPI}Dpi.Graphics,{$ELSE}Graphics,{$ENDIF} 7 Classes, SysUtils; 7 8 8 9 type
Note:
See TracChangeset
for help on using the changeset viewer.