mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-04 13:30:48 +00:00
Implement the Brush tool (#1099)
* Implement Brush Node * Add color Input * Add VectorPointsNode * Add Erase Node * Adapt compilation infrastructure to allow non Image Frame inputs * Remove debug output from TransformNode * Fix transform calculation * Fix Blending by making the brush texture use associated alpha * Code improvements and UX polish * Rename Opacity to Flow * Add erase option to brush node + fix freehand tool * Fix crash * Revert erase implementation * Fix flattening id calculation * Fix some transformation issues * Fix changing the pivot location * Fix vector data modify bounds * Minor fn name cleanup * Fix some tests * Fix tests --------- Co-authored-by: Keavon Chambers <keavon@keavon.com> Co-authored-by: hypercube <0hypercube@gmail.com>
This commit is contained in:
parent
758f757775
commit
589ff9a2d3
36 changed files with 1527 additions and 406 deletions
|
@ -159,6 +159,27 @@ impl<T: StaticTypeSized> StaticType for *mut [T] {
|
|||
impl<'a, T: StaticTypeSized> StaticType for &'a [T] {
|
||||
type Static = &'static [<T as StaticTypeSized>::Static];
|
||||
}
|
||||
macro_rules! impl_slice {
|
||||
($($id:ident),*) => {
|
||||
$(
|
||||
impl<'a, T: StaticTypeSized> StaticType for $id<'a, T> {
|
||||
type Static = $id<'static, <T as StaticTypeSized>::Static>;
|
||||
}
|
||||
)*
|
||||
};
|
||||
}
|
||||
|
||||
mod slice {
|
||||
use super::*;
|
||||
use core::slice::*;
|
||||
impl_slice!(Iter, IterMut, Chunks, ChunksMut, RChunks, RChunksMut, Windows);
|
||||
}
|
||||
|
||||
#[cfg(feature = "alloc")]
|
||||
impl<'a, T: StaticTypeSized> StaticType for Box<dyn Iterator<Item = T> + 'a + Send + Sync> {
|
||||
type Static = Box<dyn Iterator<Item = T::Static> + Send + Sync>;
|
||||
}
|
||||
|
||||
impl<'a> StaticType for &'a str {
|
||||
type Static = &'static str;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue