mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Remove the UVec2 and IVec2 graph data types and have Artboard use DVec2 (#2894)
This commit is contained in:
@@ -466,11 +466,14 @@ async fn to_artboard<Data: Into<GraphicGroupTable> + 'n>(
|
||||
)]
|
||||
contents: impl Node<Context<'static>, Output = Data>,
|
||||
label: String,
|
||||
location: IVec2,
|
||||
dimensions: IVec2,
|
||||
location: DVec2,
|
||||
dimensions: DVec2,
|
||||
background: Color,
|
||||
clip: bool,
|
||||
) -> Artboard {
|
||||
let location = location.as_ivec2();
|
||||
let dimensions = dimensions.as_ivec2().max(IVec2::ONE);
|
||||
|
||||
let footprint = ctx.try_footprint().copied();
|
||||
let mut new_ctx = OwnedContextImpl::from(ctx);
|
||||
if let Some(mut footprint) = footprint {
|
||||
|
||||
@@ -26,8 +26,6 @@ pub mod types {
|
||||
pub type IntegerCount = u32;
|
||||
/// Unsigned integer to be used for random seeds
|
||||
pub type SeedValue = u32;
|
||||
/// Non-negative integer coordinate with px unit
|
||||
pub type Resolution = glam::UVec2;
|
||||
/// DVec2 with px unit
|
||||
pub type PixelSize = glam::DVec2;
|
||||
/// String with one or more than one line
|
||||
|
||||
@@ -165,8 +165,7 @@ tagged_value! {
|
||||
U64(u64),
|
||||
Bool(bool),
|
||||
String(String),
|
||||
UVec2(UVec2),
|
||||
IVec2(IVec2),
|
||||
#[serde(alias = "IVec2", alias = "UVec2")]
|
||||
DVec2(DVec2),
|
||||
DAffine2(DAffine2),
|
||||
OptionalF64(Option<f64>),
|
||||
|
||||
Reference in New Issue
Block a user