mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-12-23 10:11:54 +00: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:
parent
426f3b2cb4
commit
0c5bccc2fd
4 changed files with 44 additions and 4 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue