1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
use basic_types::StraightSRgba8; use fixed_point::{Fixed16P16, Fixed8P8}; use gradient::ColorStop; use ordered_float::OrderedFloat; #[derive(Serialize, Deserialize, Debug, PartialEq, Eq)] #[serde(rename_all = "snake_case")] pub struct Blur { pub blur_x: Fixed16P16, pub blur_y: Fixed16P16, pub passes: u8, } #[derive(Serialize, Deserialize, Debug, PartialEq, Eq)] #[serde(rename_all = "snake_case")] pub struct Bevel { pub shadow_color: StraightSRgba8, pub highlight_color: StraightSRgba8, pub blur_x: Fixed16P16, pub blur_y: Fixed16P16, pub angle: Fixed16P16, pub distance: Fixed16P16, pub strength: Fixed8P8, pub inner: bool, pub knockout: bool, pub composite_source: bool, pub on_top: bool, pub passes: u8, } #[derive(Serialize, Deserialize, Debug, PartialEq, Eq)] #[serde(rename_all = "snake_case")] pub struct ColorMatrix { pub matrix: Vec<OrderedFloat<f32>>, } #[derive(Serialize, Deserialize, Debug, PartialEq, Eq)] #[serde(rename_all = "snake_case")] pub struct Convolution { pub matrix_width: usize, pub matrix_height: usize, pub divisor: OrderedFloat<f32>, pub bias: OrderedFloat<f32>, pub matrix: Vec<OrderedFloat<f32>>, pub default_color: StraightSRgba8, pub clamp: bool, pub preserve_alpha: bool, } #[derive(Serialize, Deserialize, Debug, PartialEq, Eq)] #[serde(rename_all = "snake_case")] pub struct DropShadow { pub color: StraightSRgba8, pub blur_x: Fixed16P16, pub blur_y: Fixed16P16, pub angle: Fixed16P16, pub distance: Fixed16P16, pub strength: Fixed8P8, pub inner: bool, pub knockout: bool, pub composite_source: bool, pub passes: u8, } #[derive(Serialize, Deserialize, Debug, PartialEq, Eq)] #[serde(rename_all = "snake_case")] pub struct Glow { pub color: StraightSRgba8, pub blur_x: Fixed16P16, pub blur_y: Fixed16P16, pub strength: Fixed8P8, pub inner: bool, pub knockout: bool, pub composite_source: bool, pub passes: u8, } #[derive(Serialize, Deserialize, Debug, PartialEq, Eq)] #[serde(rename_all = "snake_case")] pub struct GradientBevel { pub gradient: Vec<ColorStop>, pub blur_x: Fixed16P16, pub blur_y: Fixed16P16, pub angle: Fixed16P16, pub distance: Fixed16P16, pub strength: Fixed8P8, pub inner: bool, pub knockout: bool, pub composite_source: bool, pub on_top: bool, pub passes: u8, } #[derive(Serialize, Deserialize, Debug, PartialEq, Eq)] #[serde(rename_all = "snake_case")] pub struct GradientGlow { pub gradient: Vec<ColorStop>, pub blur_x: Fixed16P16, pub blur_y: Fixed16P16, pub angle: Fixed16P16, pub distance: Fixed16P16, pub strength: Fixed8P8, pub inner: bool, pub knockout: bool, pub composite_source: bool, pub on_top: bool, pub passes: u8, }