Paskaitų konspektai - Matematikos ir Informatikos fakultetas ...
Paskaitų konspektai - Matematikos ir Informatikos fakultetas ...
Paskaitų konspektai - Matematikos ir Informatikos fakultetas ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
void draw10steps (QPainter* p, Shape* shape)<br />
{<br />
int x = shape->getCenterX();<br />
int y = shape->getCenterY();<br />
for (int i=0; i < 10; i++)<br />
{<br />
shape->setCenter(x + i*5, y + i*5);<br />
shape->draw(p);<br />
}<br />
shape->setCenter(x, y);<br />
}<br />
void Screen::paintEvent(QPaintEvent*)<br />
{<br />
QPainter p(this);<br />
draw10steps(&p, shape);<br />
draw10steps(&p, c<strong>ir</strong>cle);<br />
draw10steps(&p, square);<br />
draw10steps(&p, rectangle);<br />
}<br />
Ekrane pamatysime:<br />
92