mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 23:08:05 +08:00
* update Cargo.lock * f32: switch to f32 params * f32: more f32 params, remove f32 casts * f32: property support for f32 * f32: fix test `stable_node_id_generation` * Fix f32 properties * Fix f32 frontend data types * Rename TaggedValue::Vec2 to ::FVec2 and ::Affine2 to ::FAffine2 --------- Co-authored-by: hypercube <0hypercube@gmail.com> Co-authored-by: Keavon Chambers <keavon@keavon.com>
32 lines
791 B
Rust
32 lines
791 B
Rust
pub mod types {
|
|
/// 0% - 100%
|
|
pub type Percentage = f64;
|
|
/// 0% - 100%
|
|
pub type PercentageF32 = f32;
|
|
/// -100% - 100%
|
|
pub type SignedPercentage = f64;
|
|
/// -100% - 100%
|
|
pub type SignedPercentageF32 = f32;
|
|
/// -180° - 180°
|
|
pub type Angle = f64;
|
|
/// -180° - 180°
|
|
pub type AngleF32 = f32;
|
|
/// Ends in the unit of x
|
|
pub type Multiplier = f64;
|
|
/// Non-negative integer with px unit
|
|
pub type PixelLength = f64;
|
|
/// Non-negative
|
|
pub type Length = f64;
|
|
/// 0 to 1
|
|
pub type Fraction = f64;
|
|
/// Unsigned integer
|
|
pub type IntegerCount = u32;
|
|
/// Unsigned integer to be used for random seeds
|
|
pub type SeedValue = u32;
|
|
/// DVec2 with px unit
|
|
pub type PixelSize = glam::DVec2;
|
|
/// String with one or more than one line
|
|
#[cfg(feature = "std")]
|
|
pub type TextArea = String;
|
|
}
|