mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-13 22:21:59 +00:00
A top-object envelope gives each piece of a side a share of the content in proportion to its control polygon's length. When anchors split a curve without changing its shape, the pieces' polygons don't divide the side where the curve's own parameter does, so the envelope bent its contents differently although its outline was the same: Add Anchor Points on a top object moved the art, and a top object whose .ai mesh saves each side's curve split into thirds drew its type up to about half a point off its drawn art, which follows the whole curve's parameter. Coons::from_top_object now checks whether a side's pieces, from corner to corner, are all pieces of one cubic. The pieces' spans of that curve's parameter come from the handle lengths either side of each split, the curve from the outer ends and handles, and every piece must lie within 0.02 pt of the curve's piece over its span (each control point). Such a side runs along that curve, by its parameter. Any other side keeps the polygon shares, including a side only partly made of one curve and a smooth side drawn in many pieces that isn't one curve as a whole. Corners found from the outline can still move when anchors are added, as before. Gradient meshes made from a path are unchanged. Existing top-object envelopes with such sides redraw. a_split_curve_moves_the_top_object_share_to_its_new_anchor, which pinned the earlier behaviour, becomes a_split_curve_keeps_the_top_object_patch. Tests: a_split_curve_keeps_the_top_object_patch, a_top_object_joins_a_split_curve_saved_with_rounded_coordinates, a_top_object_keeps_smoothly_joined_curves_apart, a_top_object_side_partly_of_one_curve_keeps_the_polygon_shares and a_top_object_side_of_many_arcs_stays_on_them (vectorcraft-doc), envelope_top_object_keeps_its_look_when_anchors_are_added (vectorcraft-engine) and a_top_object_whose_top_is_one_curve_split_in_thirds_opens_live (vectorcraft-eps). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>