Cargo fmt

This commit is contained in:
Raph Levien 2021-09-06 10:19:55 -07:00
parent 4b2a720289
commit 056446c23d
2 changed files with 10 additions and 6 deletions

View file

@ -181,7 +181,6 @@ impl Session {
pool.push((staging_cmd_buf.cmd_buf, staging_cmd_buf.fence)); pool.push((staging_cmd_buf.cmd_buf, staging_cmd_buf.fence));
std::mem::drop(staging_cmd_buf.resources); std::mem::drop(staging_cmd_buf.resources);
} }
} else { } else {
i += 1; i += 1;
} }

View file

@ -2,10 +2,12 @@
use rand::{Rng, RngCore}; use rand::{Rng, RngCore};
use piet::{Color, FixedGradient, FixedLinearGradient, GradientStop, Text, TextAttribute, TextLayoutBuilder};
use piet::kurbo::{BezPath, Circle, Line, Point, Rect, Shape}; use piet::kurbo::{BezPath, Circle, Line, Point, Rect, Shape};
use piet::{
Color, FixedGradient, FixedLinearGradient, GradientStop, Text, TextAttribute, TextLayoutBuilder,
};
use crate::{RenderContext, PicoSvg, Vec2}; use crate::{PicoSvg, RenderContext, Vec2};
const N_CIRCLES: usize = 0; const N_CIRCLES: usize = 0;
@ -190,7 +192,10 @@ fn render_tiger(rc: &mut impl RenderContext) {
} }
pub fn render_anim_frame(rc: &mut impl RenderContext, i: usize) { pub fn render_anim_frame(rc: &mut impl RenderContext, i: usize) {
rc.fill(Rect::new(0.0, 0.0, 1000.0, 1000.0), &Color::rgb8(128, 128, 128)); rc.fill(
Rect::new(0.0, 0.0, 1000.0, 1000.0),
&Color::rgb8(128, 128, 128),
);
let text_size = 60.0 + 40.0 * (0.01 * i as f64).sin(); let text_size = 60.0 + 40.0 * (0.01 * i as f64).sin();
rc.save().unwrap(); rc.save().unwrap();
//rc.transform(Affine::new([0.2, 0.0, 0.0, -0.2, 200.0, 800.0])); //rc.transform(Affine::new([0.2, 0.0, 0.0, -0.2, 200.0, 800.0]));