Slightly optimized blobs paint.
This commit is contained in:
parent
407079e5b1
commit
a8edd6567e
1 changed files with 8 additions and 1 deletions
|
|
@ -87,7 +87,10 @@ void RadialBlob::paint(Painter &p, const QBrush &brush, float outerScale) {
|
||||||
|
|
||||||
p.save();
|
p.save();
|
||||||
const auto scale = (_minScale + (1. - _minScale) * _scale) * outerScale;
|
const auto scale = (_minScale + (1. - _minScale) * _scale) * outerScale;
|
||||||
if (scale != 1.) {
|
if (scale == 0.) {
|
||||||
|
p.restore();
|
||||||
|
return;
|
||||||
|
} else if (scale != 1.) {
|
||||||
p.scale(scale, scale);
|
p.scale(scale, scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -169,6 +172,10 @@ LinearBlob::LinearBlob(
|
||||||
}
|
}
|
||||||
|
|
||||||
void LinearBlob::paint(Painter &p, const QBrush &brush, int width) {
|
void LinearBlob::paint(Painter &p, const QBrush &brush, int width) {
|
||||||
|
if (!width) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auto path = QPainterPath();
|
auto path = QPainterPath();
|
||||||
|
|
||||||
const auto left = 0;
|
const auto left = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue