Introduce with_transformation to Renderer trait

This commit is contained in:
Héctor Ramón Jiménez 2023-10-24 05:34:03 +02:00
parent a6e91d13d5
commit f4d6648601
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
31 changed files with 161 additions and 118 deletions

View file

@ -1,7 +1,9 @@
use crate::alignment;
use crate::renderer::{self, Renderer};
use crate::text::{self, Text};
use crate::{Background, Color, Font, Pixels, Point, Rectangle, Size, Vector};
use crate::{
Background, Color, Font, Pixels, Point, Rectangle, Size, Transformation,
};
use std::borrow::Cow;
@ -21,9 +23,9 @@ impl Null {
impl Renderer for Null {
fn with_layer(&mut self, _bounds: Rectangle, _f: impl FnOnce(&mut Self)) {}
fn with_translation(
fn with_transformation(
&mut self,
_translation: Vector,
_transformation: Transformation,
_f: impl FnOnce(&mut Self),
) {
}