修复频谱图bug
This commit is contained in:
@@ -222,11 +222,22 @@ Painter::~Painter() {
|
||||
context_.end();
|
||||
}
|
||||
|
||||
void Painter::clip(RectF value) {
|
||||
Painter::Clip_Scope::Clip_Scope(Painter& painter, RectF value) {
|
||||
value = value.normalized();
|
||||
if (!active_ || value.empty())
|
||||
if (!painter.active_ || value.empty())
|
||||
return;
|
||||
context_.clip_to_rect(BLRect(value.x, value.y, value.width, value.height));
|
||||
painter.context_.save();
|
||||
painter.context_.clip_to_rect(BLRect(value.x, value.y, value.width, value.height));
|
||||
painter_ = &painter;
|
||||
}
|
||||
|
||||
Painter::Clip_Scope::~Clip_Scope() {
|
||||
if (painter_)
|
||||
painter_->context_.restore();
|
||||
}
|
||||
|
||||
Painter::Clip_Scope Painter::scoped_clip(RectF value) {
|
||||
return Clip_Scope(*this, value);
|
||||
}
|
||||
|
||||
void Painter::composite(const Blend2D_Color_Cache& source) {
|
||||
|
||||
Reference in New Issue
Block a user