mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-07 23:28:11 +08:00
Re-export all of gcore in gstd and rename 'Image' node to 'Image Value' (#2733)
* rename `image` node to `image_value` * reexport the entirety of `gcore` in `gstd`
This commit is contained in:
committed by
Keavon Chambers
parent
68985868fa
commit
13226f7049
@@ -211,8 +211,8 @@ impl<'a> ModifyInputsContext<'a> {
|
|||||||
|
|
||||||
pub fn insert_image_data(&mut self, image_frame: RasterDataTable<CPU>, layer: LayerNodeIdentifier) {
|
pub fn insert_image_data(&mut self, image_frame: RasterDataTable<CPU>, layer: LayerNodeIdentifier) {
|
||||||
let transform = resolve_document_node_type("Transform").expect("Transform node does not exist").default_node_template();
|
let transform = resolve_document_node_type("Transform").expect("Transform node does not exist").default_node_template();
|
||||||
let image = resolve_document_node_type("Image")
|
let image = resolve_document_node_type("Image Value")
|
||||||
.expect("Image node does not exist")
|
.expect("ImageValue node does not exist")
|
||||||
.node_template_input_override([Some(NodeInput::value(TaggedValue::None, false)), Some(NodeInput::value(TaggedValue::RasterData(image_frame), false))]);
|
.node_template_input_override([Some(NodeInput::value(TaggedValue::None, false)), Some(NodeInput::value(TaggedValue::RasterData(image_frame), false))]);
|
||||||
|
|
||||||
let image_id = NodeId::new();
|
let image_id = NodeId::new();
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ wgpu = ["gpu", "graph-craft/wgpu"]
|
|||||||
wasm = ["wasm-bindgen", "web-sys"]
|
wasm = ["wasm-bindgen", "web-sys"]
|
||||||
imaginate = ["image/png", "base64", "web-sys", "wasm-bindgen-futures"]
|
imaginate = ["image/png", "base64", "web-sys", "wasm-bindgen-futures"]
|
||||||
image-compare = []
|
image-compare = []
|
||||||
vello = ["dep:vello", "gpu"]
|
vello = ["dep:vello", "gpu", "graphene-core/vello"]
|
||||||
resvg = []
|
resvg = []
|
||||||
wayland = ["graph-craft/wayland"]
|
wayland = ["graph-craft/wayland"]
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
pub mod any;
|
pub mod any;
|
||||||
pub mod http;
|
|
||||||
pub mod raster;
|
|
||||||
pub mod text;
|
|
||||||
pub mod vector;
|
|
||||||
pub use graphene_core::*;
|
|
||||||
pub mod brush;
|
pub mod brush;
|
||||||
pub mod dehaze;
|
pub mod dehaze;
|
||||||
pub mod filter;
|
pub mod filter;
|
||||||
|
pub mod http;
|
||||||
pub mod image_color_palette;
|
pub mod image_color_palette;
|
||||||
|
pub mod raster;
|
||||||
|
pub mod text;
|
||||||
|
pub mod vector;
|
||||||
#[cfg(feature = "wasm")]
|
#[cfg(feature = "wasm")]
|
||||||
pub mod wasm_application_io;
|
pub mod wasm_application_io;
|
||||||
|
|
||||||
|
pub use graphene_core::*;
|
||||||
|
|||||||
@@ -3,12 +3,10 @@ use fastnoise_lite;
|
|||||||
use glam::{DAffine2, DVec2, Vec2};
|
use glam::{DAffine2, DVec2, Vec2};
|
||||||
use graphene_core::instances::Instance;
|
use graphene_core::instances::Instance;
|
||||||
use graphene_core::raster::bbox::Bbox;
|
use graphene_core::raster::bbox::Bbox;
|
||||||
use graphene_core::raster::{
|
pub use graphene_core::raster::*;
|
||||||
Alpha, AlphaMut, Bitmap, BitmapMut, CellularDistanceFunction, CellularReturnType, Channel, DomainWarpType, FractalType, Image, LinearChannel, Luminance, NoiseType, RGBMut,
|
|
||||||
};
|
|
||||||
use graphene_core::raster_types::{CPU, Raster, RasterDataTable};
|
use graphene_core::raster_types::{CPU, Raster, RasterDataTable};
|
||||||
use graphene_core::transform::Transform;
|
use graphene_core::transform::Transform;
|
||||||
use graphene_core::{AlphaBlending, Color, Ctx, ExtractFootprint};
|
use graphene_core::{AlphaBlending, Ctx, ExtractFootprint};
|
||||||
use rand::prelude::*;
|
use rand::prelude::*;
|
||||||
use rand_chacha::ChaCha8Rng;
|
use rand_chacha::ChaCha8Rng;
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
@@ -303,7 +301,7 @@ fn empty_image(_: impl Ctx, transform: DAffine2, color: Color) -> RasterDataTabl
|
|||||||
|
|
||||||
/// Constructs a raster image.
|
/// Constructs a raster image.
|
||||||
#[node_macro::node(category(""))]
|
#[node_macro::node(category(""))]
|
||||||
fn image(_: impl Ctx, _primary: (), image: RasterDataTable<CPU>) -> RasterDataTable<CPU> {
|
fn image_value(_: impl Ctx, _primary: (), image: RasterDataTable<CPU>) -> RasterDataTable<CPU> {
|
||||||
image
|
image
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
use crate::vector::{VectorData, VectorDataTable};
|
use crate::vector::{VectorData, VectorDataTable};
|
||||||
use graph_craft::wasm_application_io::WasmEditorApi;
|
use graph_craft::wasm_application_io::WasmEditorApi;
|
||||||
use graphene_core::Ctx;
|
use graphene_core::Ctx;
|
||||||
use graphene_core::text::TypesettingConfig;
|
pub use graphene_core::text::*;
|
||||||
pub use graphene_core::text::{Font, FontCache, bounding_box, load_face, to_path};
|
|
||||||
|
|
||||||
#[node_macro::node(category(""))]
|
#[node_macro::node(category(""))]
|
||||||
fn text<'i: 'n>(
|
fn text<'i: 'n>(
|
||||||
|
|||||||
Reference in New Issue
Block a user