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
/// The affected paint component of a shape or line.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[non_exhaustive]
pub enum PaintRole {
Fill,
Outline,
}
/// Why a shape or line paint component was omitted during rendering.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[non_exhaustive]
pub enum PaintDiagnosticKind {
/// The saved paint type has no admitted rendering implementation.
UnsupportedPaint,
/// An enabled paint has no retained source.
MissingPaintSource,
/// The saved gradient stops or parameters do not meet admission constraints.
InvalidGradient,
/// The saved shape frame is outside the supported native gradient mapping.
UnsupportedGradientFrame,
/// Admitted gradient data cannot produce finite, representable output geometry.
UnrepresentableGradient,
}
/// An omitted fill or outline, identified within its rendered backing page.
/// Geometry and independently admitted paint components remain eligible for rendering.
#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct PaintDiagnostic {
/// Payload offset in the original page bytes; absent for constructed objects.
pub source_offset: Option<usize>,
pub object_uuid: String,
pub role: PaintRole,
pub kind: PaintDiagnosticKind,
}