mirror of
https://github.com/kaesaecracker/servicepoint-simulator.git
synced 2025-01-18 02:20:14 +01:00
cargo fmt
This commit is contained in:
parent
69502ac3fb
commit
e3d80204a6
|
@ -2,7 +2,7 @@ use std::sync::{RwLock, RwLockWriteGuard};
|
|||
|
||||
use log::{debug, error, info, warn};
|
||||
use servicepoint2::{
|
||||
ByteGrid, Command, Origin, PIXEL_COUNT, PIXEL_WIDTH, PixelGrid, TILE_SIZE,
|
||||
ByteGrid, Command, Origin, PixelGrid, PIXEL_COUNT, PIXEL_WIDTH, TILE_SIZE,
|
||||
};
|
||||
|
||||
use crate::font::BitmapFont;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use font_kit::canvas::*;
|
||||
use font_kit::canvas::{Canvas, Format, RasterizationOptions};
|
||||
use font_kit::hinting::HintingOptions;
|
||||
use pathfinder_geometry::transform2d::Transform2F;
|
||||
use pathfinder_geometry::vector::{vec2f, vec2i};
|
||||
|
@ -36,7 +36,7 @@ impl BitmapFont {
|
|||
HintingOptions::None,
|
||||
RasterizationOptions::GrayscaleAa,
|
||||
)
|
||||
.unwrap();
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(canvas.pixels.len(), 64);
|
||||
assert_eq!(canvas.stride, 8);
|
||||
|
|
10
src/gui.rs
10
src/gui.rs
|
@ -2,10 +2,10 @@ use std::sync::mpsc::Sender;
|
|||
use std::sync::RwLock;
|
||||
|
||||
use log::{info, warn};
|
||||
use pixels::{Pixels, PixelsBuilder, SurfaceTexture};
|
||||
use pixels::wgpu::TextureFormat;
|
||||
use pixels::{Pixels, PixelsBuilder, SurfaceTexture};
|
||||
use servicepoint2::{
|
||||
ByteGrid, PIXEL_HEIGHT, PIXEL_WIDTH, PixelGrid, TILE_SIZE,
|
||||
ByteGrid, PixelGrid, PIXEL_HEIGHT, PIXEL_WIDTH, TILE_SIZE,
|
||||
};
|
||||
use winit::application::ApplicationHandler;
|
||||
use winit::dpi::{LogicalSize, Size};
|
||||
|
@ -77,9 +77,9 @@ impl ApplicationHandler<AppEvents> for App<'_> {
|
|||
&window,
|
||||
),
|
||||
)
|
||||
.render_texture_format(TextureFormat::Bgra8UnormSrgb)
|
||||
.build()
|
||||
.expect("could not create pixels")
|
||||
.render_texture_format(TextureFormat::Bgra8UnormSrgb)
|
||||
.build()
|
||||
.expect("could not create pixels")
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ use std::time::Duration;
|
|||
use clap::Parser;
|
||||
use log::{info, warn};
|
||||
use servicepoint2::{
|
||||
ByteGrid, Command, PIXEL_HEIGHT, PIXEL_WIDTH, PixelGrid, TILE_HEIGHT,
|
||||
ByteGrid, Command, PixelGrid, PIXEL_HEIGHT, PIXEL_WIDTH, TILE_HEIGHT,
|
||||
TILE_WIDTH,
|
||||
};
|
||||
use winit::event_loop::{ControlFlow, EventLoop};
|
||||
|
|
Loading…
Reference in a new issue