use crate::coregraphics::CGFloat;
#[repr(C)]
#[derive(Copy, Clone, Debug)]
pub struct PLYDimension {
pub kind: PLYDimensionKind,
pub value: CGFloat,
}
#[repr(C)]
#[derive(Copy, Clone, Debug)]
pub enum PLYDimensionKind {
Pixels,
Percentage,
}
#[repr(C)]
#[derive(Copy, Clone, Debug)]
pub struct PLYPoint {
pub x: PLYDimension,
pub y: PLYDimension,
}
impl PLYPoint {
pub fn new(x: PLYDimension, y: PLYDimension) -> PLYPoint {
PLYPoint { x, y }
}
}
#[repr(C)]
#[derive(Copy, Clone, Debug)]
pub struct PLYLayoutAxisX<T> {
pub independent: bool,
pub start: T,
pub end: T,
}
#[repr(C)]
#[derive(Copy, Clone, Debug)]
pub struct PLYLayoutAxisY<T> {
pub top: T,
pub bottom: T,
}
#[repr(C)]
#[derive(Copy, Clone, Debug)]
pub struct PLYByEdge<T> {
pub horizontal: PLYLayoutAxisX<T>,
pub vertical: PLYLayoutAxisY<T>,
}
#[repr(C)]
#[derive(Copy, Clone, Debug)]
pub struct PLYCornerRadii {
pub top_left: PLYPoint,
pub top_right: PLYPoint,
pub bottom_right: PLYPoint,
pub bottom_left: PLYPoint,
}
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, PartialEq)]
pub struct PLYEdgeInsets {
pub top: CGFloat,
pub left: CGFloat,
pub bottom: CGFloat,
pub right: CGFloat,
}