|
| 1 | +use crate::brush_cache::BrushCache; |
| 2 | +use crate::brush_stroke::{BrushStroke, BrushStyle}; |
1 | 3 | use glam::{DAffine2, DVec2}; |
2 | | -use graph_craft::generic::FnNode; |
3 | | -use graph_craft::proto::FutureWrapperNode; |
| 4 | +use graphene_core::blending::BlendMode; |
4 | 5 | use graphene_core::bounds::BoundingBox; |
| 6 | +use graphene_core::color::{Alpha, Color, Pixel, Sample}; |
| 7 | +use graphene_core::generic::FnNode; |
5 | 8 | use graphene_core::instances::Instance; |
6 | 9 | use graphene_core::math::bbox::{AxisAlignedBbox, Bbox}; |
7 | | -use graphene_core::raster::brush_cache::BrushCache; |
| 10 | +use graphene_core::raster::BitmapMut; |
8 | 11 | use graphene_core::raster::image::Image; |
9 | | -use graphene_core::raster::{Alpha, BitmapMut, BlendMode, Color, Pixel, Sample}; |
10 | 12 | use graphene_core::raster_types::{CPU, Raster, RasterDataTable}; |
| 13 | +use graphene_core::registry::FutureWrapperNode; |
11 | 14 | use graphene_core::transform::Transform; |
12 | 15 | use graphene_core::value::ClonedNode; |
13 | | -use graphene_core::vector::brush_stroke::{BrushStroke, BrushStyle}; |
14 | | -use graphene_core::{Ctx, GraphicElement, Node}; |
| 16 | +use graphene_core::{Ctx, Node}; |
15 | 17 | use graphene_raster_nodes::adjustments::blend_colors; |
16 | 18 | use graphene_raster_nodes::std_nodes::{empty_image, extend_image_to_bounds}; |
17 | 19 |
|
@@ -50,7 +52,7 @@ impl<P: Pixel + Alpha> Sample for BrushStampGenerator<P> { |
50 | 52 | return None; |
51 | 53 | }; |
52 | 54 |
|
53 | | - use graphene_core::raster::Channel; |
| 55 | + use graphene_core::color::Channel; |
54 | 56 | Some(self.color.multiplied_alpha(P::AlphaChannel::from_linear(result))) |
55 | 57 | } |
56 | 58 | } |
@@ -78,7 +80,6 @@ fn brush_stamp_generator(#[unit(" px")] diameter: f64, color: Color, hardness: f |
78 | 80 | fn blit<BlendFn>(mut target: RasterDataTable<CPU>, texture: Raster<CPU>, positions: Vec<DVec2>, blend_mode: BlendFn) -> RasterDataTable<CPU> |
79 | 81 | where |
80 | 82 | BlendFn: for<'any_input> Node<'any_input, (Color, Color), Output = Color>, |
81 | | - GraphicElement: From<Raster<CPU>>, |
82 | 83 | { |
83 | 84 | if positions.is_empty() { |
84 | 85 | return target; |
@@ -392,7 +393,7 @@ mod test { |
392 | 393 | (), |
393 | 394 | RasterDataTable::<CPU>::new(Raster::new_cpu(Image::<Color>::default())), |
394 | 395 | vec![BrushStroke { |
395 | | - trace: vec![crate::vector::brush_stroke::BrushInputSample { position: DVec2::ZERO }], |
| 396 | + trace: vec![crate::brush_stroke::BrushInputSample { position: DVec2::ZERO }], |
396 | 397 | style: BrushStyle { |
397 | 398 | color: Color::BLACK, |
398 | 399 | diameter: 20., |
|
0 commit comments