render: don't render transparent boxes
This commit is contained in:
parent
ecc45f01f4
commit
609f6f99cd
1 changed files with 2 additions and 2 deletions
|
|
@ -65,7 +65,7 @@ impl RendererBase<'_> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn fill_boxes2(&mut self, boxes: &[Rect], color: &Color, dx: i32, dy: i32) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
let (dx, dy) = self.scale_point(dx, dy);
|
let (dx, dy) = self.scale_point(dx, dy);
|
||||||
|
|
@ -94,7 +94,7 @@ impl RendererBase<'_> {
|
||||||
dx: f32,
|
dx: f32,
|
||||||
dy: f32,
|
dy: f32,
|
||||||
) {
|
) {
|
||||||
if boxes.is_empty() {
|
if boxes.is_empty() || *color == Color::TRANSPARENT {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let (dx, dy) = self.scale_point_f(dx, dy);
|
let (dx, dy) = self.scale_point_f(dx, dy);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue