dsn: remove temporary scaling factor

The binary targets have zooming and no longer need it for display.
This commit is contained in:
Tomasz Cichoń 2024-03-08 10:12:31 +01:00
parent 23fe001647
commit 12574712a4
2 changed files with 12 additions and 12 deletions

View File

@ -258,7 +258,7 @@ fn main() -> Result<(), anyhow::Error> {
let board = Board::new(layout); let board = Board::new(layout);
let mut router = Router::new(board); let mut router = Router::new(board);
let mut view = View { pan: vec2f(-400.0, -300.0), zoom: 0.5 }; let mut view = View { pan: vec2f(-80000.0, -60000.0), zoom: 0.005 };
render_times( render_times(
&mut event_pump, &mut event_pump,

View File

@ -89,10 +89,10 @@ impl DsnDesign {
Shape::Circle(circle) => { Shape::Circle(circle) => {
let circle = Circle { let circle = Circle {
pos: ( pos: (
(place.x + pin.x) as f64 / 100.0, (place.x + pin.x) as f64,
-(place.y + pin.y) as f64 / 100.0 -(place.y + pin.y) as f64
).into(), ).into(),
r: circle.diameter as f64 / 200.0, r: circle.diameter as f64 / 2.0,
}; };
layout layout
@ -136,8 +136,8 @@ impl DsnDesign {
Shape::Polygon(_) => todo!(), Shape::Polygon(_) => todo!(),
}; };
let circle = Circle { let circle = Circle {
pos: (via.x as f64 / 100.0, -via.y as f64 / 100.0).into(), pos: (via.x as f64, -via.y as f64).into(),
r: circle.diameter as f64 / 200.0, r: circle.diameter as f64 / 2.0,
}; };
layout layout
@ -158,11 +158,11 @@ impl DsnDesign {
net: *net_id as i64, net: *net_id as i64,
circle: Circle { circle: Circle {
pos: ( pos: (
wire.path.coord_vec[0].x as f64 / 100.0, wire.path.coord_vec[0].x as f64,
-wire.path.coord_vec[0].y as f64 / 100.0, -wire.path.coord_vec[0].y as f64,
) )
.into(), .into(),
r: wire.path.width as f64 / 200.0, r: wire.path.width as f64 / 2.0,
}, },
}) })
.unwrap(); .unwrap();
@ -173,8 +173,8 @@ impl DsnDesign {
.add_fixed_dot(FixedDotWeight { .add_fixed_dot(FixedDotWeight {
net: *net_id as i64, net: *net_id as i64,
circle: Circle { circle: Circle {
pos: (coord.x as f64 / 100.0, -coord.y as f64 / 100.0).into(), pos: (coord.x as f64, -coord.y as f64).into(),
r: wire.path.width as f64 / 200.0, r: wire.path.width as f64 / 2.0,
}, },
}) })
.unwrap(); .unwrap();
@ -186,7 +186,7 @@ impl DsnDesign {
index, index,
FixedSegWeight { FixedSegWeight {
net: *net_id as i64, net: *net_id as i64,
width: wire.path.width as f64 / 100.0, width: wire.path.width as f64,
}, },
) )
.unwrap(); .unwrap();