Changeset 178 for branches/highdpi/Packages/CevoComponents/EOTButton.pas
- Timestamp:
- Jun 23, 2019, 3:15:29 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/Packages/CevoComponents/EOTButton.pas
r165 r178 4 4 5 5 uses 6 ButtonBase, Classes, SysUtils, Graphics, LCLIntf, LCLType ;6 ButtonBase, Classes, SysUtils, Graphics, LCLIntf, LCLType, UDpiControls; 7 7 8 8 const … … 19 19 destructor Destroy; override; 20 20 procedure SetButtonIndexFast(x: integer); 21 procedure SetBack(ca: T Canvas; x, y: integer);21 procedure SetBack(ca: TDpiCanvas; x, y: integer); 22 22 private 23 FTemplate: T Bitmap;23 FTemplate: TDpiBitmap; 24 24 FIndex: integer; 25 25 procedure SetIndex(x: integer); 26 26 public 27 property Template: T Bitmap read FTemplate write FTemplate;27 property Template: TDpiBitmap read FTemplate write FTemplate; 28 28 published 29 29 property Visible; … … 31 31 property OnClick; 32 32 protected 33 Buffer, Back: T Bitmap;33 Buffer, Back: TDpiBitmap; 34 34 procedure Paint; override; 35 35 end; … … 41 41 procedure Register; 42 42 begin 43 RegisterComponents(' C-evo', [TEOTButton]);43 RegisterComponents('Samples', [TEOTButton]); 44 44 end; 45 45 46 procedure ImageOp_CBC(Dst, Src: T Bitmap; xDst, yDst, xSrc, ySrc, w, h, Color0,46 procedure ImageOp_CBC(Dst, Src: TDpiBitmap; xDst, yDst, xSrc, ySrc, w, h, Color0, 47 47 Color2: integer); 48 48 // Src is template … … 99 99 begin 100 100 inherited; 101 Buffer := T Bitmap.Create;101 Buffer := TDpiBitmap.Create; 102 102 Buffer.PixelFormat := pf24bit; 103 103 Buffer.SetSize(48, 48); 104 104 Buffer.Canvas.FillRect(0, 0, Buffer.Width, Buffer.Height); 105 Back := T Bitmap.Create;105 Back := TDpiBitmap.Create; 106 106 Back.PixelFormat := pf24bit; 107 107 Back.SetSize(48, 48); … … 162 162 end; 163 163 164 procedure TEOTButton.SetBack(ca: T Canvas; x, y: integer);164 procedure TEOTButton.SetBack(ca: TDpiCanvas; x, y: integer); 165 165 begin 166 166 BitBlt(Back.Canvas.Handle, 0, 0, 48, 48, ca.Handle, x, y, SRCCOPY);
Note:
See TracChangeset
for help on using the changeset viewer.