Introduce draw_with_bounds to canvas::Cache
Also: - Change `Rectangle::INFINITE` to have coordinates at `f32::NEG_INFINITY` - Change `Frame::with_clip` to _not_ adjust the coordinate system - Rename `Size::INFINITY` to `INFINITE`
This commit is contained in:
parent
c1f7345ceb
commit
f2aa570aac
13 changed files with 56 additions and 45 deletions
|
|
@ -409,13 +409,13 @@ mod geometry {
|
|||
type Geometry = Geometry<A::Geometry, B::Geometry>;
|
||||
type Frame = Frame<A::Frame, B::Frame>;
|
||||
|
||||
fn new_frame(&self, size: iced_graphics::core::Size) -> Self::Frame {
|
||||
fn new_frame(&self, bounds: Rectangle) -> Self::Frame {
|
||||
match self {
|
||||
Self::Primary(renderer) => {
|
||||
Frame::Primary(renderer.new_frame(size))
|
||||
Frame::Primary(renderer.new_frame(bounds))
|
||||
}
|
||||
Self::Secondary(renderer) => {
|
||||
Frame::Secondary(renderer.new_frame(size))
|
||||
Frame::Secondary(renderer.new_frame(bounds))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue