Ignore:
Timestamp:
May 21, 2020, 8:17:38 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Update from trunk rev 245.
  • Modified: Vcl prefix/suffix changed to Native.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/highdpi/LocalPlayer/IsoEngine.pas

    r212 r246  
    10151015            1 + 8 * (xxt * 2 + 1), 1 + yyt + 16 * (yyt * 3 + 1));
    10161016          Borders.BeginUpdate;
    1017           PixelPtr := PixelPointer(Borders, ScaleToVcl(0), ScaleToVcl(p1 * (yyt * 2)));
    1018           for dy := 0 to ScaleToVcl(yyt * 2) - 1 do begin
    1019             for dx := 0 to ScaleToVcl(xxt * 2) - 1 do begin
     1017          PixelPtr := PixelPointer(Borders, ScaleToNative(0), ScaleToNative(p1 * (yyt * 2)));
     1018          for dy := 0 to ScaleToNative(yyt * 2) - 1 do begin
     1019            for dx := 0 to ScaleToNative(xxt * 2) - 1 do begin
    10201020              if PixelPtr.Pixel^.B = 99 then begin
    10211021                PixelPtr.Pixel^.B := Tribe[p1].Color shr 16 and $FF;
     
    13391339begin
    13401340  FOutput.BeginUpdate;
    1341   Line := PixelPointer(FOutput, ScaleToVcl(x0), ScaleToVcl(y0));
    1342   for y := 0 to ScaleToVcl(Height) - 1 do begin
    1343     y_n := (ScaleFromVcl(y) + y0 - ym) / yyt;
    1344     if Abs(y_n) < rShade then begin
     1341  Line := PixelPointer(FOutput, ScaleToNative(x0), ScaleToNative(y0));
     1342  for y := 0 to ScaleToNative(Height) - 1 do begin
     1343    y_n := (ScaleFromNative(y) + y0 - ym) / yyt;
     1344    if abs(y_n) < rShade then begin
    13451345      // Darken left and right parts of elipsis
    1346       w_n := Sqrt(Sqr(rShade) - Sqr(y_n));
    1347       wBright := Trunc(w_n * xxt + 0.5);
     1346      w_n := sqrt(sqr(rShade) - sqr(y_n));
     1347      wBright := trunc(w_n * xxt + 0.5);
    13481348      Line.SetX(0);
    1349       MakeDark(@Line, ScaleToVcl(xm - wBright));
    1350       Line.SetX(ScaleToVcl(xm + wBright));
    1351       MakeDark(@Line, ScaleToVcl(Width - xm - wBright));
     1349      MakeDark(@Line, ScaleToNative(xm - wBright));
     1350      Line.SetX(ScaleToNative(xm + wBright));
     1351      MakeDark(@Line, ScaleToNative(Width - xm - wBright));
    13521352    end else begin
    13531353      // Darken entire line
    13541354      Line.SetX(0);
    1355       MakeDark(@Line, ScaleToVcl(Width));
     1355      MakeDark(@Line, ScaleToNative(Width));
    13561356    end;
    13571357    Line.NextLine;
Note: See TracChangeset for help on using the changeset viewer.