I plot a straight diagonal line and then simply rasterize it. Consider what happens (Mathematica 8.0.4, 10.2, 11.1.1 and 12.0 on Windows 7 x64):
n = 20;
gr = Graphics[{White, AbsoluteThickness[1], Line[{{0, 0}, {n, n}}]}, Background -> Black,
PlotRangePadding -> None, BaseStyle -> Antialiasing -> False, ImageSize -> {n, n},
PlotRange -> {{0, n}, {0, n}}];
i = Image[gr, Magnification -> 10]
Show[i, gr, BaseStyle -> Magnification -> 10]
As it is clearly seen, the diagonal white Line
is converted to under-diagonal line by Rasterize
. Is it a bug or I misunderstand something?
BaseStyle -> Antialiasing -> False
setting when you useShow
, and this causes problems. $\endgroup$Show[i, gr, BaseStyle -> {Magnification -> 10, Antialiasing -> False}]
andMagnify[Show[i, gr], 10]
I get the same problem with additional bug: empty white space after the the output. $\endgroup$