Expand description
Border and fill types for paragraph and table styling.
This module defines border (line style around elements) and fill (background) configurations following the two-type pattern:
PartialBorderFill— all fieldsOption, for YAML and inheritanceBorderFill— all fields required, after resolution
§Examples
use hwpforge_blueprint::border_fill::{PartialBorderFill, BorderSide, Fill};
use hwpforge_foundation::{BorderLineType, FillBrushType, Color, HwpUnit};
let mut partial = PartialBorderFill::default();
partial.border = Some(hwpforge_blueprint::border_fill::Border {
top: BorderSide {
line_type: BorderLineType::Solid,
width: Some(HwpUnit::from_pt(0.5).unwrap()),
color: Some(Color::BLACK),
},
left: BorderSide::default(),
right: BorderSide::default(),
bottom: BorderSide::default(),
});
let resolved = partial.resolve();
assert_eq!(resolved.border.top.line_type, BorderLineType::Solid);Structs§
- Border
- Four-sided border configuration.
- Border
Fill - Fully-resolved border and fill configuration (all fields present).
- Border
Side - Border configuration for one side (top/left/right/bottom).
- Fill
- Background fill configuration.
- Partial
Border Fill - Combined border and fill configuration with optional fields for YAML.