Ignore:
Timestamp:
Nov 29, 2023, 2:35:44 PM (12 months ago)
Author:
chronos
Message:
  • Modified: HighDpi branch updated to trunk version.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/highdpi/Packages/CevoComponents/EOTButton.pas

    r349 r463  
    1919    constructor Create(aOwner: TComponent); override;
    2020    destructor Destroy; override;
    21     procedure SetButtonIndexFast(x: integer);
    22     procedure SetBack(ca: TDpiCanvas; x, y: integer);
     21    procedure SetButtonIndexFast(X: Integer);
     22    procedure SetBack(ca: TDpiCanvas; X, Y: Integer);
    2323  private
    2424    FTemplate: TDpiBitmap;
    25     FIndex: integer;
    26     procedure SetIndex(x: integer);
     25    FIndex: Integer;
     26    procedure SetIndex(X: Integer);
    2727  public
    2828    property Template: TDpiBitmap read FTemplate write FTemplate;
    2929  published
    3030    property Visible;
    31     property ButtonIndex: integer read FIndex write SetIndex;
     31    property ButtonIndex: Integer read FIndex write SetIndex;
    3232    property OnClick;
    3333  protected
     
    6060  Back.SetSize(48, 48);
    6161  Back.Canvas.FillRect(0, 0, Back.Width, Back.Height);
    62   ShowHint := true;
     62  ShowHint := True;
    6363  SetBounds(0, 0, 48, 48);
    6464end;
     
    7676    if FGraphic <> nil then begin
    7777      UnshareBitmap(Buffer);
    78       DpiBitCanvas(Buffer.Canvas, 0, 0, 48, 48, Back.Canvas, 0, 0);
     78      DpiBitBltCanvas(Buffer.Canvas, 0, 0, 48, 48, Back.Canvas, 0, 0);
    7979      ImageOp_CBC(Buffer, Template, 0, 0, 133, 149 + 48 * Byte(FDown), 48, 48,
    8080        $000000, $FFFFFF);
     
    8282        ImageOp_CBC(Buffer, Template, 8, 8, 1 + 32 * Byte(FIndex), 246, 32, 32,
    8383          $000000, $FFFFFF);
    84       DpiBitCanvas(Canvas, 0, 0, 48, 48, Buffer.Canvas, 0, 0);
     84      DpiBitBltCanvas(Canvas, 0, 0, 48, 48, Buffer.Canvas, 0, 0);
    8585    end else begin
    8686      Brush.Color := $0000FF;
     
    8989end;
    9090
    91 procedure TEOTButton.SetIndex(x: integer);
     91procedure TEOTButton.SetIndex(X: Integer);
    9292begin
    93   if x <> FIndex then begin
    94     FIndex := x;
     93  if X <> FIndex then begin
     94    FIndex := X;
    9595    Invalidate;
    9696  end;
    9797end;
    9898
    99 procedure TEOTButton.SetButtonIndexFast(x: integer);
     99procedure TEOTButton.SetButtonIndexFast(X: Integer);
    100100begin
    101   if Visible and (x <> FIndex) then begin
    102     FIndex := x;
     101  if Visible and (X <> FIndex) then begin
     102    FIndex := X;
    103103    try
    104104      Paint;
     
    108108end;
    109109
    110 procedure TEOTButton.SetBack(ca: TDpiCanvas; x, y: integer);
     110procedure TEOTButton.SetBack(ca: TDpiCanvas; X, Y: Integer);
    111111begin
    112   DpiBitCanvas(Back.Canvas, 0, 0, 48, 48, ca, x, y);
     112  DpiBitBltCanvas(Back.Canvas, 0, 0, 48, 48, ca, X, Y);
    113113end;
    114114
Note: See TracChangeset for help on using the changeset viewer.