Skip to content

Commit

Permalink
karm-ui: Fix filters.
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepy-monax committed Nov 2, 2024
1 parent 16a7373 commit a7f9d29
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/libs/karm-ui/view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,10 @@ struct BackgroundFilter : public ProxyNode<BackgroundFilter> {
}

void paint(Gfx::Canvas &g, Math::Recti r) override {
g.apply(_filter, bound().clipTo(r).cast<f64>());
g.push();
g.clip(bound());
g.apply(_filter);
g.pop();
ProxyNode<BackgroundFilter>::paint(g, r);
}
};
Expand All @@ -405,7 +408,10 @@ struct ForegroundFilter : public ProxyNode<ForegroundFilter> {

void paint(Gfx::Canvas &g, Math::Recti r) override {
ProxyNode<ForegroundFilter>::paint(g, r);
g.apply(_filter, bound().clipTo(r).cast<f64>());
g.push();
g.clip(bound());
g.apply(_filter);
g.pop();
}
};

Expand Down

0 comments on commit a7f9d29

Please sign in to comment.