mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Make the primitive shape tools avoid setting a negative transform scale (#1973)
* Fix transformation for primitive tools, make odd-sided polygons and stars flipped with radius instead of scale * Extract to function and add comment * Code review --------- Co-authored-by: hypercube <0hypercube@gmail.com> Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
@@ -194,6 +194,13 @@ impl TaggedValue {
|
||||
_ => panic!("Cannot convert to primitive string"),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn to_u32(&self) -> u32 {
|
||||
match self {
|
||||
TaggedValue::U32(x) => *x,
|
||||
_ => panic!("Passed value is not of type u32"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Display for TaggedValue {
|
||||
|
||||
Reference in New Issue
Block a user