Skip to main content

pax_std/drawing/pax_logo/
static_pax_logo.rs

1use crate::*;
2use pax_engine::api::*;
3use pax_engine::*;
4
5use super::animated_pax_logo_banner::settled_banner_paths;
6use super::animated_pax_logo_post::settled_post_paths;
7
8/// The settled Pax logo, using the animation's final geometry without masks.
9///
10/// This component has no playback or click behavior. It uses the same palette
11/// and 920.72 × 463.95 coordinate system as [`AnimatedPaxLogo`].
12#[pax]
13#[engine_import_path("pax_engine")]
14#[custom(Default)]
15#[file("drawing/pax_logo/static_pax_logo.pax")]
16pub struct StaticPaxLogo {
17    /// The surrounding surface; Dark exchanges the signboard and letter fills.
18    pub background_mode: Property<LogoBackgroundMode>,
19    /// Signboard/post fill in Light mode, lettering/counters in Dark mode.
20    pub fill: Property<Paint>,
21    /// Lettering/backing fill in Light mode, signboard/post in Dark mode.
22    pub letter_fill: Property<Paint>,
23    pub banner_elements: Property<Vec<PathElement>>,
24    pub p_ring_elements: Property<Vec<PathElement>>,
25    pub p_counter_elements: Property<Vec<PathElement>>,
26    pub a_elements: Property<Vec<PathElement>>,
27    pub a_counter_elements: Property<Vec<PathElement>>,
28    pub x_elements: Property<Vec<PathElement>>,
29    pub roll_start_cap_elements: Property<Vec<PathElement>>,
30    pub roll_body_elements: Property<Vec<PathElement>>,
31    pub roll_end_cap_elements: Property<Vec<PathElement>>,
32    pub top_fabric_elements: Property<Vec<PathElement>>,
33    pub fabric_elements: Property<Vec<PathElement>>,
34    pub backing_fabric_elements: Property<Vec<PathElement>>,
35}
36
37impl Default for StaticPaxLogo {
38    fn default() -> Self {
39        let [banner, p_ring, p_counter, a, a_counter, x] = settled_banner_paths();
40        let [roll_start, roll_body, roll_end, top_fabric, fabric, backing_fabric] =
41            settled_post_paths();
42        Self {
43            background_mode: Property::new(LogoBackgroundMode::Light),
44            fill: Property::new(Paint::Solid(Color::BLACK)),
45            letter_fill: Property::new(Paint::Solid(Color::WHITE)),
46            banner_elements: Property::new(banner),
47            p_ring_elements: Property::new(p_ring),
48            p_counter_elements: Property::new(p_counter),
49            a_elements: Property::new(a),
50            a_counter_elements: Property::new(a_counter),
51            x_elements: Property::new(x),
52            roll_start_cap_elements: Property::new(roll_start),
53            roll_body_elements: Property::new(roll_body),
54            roll_end_cap_elements: Property::new(roll_end),
55            top_fabric_elements: Property::new(top_fabric),
56            fabric_elements: Property::new(fabric),
57            backing_fabric_elements: Property::new(backing_fabric),
58        }
59    }
60}