You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[Line](https://github.com/dronperminov/pptx-shapes/blob/master/pptx_shapes/shapes/line.py)|`Line`| Straight line between two points |
76
76
|[Arrow](https://github.com/dronperminov/pptx-shapes/blob/master/pptx_shapes/shapes/arrow.py)|`Arrow`| Straight arrow between two points |
77
-
|[Arc](https://github.com/dronperminov/pptx-shapes/blob/master/pptx_shapes/shapes/arc.py)|`Arc`| Curved segment defined by the bounding box and start/end angles. |
78
-
|[Ellipse](https://github.com/dronperminov/pptx-shapes/blob/master/pptx_shapes/shapes/ellipse.py)|`Ellipse`| Ellipse defined by top-left corner, diameters, and rotation angle |
77
+
|[Arc](https://github.com/dronperminov/pptx-shapes/blob/master/pptx_shapes/shapes/arc.py)|`Arc`| Curved segment defined by the bounding box and start/end angles |
78
+
|[Arch](https://github.com/dronperminov/pptx-shapes/blob/master/pptx_shapes/shapes/arch.py)|`Arch`| Ring-shaped arc defined by the bounding box, thickness and start/end angles |
79
+
|[Ellipse](https://github.com/dronperminov/pptx-shapes/blob/master/pptx_shapes/shapes/ellipse.py)|`Ellipse`| Ellipse defined by top-left corner, size, and rotation angle |
79
80
|[Rectangle](https://github.com/dronperminov/pptx-shapes/blob/master/pptx_shapes/shapes/rectangle.py)|`Rectangle`| Rectangle defined by top-left corner, size, corner radius and rotation angle |
81
+
|[Pie](https://github.com/dronperminov/pptx-shapes/blob/master/pptx_shapes/shapes/pie.py)|`Pie`| Filled sector of a circle, defined by the bounding box and start/end angles |
80
82
|[Polygon](https://github.com/dronperminov/pptx-shapes/blob/master/pptx_shapes/shapes/polygon.py)|`Polygon`| Arbitrary polygon defined by a list of points and rotation angle |
81
83
|[TextBox](https://github.com/dronperminov/pptx-shapes/blob/master/pptx_shapes/shapes/textbox.py)|`TextBox`| Text container with position, size, rotation, and font style |
82
84
|[Group](https://github.com/dronperminov/pptx-shapes/blob/master/pptx_shapes/shapes/group.py)|`Group`| A group of multiple shapes |
@@ -148,24 +150,52 @@ Arc(
148
150
*`stroke`: optional `StrokeStyle` for the border
149
151
150
152
153
+
### Arch
154
+
155
+
A ring-shaped arc defined by the bounding box, thickness, and angular range. It is based on PowerPoint’s `blockArc` shape.
156
+
157
+
```python
158
+
Arch(
159
+
x=5, y=5, # center (cm)
160
+
width=3, height=3, # sizes (cm)
161
+
thickness=1, # ring thickness (cm)
162
+
start_angle=0, # start angle (degrees)
163
+
end_angle=270, # end angle (degrees)
164
+
angle=45, # optional rotation angle (degrees)
165
+
fill=..., # optional FillStyle
166
+
stroke=...# optional StrokeStyle
167
+
)
168
+
```
169
+
170
+
#### Parameters
171
+
172
+
*`x`, `y`: top-left corner coordinates in centimeters
173
+
*`width`, `height`: sizes in centimeters
174
+
*`thickness`: width of the ring (distance between outer and inner radius) in centimeters
175
+
*`start_angle`, `end_angle`: arc range in degrees (default `0` and `180`)
176
+
*`angle`: the rotation angle of the arch in degrees (default is `0`)
177
+
*`fill`: optional `FillStyle` to fill the arch
178
+
*`stroke`: optional `StrokeStyle` for the border
179
+
180
+
151
181
### Ellipse
152
182
153
-
An ellipse is defined by its top-left corner and the diameters in horizontal and vertical directions. It can be rotated by a given angle.
183
+
An ellipse is defined by its top-left corner and its width and height. It can be rotated by a given angle.
154
184
155
185
```python
156
186
Ellipse(
157
-
x=2, y=3.5, # top-left angle (cm)
158
-
dx=4, dy=6, #diameters (cm)
159
-
angle=30, # optional rotation angle (degrees)
160
-
fill=..., # optional FillStyle
161
-
stroke=...# optional StrokeStyle
187
+
x=2, y=3.5, # top-left angle (cm)
188
+
width=4, height=6, #sizes (cm)
189
+
angle=30, # optional rotation angle (degrees)
190
+
fill=..., # optional FillStyle
191
+
stroke=...# optional StrokeStyle
162
192
)
163
193
```
164
194
165
195
#### Parameters
166
196
*`x`, `y`: top-left corner coordinates in centimeters
167
-
*`dx`, `dy`: diameters in centimeters
168
-
*`angle`: the rotation angle of the ellipse in degrees (default is `0`).
197
+
*`width`, `height`: sizes in centimeters
198
+
*`angle`: the rotation angle of the ellipse in degrees (default is `0`)
169
199
*`fill`: optional `FillStyle` to fill the ellipse
170
200
*`stroke`: optional `StrokeStyle` for the border
171
201
@@ -192,6 +222,33 @@ Rectangle(
192
222
*`fill`: fill style
193
223
*`stroke`: stroke style
194
224
225
+
226
+
### Pie
227
+
228
+
A filled sector of an ellipse, defined by its bounding box and angular range.
229
+
230
+
```python
231
+
Pie(
232
+
x=5, y=5, # center (cm)
233
+
width=3, height=3, # sizes (cm)
234
+
start_angle=0, # start angle (degrees)
235
+
end_angle=270, # end angle (degrees)
236
+
angle=45, # optional rotation angle (degrees)
237
+
fill=..., # optional FillStyle
238
+
stroke=...# optional StrokeStyle
239
+
)
240
+
```
241
+
242
+
#### Parameters
243
+
244
+
*`x`, `y`: top-left corner coordinates in centimeters
245
+
*`width`, `height`: sizes in centimeters
246
+
*`start_angle`, `end_angle`: the angular range of the slice in degrees (default `0` and `180`)
247
+
*`angle`: the rotation angle of the pie in degrees (default is `0`)
248
+
*`fill`: optional `FillStyle` to fill the arch
249
+
*`stroke`: optional `StrokeStyle` for the border
250
+
251
+
195
252
### Polygon
196
253
197
254
A polygon can be an arbitrary shape defined by a list of points. It can also be rotated by an angle.
@@ -440,6 +497,16 @@ This example demonstrates how to use different font families and styles in `Text
0 commit comments