Ignore:
Timestamp:
Jan 3, 2024, 4:53:46 PM (4 months ago)
Author:
chronos
Message:
  • Modified: Improved scaling of ImageOp_BCC procedure.
  • Fixed: Do not initialize City dialog on game closure.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/DpiControls/Dpi.Common.pas

    r514 r515  
    185185  DstWidth, DstHeight: Integer;
    186186  SrcWidth, SrcHeight: Integer;
    187   ReduceWidth, ReduceHeight: Integer;
    188187begin
    189188  {$IFDEF WINDOWS}
     
    198197  SrcWidth := ScaleToNativeDist(XSrc, Width);
    199198  SrcHeight := ScaleToNativeDist(YSrc, Height);
    200   if (Frac(ScaleFloatToNative(XSrc)) > 0) or
    201     (Frac(ScaleFloatToNative(X)) > 0) then ReduceWidth := 1
    202     else ReduceWidth := 0;
    203   if (Frac(ScaleFloatToNative(YSrc)) > 0) or
    204     (Frac(ScaleFloatToNative(Y)) > 0) then ReduceHeight := 1
    205     else ReduceHeight := 0;
    206199  if (DstWidth = SrcWidth) and (DstHeight = SrcHeight) then begin
    207200    Result := LCLIntf.BitBlt(DestDC, ScaleToNative(X), ScaleToNative(Y),
     
    210203  end else begin
    211204    Result := LCLIntf.BitBlt(DestDC, ScaleToNative(X), ScaleToNative(Y),
    212       DstWidth - ReduceWidth, DstHeight - ReduceHeight, SrcDC,
     205      SrcWidth, SrcHeight, SrcDC,
    213206      ScaleToNative(XSrc), ScaleToNative(YSrc), Rop);
    214207
     
    224217        ScaleToNative(XSrc), ScaleToNative(YSrc) + SrcHeight - (DstHeight - SrcHeight), Rop);
    225218    end;
    226 
    227219  {  Result := LCLIntf.StretchBlt(DestDC, ScaleToNative(X), ScaleToNative(Y),
    228220      DstWidth, DstHeight, SrcDC,
Note: See TracChangeset for help on using the changeset viewer.