use crate::model::dimension::{Dimension, Emu, SixtieThousandthDeg, ThousandthPercent};
use crate::model::geometry::{EdgeInsets, Offset, Size};
use super::content::Block;
use super::drawing_color::DrawingColor;
use super::identifiers::RelId;
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ImageFormat {
Png,
Jpeg,
Gif,
Bmp,
Tiff,
Emf,
Wmf,
Svg,
WebP,
Unknown,
}
impl ImageFormat {
pub fn detect(target_path: &str, data: &[u8]) -> Self {
let ext = target_path
.rsplit('.')
.next()
.map(|e| e.to_ascii_lowercase());
match ext.as_deref() {
Some("png") => Self::Png,
Some("jpg" | "jpeg") => Self::Jpeg,
Some("gif") => Self::Gif,
Some("bmp") => Self::Bmp,
Some("tif" | "tiff") => Self::Tiff,
Some("emf") => Self::Emf,
Some("wmf") => Self::Wmf,
Some("svg" | "svgz") => Self::Svg,
Some("webp") => Self::WebP,
_ => Self::detect_by_magic(data),
}
}
fn detect_by_magic(data: &[u8]) -> Self {
match data {
[0x89, b'P', b'N', b'G', ..] => Self::Png,
[0xFF, 0xD8, 0xFF, ..] => Self::Jpeg,
[b'G', b'I', b'F', b'8', ..] => Self::Gif,
[b'B', b'M', ..] => Self::Bmp,
[0x01, 0x00, 0x00, 0x00, _, _, _, _, 0x20, 0x45, 0x4D, 0x46, ..] => Self::Emf,
[b'R', b'I', b'F', b'F', _, _, _, _, b'W', b'E', b'B', b'P', ..] => Self::WebP,
[b'<', ..] => Self::Svg,
_ => Self::Unknown,
}
}
}
#[derive(Clone, Debug)]
pub struct Image {
pub extent: Size<Emu>,
pub effect_extent: Option<EdgeInsets<Emu>>,
pub doc_properties: DocProperties,
pub graphic_frame_locks: Option<GraphicFrameLocks>,
pub graphic: Option<GraphicContent>,
pub placement: ImagePlacement,
}
#[derive(Clone, Debug)]
pub enum ImagePlacement {
Inline {
distance: EdgeInsets<Emu>,
},
Anchor(AnchorProperties),
}
#[derive(Clone, Debug)]
pub struct DocProperties {
pub id: u32,
pub name: String,
pub description: Option<String>,
pub hidden: Option<bool>,
pub title: Option<String>,
}
#[derive(Clone, Copy, Debug)]
pub struct GraphicFrameLocks {
pub no_change_aspect: Option<bool>,
pub no_drilldown: Option<bool>,
pub no_grp: Option<bool>,
pub no_move: Option<bool>,
pub no_resize: Option<bool>,
pub no_select: Option<bool>,
}
#[derive(Clone, Debug)]
pub enum GraphicContent {
Picture(Picture),
WordProcessingShape(WordProcessingShape),
}
#[derive(Clone, Debug)]
pub struct WordProcessingShape {
pub cnv_pr: Option<DocProperties>,
pub shape_properties: Option<ShapeProperties>,
pub style_line_ref: Option<StyleMatrixRef>,
pub style_effect_ref: Option<StyleMatrixRef>,
pub body_pr: Option<BodyProperties>,
pub txbx_content: Vec<Block>,
}
#[derive(Clone, Debug)]
pub struct StyleMatrixRef {
pub idx: u32,
pub color: Option<DrawingColor>,
}
#[derive(Clone, Debug)]
pub struct BodyProperties {
pub rotation: Option<Dimension<SixtieThousandthDeg>>,
pub vert: Option<TextVerticalType>,
pub wrap: Option<TextWrappingType>,
pub left_inset: Option<Dimension<Emu>>,
pub top_inset: Option<Dimension<Emu>>,
pub right_inset: Option<Dimension<Emu>>,
pub bottom_inset: Option<Dimension<Emu>>,
pub anchor: Option<TextAnchoringType>,
pub auto_fit: Option<TextAutoFit>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TextVerticalType {
Horz,
Vert,
Vert270,
WordArtVert,
EaVert,
MongolianVert,
WordArtVertRtl,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TextWrappingType {
None,
Square,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TextAnchoringType {
Top,
Center,
Bottom,
Justified,
Distributed,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TextAutoFit {
NoAutoFit,
NormalAutoFit,
SpAutoFit,
}
#[derive(Clone, Debug)]
pub struct Picture {
pub nv_pic_pr: NvPicProperties,
pub blip_fill: BlipFill,
pub shape_properties: Option<ShapeProperties>,
}
#[derive(Clone, Debug)]
pub struct NvPicProperties {
pub cnv_pr: DocProperties,
pub cnv_pic_pr: Option<CnvPicProperties>,
}
#[derive(Clone, Debug)]
pub struct CnvPicProperties {
pub prefer_relative_resize: Option<bool>,
pub pic_locks: Option<PicLocks>,
}
#[derive(Clone, Copy, Debug)]
pub struct PicLocks {
pub no_change_aspect: Option<bool>,
pub no_crop: Option<bool>,
pub no_resize: Option<bool>,
pub no_move: Option<bool>,
pub no_rot: Option<bool>,
pub no_select: Option<bool>,
pub no_edit_points: Option<bool>,
pub no_adjust_handles: Option<bool>,
pub no_change_arrowheads: Option<bool>,
pub no_change_shape_type: Option<bool>,
pub no_grp: Option<bool>,
}
#[derive(Clone, Debug)]
pub struct BlipFill {
pub rotate_with_shape: Option<bool>,
pub dpi: Option<u32>,
pub blip: Option<Blip>,
pub src_rect: Option<RelativeRect>,
pub fill_kind: BlipFillKind,
}
#[derive(Clone, Debug)]
pub enum BlipFillKind {
Stretch(StretchFill),
Tile(TileFill),
Unspecified,
}
#[derive(Clone, Copy, Debug)]
pub struct TileFill {
pub tx: Option<Dimension<Emu>>,
pub ty: Option<Dimension<Emu>>,
pub sx: Option<Dimension<ThousandthPercent>>,
pub sy: Option<Dimension<ThousandthPercent>>,
pub flip: Option<TileFlipMode>,
pub alignment: Option<RectAlignment>,
}
#[derive(Clone, Debug)]
pub struct Blip {
pub embed: Option<RelId>,
pub link: Option<RelId>,
pub compression: Option<BlipCompression>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum BlipCompression {
Email,
Hqprint,
None,
Print,
Screen,
}
#[derive(Clone, Copy, Debug)]
pub struct RelativeRect {
pub left: Option<Dimension<ThousandthPercent>>,
pub top: Option<Dimension<ThousandthPercent>>,
pub right: Option<Dimension<ThousandthPercent>>,
pub bottom: Option<Dimension<ThousandthPercent>>,
}
#[derive(Clone, Copy, Debug)]
pub struct StretchFill {
pub fill_rect: Option<RelativeRect>,
}
#[derive(Clone, Debug)]
pub struct ShapeProperties {
pub bw_mode: Option<BlackWhiteMode>,
pub transform: Option<Transform2D>,
pub geometry: Option<ShapeGeometry>,
pub fill: Option<DrawingFill>,
pub outline: Option<Outline>,
pub effect_list: Option<EffectList>,
}
#[derive(Clone, Copy, Debug)]
pub struct Transform2D {
pub rotation: Option<Dimension<SixtieThousandthDeg>>,
pub flip_h: Option<bool>,
pub flip_v: Option<bool>,
pub offset: Option<Offset<Emu>>,
pub extent: Option<Size<Emu>>,
}
#[derive(Clone, Debug)]
pub struct PresetGeometryDef {
pub preset: PresetShapeType,
pub adjust_values: Vec<GeomGuide>,
}
#[derive(Clone, Debug)]
pub struct GeomGuide {
pub name: String,
pub formula: String,
}
#[derive(Clone, Debug, Default)]
pub struct CustomGeometry {
pub av_list: Vec<GeomGuide>,
pub gd_list: Vec<GeomGuide>,
pub ah_list: Vec<AdjustHandle>,
pub cxn_list: Vec<ConnectionSite>,
pub rect: Option<TextRect>,
pub paths: Vec<PathDef>,
}
#[derive(Clone, Debug)]
pub struct PathDef {
pub w: Dimension<Emu>,
pub h: Dimension<Emu>,
pub fill: PathFillMode,
pub stroke: bool,
pub extrusion_ok: bool,
pub commands: Vec<PathCommand>,
}
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
pub enum PathFillMode {
None,
#[default]
Norm,
Lighten,
LightenLess,
Darken,
DarkenLess,
}
#[derive(Clone, Debug)]
pub enum PathCommand {
MoveTo(AdjPoint),
LineTo(AdjPoint),
CubicBezTo(AdjPoint, AdjPoint, AdjPoint),
QuadBezTo(AdjPoint, AdjPoint),
ArcTo {
wr: AdjCoord,
hr: AdjCoord,
start_angle: AdjAngle,
swing_angle: AdjAngle,
},
Close,
}
#[derive(Clone, Debug)]
pub struct AdjPoint {
pub x: AdjCoord,
pub y: AdjCoord,
}
#[derive(Clone, Debug, PartialEq)]
pub enum AdjCoord {
Lit(i64),
Guide(String),
}
pub type AdjAngle = AdjCoord;
#[derive(Clone, Debug)]
pub enum AdjustHandle {
XY {
guide_ref_x: Option<String>,
guide_ref_y: Option<String>,
min_x: Option<AdjCoord>,
max_x: Option<AdjCoord>,
min_y: Option<AdjCoord>,
max_y: Option<AdjCoord>,
position: AdjPoint,
},
Polar {
guide_ref_r: Option<String>,
guide_ref_ang: Option<String>,
min_r: Option<AdjCoord>,
max_r: Option<AdjCoord>,
min_ang: Option<AdjAngle>,
max_ang: Option<AdjAngle>,
position: AdjPoint,
},
}
#[derive(Clone, Debug)]
pub struct ConnectionSite {
pub angle: AdjAngle,
pub position: AdjPoint,
}
#[derive(Clone, Debug)]
pub struct TextRect {
pub left: AdjCoord,
pub top: AdjCoord,
pub right: AdjCoord,
pub bottom: AdjCoord,
}
#[derive(Clone, Debug)]
pub enum ShapeGeometry {
Preset(PresetGeometryDef),
Custom(CustomGeometry),
}
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum PresetShapeType {
Rect,
RoundRect,
Ellipse,
Triangle,
RtTriangle,
Diamond,
Parallelogram,
Trapezoid,
Pentagon,
Hexagon,
Octagon,
Star4,
Star5,
Star6,
Star8,
Star10,
Star12,
Star16,
Star24,
Star32,
Line,
Plus,
Can,
Cube,
Donut,
NoSmoking,
BlockArc,
Heart,
Sun,
Moon,
SmileyFace,
LightningBolt,
Cloud,
Arc,
Plaque,
Frame,
Bevel,
FoldedCorner,
Chevron,
HomePlate,
Ribbon,
Ribbon2,
Pie,
PieWedge,
Chord,
Teardrop,
Arrow,
LeftArrow,
RightArrow,
UpArrow,
DownArrow,
LeftRightArrow,
UpDownArrow,
QuadArrow,
BentArrow,
UturnArrow,
CircularArrow,
CurvedRightArrow,
CurvedLeftArrow,
CurvedUpArrow,
CurvedDownArrow,
StripedRightArrow,
NotchedRightArrow,
BentUpArrow,
LeftUpArrow,
LeftRightUpArrow,
LeftArrowCallout,
RightArrowCallout,
UpArrowCallout,
DownArrowCallout,
LeftRightArrowCallout,
UpDownArrowCallout,
QuadArrowCallout,
SwooshArrow,
LeftCircularArrow,
LeftRightCircularArrow,
Callout1,
Callout2,
Callout3,
AccentCallout1,
AccentCallout2,
AccentCallout3,
BorderCallout1,
BorderCallout2,
BorderCallout3,
AccentBorderCallout1,
AccentBorderCallout2,
AccentBorderCallout3,
WedgeRectCallout,
WedgeRoundRectCallout,
WedgeEllipseCallout,
CloudCallout,
LeftBracket,
RightBracket,
LeftBrace,
RightBrace,
BracketPair,
BracePair,
StraightConnector1,
BentConnector2,
BentConnector3,
BentConnector4,
BentConnector5,
CurvedConnector2,
CurvedConnector3,
CurvedConnector4,
CurvedConnector5,
FlowChartProcess,
FlowChartDecision,
FlowChartInputOutput,
FlowChartPredefinedProcess,
FlowChartInternalStorage,
FlowChartDocument,
FlowChartMultidocument,
FlowChartTerminator,
FlowChartPreparation,
FlowChartManualInput,
FlowChartManualOperation,
FlowChartConnector,
FlowChartPunchedCard,
FlowChartPunchedTape,
FlowChartSummingJunction,
FlowChartOr,
FlowChartCollate,
FlowChartSort,
FlowChartExtract,
FlowChartMerge,
FlowChartOfflineStorage,
FlowChartOnlineStorage,
FlowChartMagneticTape,
FlowChartMagneticDisk,
FlowChartMagneticDrum,
FlowChartDisplay,
FlowChartDelay,
FlowChartAlternateProcess,
FlowChartOffpageConnector,
ActionButtonBlank,
ActionButtonHome,
ActionButtonHelp,
ActionButtonInformation,
ActionButtonForwardNext,
ActionButtonBackPrevious,
ActionButtonEnd,
ActionButtonBeginning,
ActionButtonReturn,
ActionButtonDocument,
ActionButtonSound,
ActionButtonMovie,
IrregularSeal1,
IrregularSeal2,
Wave,
DoubleWave,
EllipseRibbon,
EllipseRibbon2,
VerticalScroll,
HorizontalScroll,
LeftRightRibbon,
Gear6,
Gear9,
Funnel,
MathPlus,
MathMinus,
MathMultiply,
MathDivide,
MathEqual,
MathNotEqual,
CornerTabs,
SquareTabs,
PlaqueTabs,
ChartX,
ChartStar,
ChartPlus,
HalfFrame,
Corner,
DiagStripe,
NonIsoscelesTrapezoid,
Heptagon,
Decagon,
Dodecagon,
Round1Rect,
Round2SameRect,
Round2DiagRect,
SnipRoundRect,
Snip1Rect,
Snip2SameRect,
Snip2DiagRect,
Other(String),
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum BlackWhiteMode {
Auto,
Black,
BlackGray,
BlackWhite,
Clr,
Gray,
GrayWhite,
Hidden,
InvGray,
LtGray,
White,
}
#[derive(Clone, Debug)]
pub enum DrawingFill {
None,
Solid(DrawingColor),
Gradient(GradientFill),
Blip(BlipFill),
Pattern(PatternFill),
Group,
}
#[derive(Clone, Debug)]
pub struct GradientFill {
pub stops: Vec<GradientStop>,
pub shade_properties: GradientShadeProperties,
pub flip: Option<TileFlipMode>,
pub rot_with_shape: Option<bool>,
pub tile_rect: Option<RelativeRect>,
}
#[derive(Clone, Debug)]
pub struct GradientStop {
pub position: Dimension<ThousandthPercent>,
pub color: DrawingColor,
}
#[derive(Clone, Debug)]
pub enum GradientShadeProperties {
Linear {
angle: Dimension<SixtieThousandthDeg>,
scaled: Option<bool>,
},
Path {
path_type: PathShadeType,
fill_to_rect: Option<RelativeRect>,
},
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum PathShadeType {
Shape,
Circle,
Rect,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum TileFlipMode {
None,
X,
Y,
Xy,
}
#[derive(Clone, Debug)]
pub struct PatternFill {
pub preset: PresetPatternVal,
pub fg_color: Option<DrawingColor>,
pub bg_color: Option<DrawingColor>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum PresetPatternVal {
Pct5,
Pct10,
Pct20,
Pct25,
Pct30,
Pct40,
Pct50,
Pct60,
Pct70,
Pct75,
Pct80,
Pct90,
Horz,
Vert,
LtHorz,
LtVert,
DkHorz,
DkVert,
NarHorz,
NarVert,
DashHorz,
DashVert,
Cross,
DnDiag,
UpDiag,
LtDnDiag,
LtUpDiag,
DkDnDiag,
DkUpDiag,
WdDnDiag,
WdUpDiag,
DashDnDiag,
DashUpDiag,
DiagCross,
SmCheck,
LgCheck,
SmGrid,
LgGrid,
DotGrid,
SmConfetti,
LgConfetti,
HorzBrick,
DiagBrick,
SolidDmnd,
OpenDmnd,
DotDmnd,
Plaid,
Sphere,
Weave,
DivotShingle,
Trellis,
ZigZag,
Wave,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum RectAlignment {
Tl,
T,
Tr,
L,
Ctr,
R,
Bl,
B,
Br,
}
#[derive(Clone, Debug)]
pub struct Outline {
pub width: Option<Dimension<Emu>>,
pub cap: Option<LineCap>,
pub compound: Option<CompoundLine>,
pub alignment: Option<PenAlignment>,
pub fill: Option<DrawingFill>,
pub dash: Option<LineDash>,
pub join: Option<LineJoin>,
pub head_end: Option<LineEnd>,
pub tail_end: Option<LineEnd>,
}
#[derive(Clone, Debug)]
pub enum LineDash {
Preset(PresetLineDashVal),
Custom(Vec<DashStop>),
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum PresetLineDashVal {
Solid,
Dot,
Dash,
LgDash,
DashDot,
LgDashDot,
LgDashDotDot,
SysDash,
SysDot,
SysDashDot,
SysDashDotDot,
}
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DashStop {
pub dash: Dimension<ThousandthPercent>,
pub space: Dimension<ThousandthPercent>,
}
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum LineJoin {
Round,
Bevel,
Miter {
limit: Option<Dimension<ThousandthPercent>>,
},
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct LineEnd {
pub kind: LineEndType,
pub width: LineEndSize,
pub length: LineEndSize,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum LineEndType {
None,
Triangle,
Stealth,
Diamond,
Oval,
Arrow,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum LineEndSize {
Sm,
Med,
Lg,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum LineCap {
Flat,
Round,
Square,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CompoundLine {
Single,
Double,
ThickThin,
ThinThick,
Triple,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum PenAlignment {
Center,
Inset,
}
#[derive(Clone, Debug)]
pub struct AnchorProperties {
pub distance: EdgeInsets<Emu>,
pub simple_pos: Option<Offset<Emu>>,
pub use_simple_pos: Option<bool>,
pub horizontal_position: AnchorPosition,
pub vertical_position: AnchorPosition,
pub wrap: TextWrap,
pub behind_text: bool,
pub lock_anchor: bool,
pub allow_overlap: bool,
pub relative_height: u32,
pub layout_in_cell: Option<bool>,
pub hidden: Option<bool>,
}
#[derive(Clone, Copy, Debug)]
pub enum AnchorPosition {
Offset {
relative_from: AnchorRelativeFrom,
offset: Dimension<Emu>,
},
Align {
relative_from: AnchorRelativeFrom,
alignment: AnchorAlignment,
},
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum AnchorRelativeFrom {
Page,
Margin,
Column,
Character,
Paragraph,
Line,
InsideMargin,
OutsideMargin,
TopMargin,
BottomMargin,
LeftMargin,
RightMargin,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum AnchorAlignment {
Left,
Center,
Right,
Inside,
Outside,
Top,
Bottom,
}
#[derive(Clone, Debug)]
pub enum TextWrap {
None,
Square {
distance: EdgeInsets<Emu>,
wrap_text: WrapText,
},
Tight {
distance: EdgeInsets<Emu>,
wrap_text: WrapText,
polygon: Option<WrapPolygon>,
},
TopAndBottom {
distance_top: Dimension<Emu>,
distance_bottom: Dimension<Emu>,
},
Through {
distance: EdgeInsets<Emu>,
wrap_text: WrapText,
polygon: Option<WrapPolygon>,
},
}
#[derive(Clone, Debug)]
pub struct WrapPolygon {
pub edited: Option<bool>,
pub start: Offset<Emu>,
pub line_to: Vec<Offset<Emu>>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum WrapText {
BothSides,
Left,
Right,
Largest,
}
#[derive(Clone, Debug, Default)]
pub struct EffectList {
pub effects: Vec<Effect>,
}
#[derive(Clone, Debug)]
pub enum Effect {
Blur(BlurEffect),
FillOverlay(FillOverlayEffect),
Glow(GlowEffect),
InnerShdw(InnerShadowEffect),
OuterShdw(OuterShadowEffect),
PrstShdw(PresetShadowEffect),
Reflection(ReflectionEffect),
SoftEdge(SoftEdgeEffect),
}
#[derive(Clone, Copy, Debug)]
pub struct BlurEffect {
pub radius: Dimension<Emu>,
pub grow: Option<bool>,
}
#[derive(Clone, Debug)]
pub struct FillOverlayEffect {
pub fill: DrawingFill,
pub blend: BlendMode,
}
#[derive(Clone, Debug)]
pub struct GlowEffect {
pub radius: Dimension<Emu>,
pub color: DrawingColor,
}
#[derive(Clone, Debug)]
pub struct InnerShadowEffect {
pub blur_radius: Dimension<Emu>,
pub distance: Dimension<Emu>,
pub direction: Dimension<SixtieThousandthDeg>,
pub color: DrawingColor,
}
#[derive(Clone, Debug)]
pub struct OuterShadowEffect {
pub blur_radius: Dimension<Emu>,
pub distance: Dimension<Emu>,
pub direction: Dimension<SixtieThousandthDeg>,
pub sx: Dimension<ThousandthPercent>,
pub sy: Dimension<ThousandthPercent>,
pub kx: Dimension<SixtieThousandthDeg>,
pub ky: Dimension<SixtieThousandthDeg>,
pub alignment: RectAlignment,
pub rot_with_shape: Option<bool>,
pub color: DrawingColor,
}
#[derive(Clone, Debug)]
pub struct PresetShadowEffect {
pub preset: PresetShadowVal,
pub distance: Dimension<Emu>,
pub direction: Dimension<SixtieThousandthDeg>,
pub color: DrawingColor,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum PresetShadowVal {
Shdw1,
Shdw2,
Shdw3,
Shdw4,
Shdw5,
Shdw6,
Shdw7,
Shdw8,
Shdw9,
Shdw10,
Shdw11,
Shdw12,
Shdw13,
Shdw14,
Shdw15,
Shdw16,
Shdw17,
Shdw18,
Shdw19,
Shdw20,
}
#[derive(Clone, Copy, Debug)]
pub struct ReflectionEffect {
pub blur_radius: Dimension<Emu>,
pub start_alpha: Dimension<ThousandthPercent>,
pub start_pos: Dimension<ThousandthPercent>,
pub end_alpha: Dimension<ThousandthPercent>,
pub end_pos: Dimension<ThousandthPercent>,
pub distance: Dimension<Emu>,
pub direction: Dimension<SixtieThousandthDeg>,
pub fade_direction: Dimension<SixtieThousandthDeg>,
pub sx: Dimension<ThousandthPercent>,
pub sy: Dimension<ThousandthPercent>,
pub kx: Dimension<SixtieThousandthDeg>,
pub ky: Dimension<SixtieThousandthDeg>,
pub alignment: RectAlignment,
pub rot_with_shape: Option<bool>,
}
#[derive(Clone, Copy, Debug)]
pub struct SoftEdgeEffect {
pub radius: Dimension<Emu>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum BlendMode {
Over,
Mult,
Screen,
Darken,
Lighten,
}