marrub
/
grope
Archived
1
0
Fork 0

Compare commits

...

3 Commits

Author SHA1 Message Date
an 65c345175c bump version 2018-11-11 07:41:08 -05:00
an 22d0ccc9f6 add centering lines for HUD 2018-11-11 07:41:01 -05:00
an f974a538a9 fix chunks being overridden on write 2018-11-11 07:40:50 -05:00
2 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "grope"
version = "0.1.0"
version = "0.1.1"
authors = ["Alison Sanderson"]
edition = "2018"

View File

@ -85,6 +85,10 @@ fn draw(c: &cairo::Context, v: &mut Stuff) -> Inhibit
c.move_to(-VW, 0.0); c.line_to( VW, 0.0); c.stroke();
c.move_to(0.0, -VH); c.line_to(0.0, VH); c.stroke();
// center (hud)
c.move_to(0.0, HH); c.line_to(VW, HH); c.stroke();
c.move_to( HW, 0.0); c.line_to(HW, VH); c.stroke();
// hud borders
c.move_to(0.0, VH); c.line_to(VW, VH); c.stroke();
c.move_to( VW, 0.0); c.line_to(VW, VH); c.stroke();
@ -210,7 +214,7 @@ impl Stuff
for b in &d_i32b(self.p.0) {c.dat.push(*b)}
for b in &d_i32b(self.p.1) {c.dat.push(*b)}
if let Some(n) = png.find_chunk(*b"grAb") {png.chnk[n] = c}
else {png.chnk[1] = c}
else {png.chnk.insert(1, c)}
png.write(&mut File::create(fname)?)?;
Ok(())
}