Module border_fill

Module border_fill 

Source
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:

§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.
BorderFill
Fully-resolved border and fill configuration (all fields present).
BorderSide
Border configuration for one side (top/left/right/bottom).
Fill
Background fill configuration.
PartialBorderFill
Combined border and fill configuration with optional fields for YAML.