Skip to content

[Epic] Shape Effects, Arrowheads & Connectors — glow, reflection, soft-edge, 3D #18

@MHoroszowski

Description

@MHoroszowski

Problem

Shape effects beyond shadows are entirely absent — glow, reflection, soft-edge, and preset 3D scenes cannot be authored. Line decoration is half-built: LineFormat.dash_style and line caps/joins shipped on this fork (v1.0.x), but arrowhead end-shapes (<a:headEnd> / <a:tailEnd>) have an open PR (scanny/python-pptx#411) that has been waiting since 2018. Connectors create-only with no auto-routing or connection-point API; multiple corruption issues track this (scanny/python-pptx#946, #1058, #1017, #674). Group-shape coordinate math is buggy (#1085, #899, #925).

Sub-features

  • ShadowFormat.glow_effect — emits <a:glow rad=> <a:srgbClr/> (separate from already-shipped outerShdw)
  • ShadowFormat.reflection_effect — emits <a:reflection blurRad= stA= endA= dist= dir=>
  • ShadowFormat.soft_edge_effect — emits <a:softEdge rad=>
  • Shape.scene_3d and Shape.shape_3d for <a:scene3d> / <a:sp3d> (preset perspective / camera)
  • LineFormat.head_end / LineFormat.tail_end enum (NONE, ARROW, DIAMOND, OVAL, STEALTH, TRIANGLE) with width and length
  • Connector connection-point API: Connector.start_connection / end_connection with (shape, cxn_pt_idx)
  • Group-shape coordinate fixes: correct world-space left/top/width/height for shapes inside groups, including nested groups
  • Shape.flip_vertical / flip_horizontal setters on existing transform
  • Shape.duplicate(insert_at_z=None) — clone within a slide

Prior art

  • Open PRs: scanny/python-pptx#411 Line Arrowhead Ends (ofir123, 515 LOC, needs rebase but design is sound). scanny/python-pptx#628 connection-point coords for non-rectangular shapes. scanny/python-pptx#629 connector tweak. scanny/python-pptx#313 empty-effect-list on autoshapes (toelke). scanny/python-pptx#380 older arrow PR (28k LOC — likely vendored schema, do NOT cherry-pick).
  • User issues this would close: #49 (z-order, 16c), #375, #411, #453, #515 (path geometry 10c), #533, #534, #547, #555, #627, #628, #657, #674, #705, #730, #838, #856 (build shapes from XML 7c), #899, #925, #946, #1017, #1033, #1058, #1085.
  • Already shipped in this fork (excluded): outerShdw / ShadowFormat API.
  • OOXML: DrawingML §20.1.8 <a:effectLst>, §20.1.8.16 <a:glow>, §20.1.8.45 <a:reflection>, §20.1.8.48 <a:softEdge>, §20.1.8.6 <a:scene3d>+<a:sp3d>, §20.1.10.x <a:headEnd>/<a:tailEnd> (type, width=sm/med/lg, length=sm/med/lg).
  • Code paths: src/pptx/dml/effect.py (existing — extend), src/pptx/dml/line.py, src/pptx/oxml/dml/effect.py, src/pptx/shapes/connector.py, src/pptx/shapes/group.py.

Acceptance criteria

  • A shape authored with shape.shadow.glow_effect.color = RGBColor(0xFF,0,0) and shape.shadow.glow_effect.radius = Pt(20) shows a red glow in PowerPoint.
  • Arrow-ended connectors round-trip through PowerPoint Mac/Win without losing the arrowhead.
  • shape.flip_vertical = True produces a flipped shape; round-trips correctly.
  • 25+ unit tests + 8 behave scenarios.

Effort: L

Phase A: arrowhead ends (S, mostly cherry-pick of scanny#411). Phase B: glow/reflection/softEdge (M). Phase C: connector connection-points + group coordinate math (M). 3D scenes (Phase D, optional).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:shapesFeature area: shapesepicMulti-feature roadmap epicprior-art:upstream-prOpen PR on scanny/python-pptx is candidate cherry-pickpriority:P1Important but not urgent

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions