Expand description
Object-placement metadata shared by every floating drawing object.
ObjectPlacement models the HWPX <hp:pos> block plus the owning
shape’s textWrap/textFlow attributes: where an object anchors, how
surrounding text wraps around it, and whether it behaves like an inline
character. It is carried by Image and by every
Control drawing-object variant (text boxes,
rectangles, lines, ellipses, polygons, arcs, curves, connect lines,
groups, textart, embedded charts).
Historically these types lived in image.rs under Image* names and only
images carried them; the shape variants stored two loose i32 offsets and
silently dropped the rest of <hp:pos>. Promoting the type to a shared
Object* vocabulary lets the shape encoders/decoders carry the full
placement instead.
§Examples
use hwpforge_core::placement::{ObjectPlacement, ObjectTextWrap};
let inline = ObjectPlacement::legacy_inline_defaults();
assert!(inline.treat_as_char);
assert_eq!(inline.text_wrap, ObjectTextWrap::TopAndBottom);Structs§
- Object
Placement - Optional object-placement metadata for a floating drawing object.
Enums§
- Object
Relative To - Anchor target for object placement offsets.
- Object
Text Flow - Text flow mode for placed objects.
- Object
Text Wrap - Text wrapping mode for placed objects.