mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-14 02:28:19 +00:00
WIP - drawlib - canvas moved to shape
This commit is contained in:
parent
936ed18e48
commit
21ad1be4de
@ -1,9 +1,9 @@
|
||||
use crate::{
|
||||
trezorhal::display,
|
||||
ui::{
|
||||
canvas::{Bitmap, BitmapFormat},
|
||||
constant,
|
||||
geometry::{Offset, Point, Rect},
|
||||
shape::{Bitmap, BitmapFormat},
|
||||
},
|
||||
};
|
||||
use core::slice;
|
||||
|
@ -2,7 +2,6 @@
|
||||
pub mod macros;
|
||||
|
||||
pub mod animation;
|
||||
pub mod canvas;
|
||||
pub mod component;
|
||||
pub mod constant;
|
||||
pub mod display;
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::ui::{canvas::Canvas, display::Color, geometry::Rect};
|
||||
use crate::ui::{display::Color, geometry::Rect};
|
||||
|
||||
use super::{DrawingCache, Renderer, Shape, ShapeClone};
|
||||
use super::{Canvas, DrawingCache, Renderer, Shape, ShapeClone};
|
||||
|
||||
use without_alloc::alloc::LocalAllocLeakExt;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::ui::{canvas::Canvas, geometry::Rect};
|
||||
use crate::ui::geometry::Rect;
|
||||
|
||||
use super::DrawingCache;
|
||||
use super::{Canvas, DrawingCache};
|
||||
|
||||
use without_alloc::alloc::LocalAllocLeakExt;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::ui::{canvas::Canvas, geometry::Rect};
|
||||
use crate::ui::geometry::Rect;
|
||||
|
||||
use super::{DrawingCache, Renderer, Shape, ShapeClone};
|
||||
use super::{Canvas, DrawingCache, Renderer, Shape, ShapeClone};
|
||||
|
||||
use without_alloc::alloc::LocalAllocLeakExt;
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
use crate::ui::{
|
||||
canvas::algo::{BlurAlgorithm, BlurBuff},
|
||||
geometry::Offset,
|
||||
};
|
||||
use super::super::algo::{BlurAlgorithm, BlurBuff};
|
||||
use crate::ui::geometry::Offset;
|
||||
use core::cell::UnsafeCell;
|
||||
use without_alloc::alloc::LocalAllocLeakExt;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::ui::{
|
||||
canvas::{BasicCanvas, Bitmap, BitmapFormat, BitmapView, Canvas, Rgb565Canvas},
|
||||
display::tjpgd,
|
||||
geometry::{Offset, Point, Rect},
|
||||
shape::{BasicCanvas, Bitmap, BitmapFormat, BitmapView, Canvas, Rgb565Canvas},
|
||||
};
|
||||
|
||||
use core::cell::UnsafeCell;
|
||||
|
@ -8,7 +8,7 @@ use super::{BitmapView, Viewport};
|
||||
#[cfg(feature = "ui_blurring")]
|
||||
use crate::ui::shape::DrawingCache;
|
||||
|
||||
use super::algo::{circle_points, line_points, sin_i16, PI4};
|
||||
use super::super::algo::{circle_points, line_points, sin_i16, PI4};
|
||||
|
||||
pub trait BasicCanvas {
|
||||
/// Returns dimensions of the canvas in pixels.
|
@ -1,4 +1,3 @@
|
||||
pub mod algo;
|
||||
mod common;
|
||||
mod mono8;
|
||||
mod rgb565;
|
@ -1,10 +1,9 @@
|
||||
use crate::ui::{
|
||||
canvas::Canvas,
|
||||
display::Color,
|
||||
geometry::{Point, Rect},
|
||||
};
|
||||
|
||||
use super::{DrawingCache, Renderer, Shape, ShapeClone};
|
||||
use super::{Canvas, DrawingCache, Renderer, Shape, ShapeClone};
|
||||
|
||||
use without_alloc::alloc::LocalAllocLeakExt;
|
||||
|
||||
|
@ -1,9 +1,6 @@
|
||||
use crate::ui::{
|
||||
canvas::{Bitmap, BitmapFormat, BitmapView, Canvas},
|
||||
geometry::{Alignment2D, Offset, Point, Rect},
|
||||
};
|
||||
use crate::ui::geometry::{Alignment2D, Offset, Point, Rect};
|
||||
|
||||
use super::{DrawingCache, Renderer, Shape, ShapeClone};
|
||||
use super::{Bitmap, BitmapFormat, BitmapView, Canvas, DrawingCache, Renderer, Shape, ShapeClone};
|
||||
|
||||
use without_alloc::alloc::LocalAllocLeakExt;
|
||||
|
||||
|
@ -1,8 +1,10 @@
|
||||
mod algo;
|
||||
mod bar;
|
||||
mod base;
|
||||
#[cfg(feature = "ui_blurring")]
|
||||
mod blur;
|
||||
mod cache;
|
||||
mod canvas;
|
||||
mod circle;
|
||||
#[cfg(feature = "ui_jpeg_decoder")]
|
||||
mod jpeg;
|
||||
@ -25,3 +27,10 @@ pub use qrcode::QrImage;
|
||||
pub use render::{DirectRenderer, ProgressiveRenderer, Renderer};
|
||||
pub use text::Text;
|
||||
pub use toif::ToifImage;
|
||||
|
||||
pub use canvas::{BasicCanvas, Canvas, Mono8Canvas, Rgb565Canvas, Rgba8888Canvas, Viewport};
|
||||
|
||||
use crate::trezorhal::bitmap;
|
||||
pub use bitmap::{Bitmap, BitmapFormat, BitmapView};
|
||||
|
||||
pub use algo::PI4;
|
||||
|
@ -1,9 +1,8 @@
|
||||
use crate::ui::{
|
||||
canvas::{BasicCanvas, Canvas, Mono8Canvas, Viewport},
|
||||
display,
|
||||
display::Color,
|
||||
geometry::{Offset, Rect},
|
||||
shape::{DirectRenderer, DrawingCache},
|
||||
shape::{BasicCanvas, Canvas, DirectRenderer, DrawingCache, Mono8Canvas, Viewport},
|
||||
};
|
||||
|
||||
use static_alloc::Bump;
|
||||
|
@ -1,8 +1,7 @@
|
||||
use crate::ui::{
|
||||
canvas::{BasicCanvas, Viewport},
|
||||
display::Color,
|
||||
geometry::{Offset, Rect},
|
||||
shape::{DrawingCache, ProgressiveRenderer},
|
||||
shape::{BasicCanvas, DrawingCache, ProgressiveRenderer, Viewport},
|
||||
};
|
||||
|
||||
use crate::trezorhal::bitmap::{BitmapView, Dma2d};
|
||||
|
@ -1,12 +1,13 @@
|
||||
use crate::ui::{
|
||||
canvas::{algo::line_points, Bitmap, BitmapFormat, Canvas},
|
||||
display::Color,
|
||||
geometry::{Offset, Rect},
|
||||
};
|
||||
|
||||
use qrcodegen::QrCode;
|
||||
|
||||
use super::{DrawingCache, Renderer, Shape, ShapeClone};
|
||||
use super::{
|
||||
algo::line_points, Bitmap, BitmapFormat, Canvas, DrawingCache, Renderer, Shape, ShapeClone,
|
||||
};
|
||||
|
||||
use without_alloc::alloc::LocalAllocLeakExt;
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
use crate::ui::{
|
||||
canvas::{BasicCanvas, Canvas, Rgb565Canvas, Viewport},
|
||||
display::Color,
|
||||
geometry::{Offset, Point, Rect},
|
||||
shape::{DrawingCache, Shape, ShapeClone},
|
||||
};
|
||||
|
||||
use super::{BasicCanvas, Canvas, DrawingCache, Rgb565Canvas, Shape, ShapeClone, Viewport};
|
||||
|
||||
use without_alloc::{alloc::LocalAllocLeakExt, FixedVec};
|
||||
|
||||
// ==========================================================================
|
||||
|
@ -1,10 +1,9 @@
|
||||
use crate::ui::{
|
||||
canvas::{BitmapView, Canvas},
|
||||
display::{Color, Font},
|
||||
geometry::{Alignment, Offset, Point, Rect},
|
||||
};
|
||||
|
||||
use super::{DrawingCache, Renderer, Shape, ShapeClone};
|
||||
use super::{BitmapView, Canvas, DrawingCache, Renderer, Shape, ShapeClone};
|
||||
|
||||
use without_alloc::alloc::LocalAllocLeakExt;
|
||||
|
||||
|
@ -1,10 +1,9 @@
|
||||
use crate::ui::{
|
||||
canvas::{Bitmap, BitmapFormat, Canvas},
|
||||
display::{toif::Toif, Color},
|
||||
geometry::{Alignment2D, Offset, Point, Rect},
|
||||
};
|
||||
|
||||
use super::{DrawingCache, Renderer, Shape, ShapeClone};
|
||||
use super::{Bitmap, BitmapFormat, Canvas, DrawingCache, Renderer, Shape, ShapeClone};
|
||||
|
||||
use without_alloc::alloc::LocalAllocLeakExt;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user