diff --git a/hui/src/frame/impls.rs b/hui/src/frame/impls.rs index 7a0c41a..fc0d0e7 100644 --- a/hui/src/frame/impls.rs +++ b/hui/src/frame/impls.rs @@ -25,6 +25,9 @@ impl Frame for ImageHandle { impl Frame for FillColor { fn draw(&self, draw: &mut UiDrawCommandList, rect: Rect) { + if self.is_transparent() { + return + } draw.add(UiDrawCommand::Rectangle { position: rect.position, size: rect.size, diff --git a/hui/src/frame/rect.rs b/hui/src/frame/rect.rs index 1170360..d6e5d5e 100644 --- a/hui/src/frame/rect.rs +++ b/hui/src/frame/rect.rs @@ -116,6 +116,9 @@ impl Default for RectFrame { impl Frame for RectFrame { fn draw(&self, draw: &mut UiDrawCommandList, rect: Rect) { + if self.color.is_transparent() { + return + } //TODO: handle bottom_right < top_left let top_left = self.top_left.resolve(rect.size); let bottom_right = self.bottom_right.resolve(rect.size);