Write missing documentation in iced_graphics
This commit is contained in:
parent
dd04c0b070
commit
8622e998f2
8 changed files with 34 additions and 12 deletions
|
|
@ -1,8 +1,10 @@
|
|||
//! Track and compute the damage of graphical primitives.
|
||||
use crate::core::{Rectangle, Size};
|
||||
use crate::Primitive;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
/// Computes the damage regions between the two given primitives.
|
||||
pub fn regions(a: &Primitive, b: &Primitive) -> Vec<Rectangle> {
|
||||
match (a, b) {
|
||||
(
|
||||
|
|
@ -73,6 +75,7 @@ pub fn regions(a: &Primitive, b: &Primitive) -> Vec<Rectangle> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Computes the damage regions between the two given lists of primitives.
|
||||
pub fn list(previous: &[Primitive], current: &[Primitive]) -> Vec<Rectangle> {
|
||||
let damage = previous
|
||||
.iter()
|
||||
|
|
@ -95,6 +98,8 @@ pub fn list(previous: &[Primitive], current: &[Primitive]) -> Vec<Rectangle> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Groups the given damage regions that are close together inside the given
|
||||
/// bounds.
|
||||
pub fn group(
|
||||
mut damage: Vec<Rectangle>,
|
||||
scale_factor: f32,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue