Closed arifroni closed 1 year ago
In md2pptx I have the following code:
if cardShape == "rounded":
# Rounded Rectangle for card
cardBackgroundShape = slide.shapes.add_shape(
MSO_SHAPE.ROUNDED_RECTANGLE,
Inches(0),
Inches(0),
Inches(0),
Inches(0),
)
# Rounding adjustment works better with different values for horizontal and vertical cards
if cardLayout == "horizontal":
# Make the rounding radius small. This is 1/4 the default
cardBackgroundShape.adjustments[0] = 0.0416675
else:
# Make the rounding radius smallish. This is 1/2 the default
cardBackgroundShape.adjustments[0] = 0.083335
which does indeed get me a rounded rectangle with a specific radius. The operative line is
cardBackgroundShape.adjustments[0] = 0.0416675
I would play with the actual value - to get one you want.
(Note: My purpose isn't to "sell" you md2pptx; Rather to share the relevant piece of code.)
In md2pptx I have the following code:
if cardShape == "rounded": # Rounded Rectangle for card cardBackgroundShape = slide.shapes.add_shape( MSO_SHAPE.ROUNDED_RECTANGLE, Inches(0), Inches(0), Inches(0), Inches(0), ) # Rounding adjustment works better with different values for horizontal and vertical cards if cardLayout == "horizontal": # Make the rounding radius small. This is 1/4 the default cardBackgroundShape.adjustments[0] = 0.0416675 else: # Make the rounding radius smallish. This is 1/2 the default cardBackgroundShape.adjustments[0] = 0.083335
which does indeed get me a rounded rectangle with a specific radius. The operative line is
cardBackgroundShape.adjustments[0] = 0.0416675
I would play with the actual value - to get one you want.
(Note: My purpose isn't to "sell" you md2pptx; Rather to share the relevant piece of code.)
works exactly like I wanted. :)
Hello
I am creating a rounded rectangle by following the code. Is there any way to change the radius of the shape?