mirror of
https://github.com/penpot/penpot.git
synced 2025-07-17 14:17:13 +02:00
🎉 Tile rendering system
This commit is contained in:
parent
b727f2fe1f
commit
084816fb9f
17 changed files with 956 additions and 408 deletions
|
@ -45,19 +45,6 @@ impl Viewbox {
|
|||
);
|
||||
}
|
||||
|
||||
pub fn set_zoom(&mut self, zoom: f32) {
|
||||
self.zoom = zoom;
|
||||
self.area
|
||||
.set_wh(self.width / self.zoom, self.height / self.zoom);
|
||||
}
|
||||
|
||||
pub fn set_pan_xy(&mut self, pan_x: f32, pan_y: f32) {
|
||||
self.pan_x = pan_x;
|
||||
self.pan_y = pan_y;
|
||||
self.area.left = -pan_x;
|
||||
self.area.top = -pan_y;
|
||||
}
|
||||
|
||||
pub fn set_wh(&mut self, width: f32, height: f32) {
|
||||
self.width = width;
|
||||
self.height = height;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue