diff --git a/src/draw_commands.rs b/src/draw_commands.rs index 505031a..32531d6 100644 --- a/src/draw_commands.rs +++ b/src/draw_commands.rs @@ -136,12 +136,14 @@ impl DrawCommandRecorder { layer_idx: u32, is_absolute_position: bool, ) { - if !is_absolute_position { - rect.translate(self.current_viewport.min.to_vector()); - } + let rect = if is_absolute_position { + rect + } else { + rect.translate(self.current_viewport.min.to_vector()) + }; self.push(DrawCommand { - positions: rect.translate(self.current_viewport.min.to_vector()).into(), + positions: rect.into(), uvs: uv.into(), color, // font atlas always lives at default texture ID