1
0
Fork 0
forked from wry/wry

render: don't render transparent boxes

This commit is contained in:
Julian Orth 2024-02-23 12:23:30 +01:00
parent ecc45f01f4
commit 609f6f99cd

View file

@ -65,7 +65,7 @@ impl RendererBase<'_> {
}
pub fn fill_boxes2(&mut self, boxes: &[Rect], color: &Color, dx: i32, dy: i32) {
if boxes.is_empty() {
if boxes.is_empty() || *color == Color::TRANSPARENT {
return;
}
let (dx, dy) = self.scale_point(dx, dy);
@ -94,7 +94,7 @@ impl RendererBase<'_> {
dx: f32,
dy: f32,
) {
if boxes.is_empty() {
if boxes.is_empty() || *color == Color::TRANSPARENT {
return;
}
let (dx, dy) = self.scale_point_f(dx, dy);