Compare commits
2 Commits
153f6bdd8e
...
6c86403c4a
Author | SHA1 | Date |
---|---|---|
karlis | 6c86403c4a | |
karlis | b9c8624dae |
|
@ -8,7 +8,7 @@ PixelPath SimpleElement::getPaintObject() const
|
|||
{
|
||||
PixelPath result;
|
||||
result.addPath(painterPath);
|
||||
qDebug() << result.getPainterPath();
|
||||
//qDebug() << result.getPainterPath();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,8 @@ PixelPath SimpleElement::getPaintObject(std::vector<std::shared_ptr<LayerStyle>>
|
|||
std::dynamic_pointer_cast<StrokeElementLayerStyle>(style)->materialStyles[0]->materialStroke
|
||||
)->materialMap[1.0].color;*/
|
||||
}
|
||||
auto [img, mov] = renderer->drawElement(painterPath, *style, 1.0);
|
||||
|
||||
auto [img, mov] = Renderer::ElementRenderer::instance()->drawElement(painterPath, *style, 1.0);
|
||||
//qDebug() << img << " ------";
|
||||
result.addImage(img, mov);
|
||||
result.addPath(painterPath);
|
||||
|
@ -149,7 +150,7 @@ void SimpleElement::paint(QPainter* painter, QTransform transform, const vector<
|
|||
scale /= transform.m33();
|
||||
double maxScale = std::max(scale.x(), scale.y());
|
||||
double pixelRatio = maxScale * QGuiApplication::primaryScreen()->devicePixelRatio();
|
||||
auto [img, mov] = renderer->drawElement(painterPath, *style, pixelRatio);
|
||||
auto [img, mov] = Renderer::ElementRenderer::instance()->drawElement(painterPath, *style, pixelRatio);
|
||||
painter->setTransform(transform.scale(1 / pixelRatio, 1 / pixelRatio));
|
||||
//img = img.scaled(img.width() / pixelRatio, img.height() / pixelRatio, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
painter->drawImage(mov, img);
|
||||
|
|
|
@ -268,7 +268,7 @@ void FolderLayerWrapper::paint(QPainter* painter, QTransform transform)
|
|||
{
|
||||
LayerWrapper::paint(painter, transform);
|
||||
transform = property.transform * transform;
|
||||
qDebug() << transform;
|
||||
//qDebug() << transform;
|
||||
for (auto& child : children)
|
||||
child->paint(painter, transform);
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ void LeafLayerWrapper::paint(QPainter* painter, QTransform transform)
|
|||
{
|
||||
LayerWrapper::paint(painter, transform);
|
||||
transform = property.transform * transform;
|
||||
qDebug() << transform;
|
||||
//qDebug() << transform;
|
||||
if (wrappedElement != nullptr)
|
||||
{
|
||||
wrappedElement->paint(painter, transform, styles);
|
||||
|
|
Loading…
Reference in New Issue