Skip to content

Commit

Permalink
add opacity == 0.0 condition to Painter::add as well
Browse files Browse the repository at this point in the history
  • Loading branch information
YgorSouza committed Feb 10, 2024
1 parent 4e2f6d6 commit 73ed1c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/egui/src/painter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ impl Painter {
/// Can be used for free painting.
/// NOTE: all coordinates are screen coordinates!
pub fn add(&self, shape: impl Into<Shape>) -> ShapeIdx {
if self.fade_to_color == Some(Color32::TRANSPARENT) {
if self.fade_to_color == Some(Color32::TRANSPARENT) || self.opacity_factor == 0.0 {
self.paint_list(|l| l.add(self.clip_rect, Shape::Noop))
} else {
let mut shape = shape.into();
Expand Down

0 comments on commit 73ed1c7

Please sign in to comment.