Hi all,
i downloaded a code from Qtapplications.org website for a manometer. it is a very lengthy code so i am not posting the entire code. I do not have a very clear concept in coordinate system so some body please explain the following coordinates and how can i relate to the picture i am drawing (manometer). i am pasting parts of the code
painter.translate(width() / 2, height() / 2);
painter.scale(side / 335.0, side / 335.0);
static const int scaleTriangle[6] = { -6,141,6,141,0,129 };
painter.drawEllipse(-152,-152,304,304);
painter.translate(width() / 2, height() / 2);
painter.scale(side / 335.0, side / 335.0);
static const int scaleTriangle[6] = { -6,141,6,141,0,129 };
painter.drawEllipse(-152,-152,304,304);
To copy to clipboard, switch view to plain text mode
my main doubt is the first two lines what width and height actually mean and why it is getting divided by 2 and then 335 and 335.
Most of the code contains the dimensions like above and i don't understand those. please somebody explain me little bit and then direct me to the proper documentation.
thanks in advance,
regards,
satya
Bookmarks