MCPcopy Create free account
hub / github.com/scanny/python-pptx / when_I_add_100_shapes

Function when_I_add_100_shapes

features/steps/shapes.py:106–123  ·  view source on GitHub ↗
(context)

Source from the content-addressed store, hash-verified

104
105@when("I add 100 shapes")
106def when_I_add_100_shapes(context):
107 X_ORIG = Y_ORIG = Inches(0.0625)
108 X_INCR = Y_INCR = Inches(0.5)
109 CX = CY = Inches(0.375)
110
111 def iter_corner():
112 y = Y_ORIG
113 while True:
114 for i in range(20):
115 x = X_ORIG + (X_INCR * i)
116 yield x, y
117 y += Y_INCR
118
119 shapes = context.shapes
120 corners = iter_corner()
121 for i in range(100):
122 x, y = next(corners)
123 shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, x, y, CX, CY)
124
125
126@when("I add a table to the slide's shape collection")

Callers

nothing calls this directly

Calls 3

InchesClass · 0.90
iter_cornerFunction · 0.85
add_shapeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…