Simplify buffer positioning, introduce WLDASH_SCALE

Replace most uses of Buffer::subdimensions with Buffer::offset.

Introduce WLDASH_SCALE. Set to 2 to make wldash render at half size.
This commit is contained in:
Kenny Levinsen
2019-09-03 13:24:21 +02:00
parent 2bad68a8cf
commit 3b4c9267bb
11 changed files with 75 additions and 41 deletions
+5 -1
View File
@@ -29,6 +29,10 @@ fn main() {
Ok(dir) => dir + "/wldash",
Err(_) => "/tmp/wldash".to_string(),
};
let scale = match env::var("WLDASH_SCALE") {
Ok(s) => s.parse().unwrap(),
Err(_) => 1,
};
let args: Vec<String> = env::args().collect();
let mode = match args.len() {
@@ -84,7 +88,7 @@ fn main() {
Err(_) => OutputMode::Active,
};
let mut app = App::new(tx_draw, output_mode);
let mut app = App::new(tx_draw, output_mode, scale);
app.wipe();
let worker_queue = app.cmd_queue();