Ignore:
Timestamp:
Jun 25, 2020, 10:24:44 PM (4 years ago)
Author:
chronos
Message:
  • Fixed: Scaling IsoEngine ForgOfWar sprites.
  • Fixed: PopupMenu position calculated using not scaled GetSystemMetrics.
  • Fixed: Scale TDpiBitmaps using normal scaling functions to get pixels on valid expected possition.
  • Fixed: DpiBitBlt needs to be executed as StretchDraw for non-integer pixel scaling. This leads to slower drawing.
File:
1 edited

Legend:

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

    r251 r265  
    589589  PixelDst: TPixelPointer;
    590590begin
     591  Width := ScaleToNativeDist(xSrc, Width);
     592  Height := ScaleToNativeDist(ySrc, Height);
    591593  xDst := ScaleToNative(xDst);
    592594  yDst := ScaleToNative(yDst);
    593595  xSrc := ScaleToNative(xSrc);
    594596  ySrc := ScaleToNative(ySrc);
    595   Width := ScaleToNative(Width);
    596   Height := ScaleToNative(Height);
    597597  //Assert(Src.PixelFormat = pf8bit);
    598598  Assert(dst.PixelFormat = pf24bit);
     
    657657  DstPixel: TPixelPointer;
    658658begin
     659  Width := ScaleToNativeDist(xSrc, Width);
     660  Height := ScaleToNativeDist(ySrc, Height);
    659661  xDst := ScaleToNative(xDst);
    660662  yDst := ScaleToNative(yDst);
    661663  xSrc := ScaleToNative(xSrc);
    662664  ySrc := ScaleToNative(ySrc);
    663   Width := ScaleToNative(Width);
    664   Height := ScaleToNative(Height);
    665665  if xDst < 0 then begin
    666666    Width := Width + xDst;
     
    724724  DstPixel: TPixelPointer;
    725725begin
     726  Width := ScaleToNativeDist(xSrc, Width);
     727  Height := ScaleToNativeDist(ySrc, Height);
    726728  xDst := ScaleToNative(xDst);
    727729  yDst := ScaleToNative(yDst);
    728730  xSrc := ScaleToNative(xSrc);
    729731  ySrc := ScaleToNative(ySrc);
    730   Width := ScaleToNative(Width);
    731   Height := ScaleToNative(Height);
    732732  Src.BeginUpdate;
    733733  Dst.BeginUpdate;
     
    771771  PixelPtr: TPixelPointer;
    772772begin
     773  Width := ScaleToNativeDist(X, Width);
     774  Height := ScaleToNativeDist(Y, Height);
    773775  X := ScaleToNative(X);
    774776  Y := ScaleToNative(Y);
    775   Width := ScaleToNative(Width);
    776   Height := ScaleToNative(Height);
    777777  bmp.BeginUpdate;
    778778  assert(bmp.PixelFormat = pf24bit);
Note: See TracChangeset for help on using the changeset viewer.