mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-26 23:58:03 +00:00
Effects: a painted clipping path's fill and stroke effects apply before a group's
A clipping path that paints a fill or stroke kept the geometry effects of those fills and strokes live, so a geometry effect on the clip group or on a group around it reshaped the path first and the fill's or stroke's effect applied after it, on the canvas and in export alike. Unpainted clipping paths already applied them first. The clipping path now becomes one path per fill and stroke with those effects applied, as an unpainted one does, in a group marked as such pieces (`NodeExtras::clip_pieces`, saved with the document). `clip_paint` paints that group's fill pieces behind the clipped art and its stroke pieces over it, as the path paints its fills and strokes, also after an effect around it turns a piece into a compound path or puts it in a group. The clip group's visual bounds take in the stroke pieces' width, and HP-GL export draws the clipping path once, in its stroke pieces. An export of a painted clipping path with such effects in a clip group without effects of its own also keeps its fill and stroke now, where the baked pieces painted nothing.
This commit is contained in:
@@ -79,6 +79,10 @@ pub struct NodeExtras {
|
||||
/// knockout group its knockout shape is the whole area of its triangle, not only where the
|
||||
/// image is opaque ([`Node::knockout_outline`]).
|
||||
pub warp_piece: bool,
|
||||
/// A group of the pieces a clipping path's fills and strokes draw once their geometry effects
|
||||
/// are applied, one path or compound path per fill and stroke: as the clipping path of a clip group it paints
|
||||
/// those pieces as the path paints its fills and strokes ([`Node::clip_paint`]).
|
||||
pub clip_pieces: bool,
|
||||
}
|
||||
|
||||
/// No extras: what [`Node::extras`] gives for a node without any.
|
||||
@@ -108,6 +112,7 @@ pub(super) static NO_EXTRAS: NodeExtras = NodeExtras {
|
||||
pixel_aligned: false,
|
||||
color_mask: None,
|
||||
warp_piece: false,
|
||||
clip_pieces: false,
|
||||
};
|
||||
|
||||
/// A node's [`NodeExtras`], if it has any ([`Node::extras`]). Extras that are all unset equal
|
||||
|
||||
Reference in New Issue
Block a user