Skip to content

Phase D.17: Floating images (non-inline positioning) #30

@loadfix

Description

@loadfix

Add support for floating (anchored) images, not just inline.

API Design

  • paragraph.add_floating_image(path, width, height, position) — adds a wp:anchor instead of wp:inline
  • FloatingImage: .position (relative to page/margin/column/paragraph), .wrap_type (square, tight, through, behind, in_front), .offset (horizontal, vertical)
  • Read existing floating images from paragraphs

XML

  • wp:anchor (vs wp:inline for current images)
  • wp:positionH, wp:positionV with relative positioning
  • wp:wrapSquare, wp:wrapTight, wp:wrapNone, etc.

Complexity: High — requires understanding DrawingML anchor element structure.

Upstream: #159 (14 comments)

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentTriggers the developer agentenhancementNew feature or requestphase-dQuality of Life

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions