mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-24 03:08:13 +08:00
Condense the narrative comments to their constraints
This commit is contained in:
@@ -2094,12 +2094,7 @@ fn collect_raster_metadata<S: LaneSource>(source: &S, metadata: &mut RenderMetad
|
|||||||
let transform: DAffine2 = source.attr::<Transform>(0);
|
let transform: DAffine2 = source.attr::<Transform>(0);
|
||||||
metadata.local_transforms.insert(element_id, transform);
|
metadata.local_transforms.insert(element_id, transform);
|
||||||
|
|
||||||
// If this raster carries a snapshot of upstream graphic content (e.g. it was produced by Rasterize,
|
// The snapshot's children already match `footprint`, so `transform` (the rasterization area) must not be applied.
|
||||||
// which destructively merges its inputs into pixels), recurse into that snapshot so the editor can
|
|
||||||
// surface the original child layers' click targets (the same mechanism Boolean Operation uses).
|
|
||||||
// The snapshot was captured before Rasterize shifted its input transforms to align with the rasterization
|
|
||||||
// area, so the children are already in the coordinate space matching `footprint` here — we must NOT
|
|
||||||
// multiply in `transform` (which is the rasterization area, not a layer-stack transform).
|
|
||||||
if let Some(upstream_nested_layers) = source.attr::<EditorMergedLayers>(0).filter(|layers| !layers.is_empty()) {
|
if let Some(upstream_nested_layers) = source.attr::<EditorMergedLayers>(0).filter(|layers| !layers.is_empty()) {
|
||||||
upstream_nested_layers.collect_metadata(metadata, footprint, None);
|
upstream_nested_layers.collect_metadata(metadata, footprint, None);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,10 +129,7 @@ pub(crate) fn generate_node_code(crate_ident: &CrateIdent, parsed: &ParsedNodeFn
|
|||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
// Flipped nodes carry their kernel generics as struct parameters: record
|
// Flipped kernels and ranked-input element generics must be carried as struct parameters.
|
||||||
// edges no longer bind them through `Output`, so the struct must. A
|
|
||||||
// ranked input's element generic is carried on any node kind for the
|
|
||||||
// same reason: the materialized view monomorphizes the kernel per row.
|
|
||||||
let ctx_ident_for_flip = context_param(parsed).map(|ctx| ctx.ident.clone());
|
let ctx_ident_for_flip = context_param(parsed).map(|ctx| ctx.ident.clone());
|
||||||
let ranked_carries = |ident: &Ident| {
|
let ranked_carries = |ident: &Ident| {
|
||||||
regular_fields.iter().any(|field| match &field.ty {
|
regular_fields.iter().any(|field| match &field.ty {
|
||||||
|
|||||||
@@ -349,12 +349,8 @@ fn mirror_vector_extent(
|
|||||||
|
|
||||||
pub use _mirror_vector_mod::mirror_vector_entries;
|
pub use _mirror_vector_mod::mirror_vector_entries;
|
||||||
|
|
||||||
/// Returns the path identifying the subgraph (network) that contains this proto node — i.e. the input `node_path`
|
/// `node_path` with its trailing entry dropped: the containing network's path, which is also a unique
|
||||||
/// with its own trailing entry dropped. The terminating element of the returned path is the document node whose
|
/// reference to the owning document node at any nesting depth. Stamped onto `editor:layer_path`.
|
||||||
/// encapsulated network we live in, so the path doubles as a unique reference to that node at any nesting depth.
|
|
||||||
/// Used as the value source for stamping the `editor:layer_path` attribute on each item of a layer's output, which lets
|
|
||||||
/// editor tools (e.g. selection, click target routing) trace data back to its owning layer regardless of whether
|
|
||||||
/// the layer is at the root document network or nested inside a custom subgraph.
|
|
||||||
#[node_macro::node(name("Path of Subgraph"), category(""))]
|
#[node_macro::node(name("Path of Subgraph"), category(""))]
|
||||||
pub fn path_of_subgraph(_: impl Ctx, node_path: Vec<NodeId>) -> Vec<NodeId> {
|
pub fn path_of_subgraph(_: impl Ctx, node_path: Vec<NodeId>) -> Vec<NodeId> {
|
||||||
let len = node_path.len();
|
let len = node_path.len();
|
||||||
|
|||||||
Reference in New Issue
Block a user