mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-11 16:33:22 -06:00
Select: Start Global Edit edits the objects of the same shape together, each in proportion
Squashed from #3781 onto main.
This commit is contained in:
@@ -559,7 +559,7 @@ fn anchors_many(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
|
||||
/// Select › Same › Fill/Stroke Color: is `a` the same colour as `b`? Tints of one global or spot
|
||||
/// swatch are, unless `tint` (General › Select Same Tint %) asks for the same tint too.
|
||||
fn same_paint(a: &Paint, b: &Paint, tint: bool) -> bool {
|
||||
pub(crate) fn same_paint(a: &Paint, b: &Paint, tint: bool) -> bool {
|
||||
match (a, b) {
|
||||
(Paint::Solid { swatch: Some(x), tint: ta, .. }, Paint::Solid { swatch: Some(y), tint: tb, .. }) if x == y => !tint || (ta - tb).abs() < 1e-4,
|
||||
_ => a == b,
|
||||
|
||||
Reference in New Issue
Block a user