Changeset 246 for branches/highdpi/LocalPlayer/IsoEngine.pas
- Timestamp:
- May 21, 2020, 8:17:38 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/LocalPlayer/IsoEngine.pas
r212 r246 1015 1015 1 + 8 * (xxt * 2 + 1), 1 + yyt + 16 * (yyt * 3 + 1)); 1016 1016 Borders.BeginUpdate; 1017 PixelPtr := PixelPointer(Borders, ScaleTo Vcl(0), ScaleToVcl(p1 * (yyt * 2)));1018 for dy := 0 to ScaleTo Vcl(yyt * 2) - 1 do begin1019 for dx := 0 to ScaleTo Vcl(xxt * 2) - 1 do begin1017 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 1020 1020 if PixelPtr.Pixel^.B = 99 then begin 1021 1021 PixelPtr.Pixel^.B := Tribe[p1].Color shr 16 and $FF; … … 1339 1339 begin 1340 1340 FOutput.BeginUpdate; 1341 Line := PixelPointer(FOutput, ScaleTo Vcl(x0), ScaleToVcl(y0));1342 for y := 0 to ScaleTo Vcl(Height) - 1 do begin1343 y_n := (ScaleFrom Vcl(y) + y0 - ym) / yyt;1344 if Abs(y_n) < rShade then begin1341 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 1345 1345 // 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); 1348 1348 Line.SetX(0); 1349 MakeDark(@Line, ScaleTo Vcl(xm - wBright));1350 Line.SetX(ScaleTo Vcl(xm + wBright));1351 MakeDark(@Line, ScaleTo Vcl(Width - xm - wBright));1349 MakeDark(@Line, ScaleToNative(xm - wBright)); 1350 Line.SetX(ScaleToNative(xm + wBright)); 1351 MakeDark(@Line, ScaleToNative(Width - xm - wBright)); 1352 1352 end else begin 1353 1353 // Darken entire line 1354 1354 Line.SetX(0); 1355 MakeDark(@Line, ScaleTo Vcl(Width));1355 MakeDark(@Line, ScaleToNative(Width)); 1356 1356 end; 1357 1357 Line.NextLine;
Note:
See TracChangeset
for help on using the changeset viewer.