Commit cdff42c3 authored by Daniel Kochmański's avatar Daniel Kochmański
Browse files


parent f07cd320
......@@ -126,7 +126,7 @@ rectangle coordinates are `[25,10], [30,15]`.
* MDPI display device units are dip and they match native units of our
choosing. No transformation is required.
![Graft drawing](
![Graft drawing](
* Some old displays have density 72PPI. Not all coordinates map exactly to
pixels - we need to round them[^3]. Notice that border is thicker and that
......@@ -138,26 +138,26 @@ rectangle coordinates are `[25,10], [30,15]`.
desktops. Almost all coordinates map perfectly on this screen. Notice the
approximation of the right side of the violet rectangle.
![Lower DPI](
![Lower DPI](
* Fact that the screen has higher density doesn't mean that coordinates mapping
perfectly on a lower density screen will map well to a higher density
one. Take this HDPI screen. Almost all coordinates are floats while on the
MDPI display they had all integer values.
* Higher resolution makes rectangles look better (borderline is thinner and
distortions are less visible to the eye). Here is XXXHDPI:
* Some printers have a really high DPI, here is imaginary 2560 DPI printer.
Funnily enough its accuracy exceeds our screen density so the red border which
is meant to show the "ideal" rectangle is a little off (it's fine if we scale
the image though).
![HQ Printer](
![HQ Printer](
* Until now we've seen some screens with square pixels (or dots). Let's take a
look at something with a really low density - a character terminal. To make
......@@ -165,7 +165,7 @@ rectangle coordinates are `[25,10], [30,15]`.
character (too small to be seen by a human eye). Notice that the real size of
the rectangles is still similar.
![Character terminal](
![Character terminal](
It is time to deal with `graphics` orientation (Y-axis grows towards the
top). An imaginary plotter with 80DPI resolution will be used to illustrate two
......@@ -178,13 +178,13 @@ important to know where we start the drawing.
print on. We do preserve the real size but we don't preserve the image
orientation – cyan rectangle should be higher on the plot.
![Plotter (bad transformation)](
![Plotter (bad transformation)](
* Correct transformation involves reverting Y axis and translating objects by
the screen height. See the correct transformation (on 80DPI and on MDPI
![80DPI and MDPI plotters](
![80DPI and MDPI plotters](
[^7]: the Ideal border is composed of lines which are 1-dimensional objects
which doesn't occupy any space. Red border in drawings marks "ideal" object
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment