Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions kurbo/src/axis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use crate::{Point, Size, Vec2};

/// An axis in the plane.
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
#[repr(u8)]
pub enum Axis {
/// The x axis.
Horizontal,
Expand Down
1 change: 1 addition & 0 deletions kurbo/src/cubicbez.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ struct ToQuads {

/// Classification result for cusp detection.
#[derive(Debug)]
#[repr(u8)]
pub enum CuspType {
/// Cusp is a loop.
Loop,
Expand Down
1 change: 1 addition & 0 deletions kurbo/src/simplify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ pub struct SimplifyOptions {
}

/// Optimization level for simplification.
#[repr(u8)]
pub enum SimplifyOptLevel {
/// Subdivide; faster but not as optimized results.
Subdivide,
Expand Down
3 changes: 3 additions & 0 deletions kurbo/src/stroke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ use crate::{
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[repr(u8)]
pub enum Join {
/// A straight line connecting the segments.
Bevel,
Expand All @@ -32,6 +33,7 @@ pub enum Join {
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[repr(u8)]
pub enum Cap {
/// Flat cap.
Butt,
Expand Down Expand Up @@ -76,6 +78,7 @@ pub struct StrokeOpts {
/// should set it appropriately. For real time rendering, the appropriate
/// value is `Subdivide`.
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
#[repr(u8)]
pub enum StrokeOptLevel {
/// Adaptively subdivide segments in half.
Subdivide,
Expand Down
Loading