worked on Image

This commit is contained in:
fourtf
2018-08-06 18:25:47 +02:00
parent c2e2dfb577
commit 35d462d1f1
15 changed files with 284 additions and 302 deletions
@@ -91,8 +91,8 @@ void ImageLayoutElement::paint(QPainter &painter)
return;
}
auto pixmap = this->image_->getPixmap();
if (pixmap && !this->image_->isAnimated()) {
auto pixmap = this->image_->pixmap();
if (pixmap && !this->image_->animated()) {
// fourtf: make it use qreal values
painter.drawPixmap(QRectF(this->getRect()), *pixmap, QRectF());
}
@@ -104,8 +104,8 @@ void ImageLayoutElement::paintAnimated(QPainter &painter, int yOffset)
return;
}
if (this->image_->isAnimated()) {
if (auto pixmap = this->image_->getPixmap()) {
if (this->image_->animated()) {
if (auto pixmap = this->image_->pixmap()) {
auto rect = this->getRect();
rect.moveTop(rect.y() + yOffset);
painter.drawPixmap(QRectF(rect), *pixmap, QRectF());