mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-26 10:47:11 -06:00
M3.44: graphic styles keep opacity and blend, capture groups and type, add on Alt-click
Styles now store the object's opacity, blend mode, isolate and knockout and apply them. New Graphic Style from a group without its own paint captures its topmost object's appearance, and from type its characters' fill and stroke. Names are made unique. graphicStyle.apply takes ids and add (Alt-click in the panel adds the style on top of the existing appearance). graphicStyle.list reports every style. Applying links objects to a stable style id (Node.graphic_style), which the management commands build on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6bd27a05da
commit
eb83efdb19
@@ -270,6 +270,10 @@ pub struct Node {
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub graph: Option<Box<crate::graph::GraphSpec>>,
|
||||
pub kind: NodeKind,
|
||||
/// The [`crate::GraphicStyle::id`] last applied to this object. It stays linked while it keeps
|
||||
/// that style's look: editing its appearance or transparency breaks the link.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub graphic_style: Option<u32>,
|
||||
}
|
||||
|
||||
/// Opacity mask: the luminance of the mask art sets the object's opacity (white = opaque).
|
||||
@@ -314,6 +318,7 @@ impl Node {
|
||||
wrap: None,
|
||||
graph: None,
|
||||
kind,
|
||||
graphic_style: None,
|
||||
}
|
||||
}
|
||||
pub fn path(id: NodeId, path: PathData, appearance: Appearance) -> Self {
|
||||
|
||||
Reference in New Issue
Block a user