Spaces:
Runtime error
Runtime error
Disable icon shape's shadow and lower its position
Browse files27 unmodified lines282930313233465 unmodified lines4995005015025035045051 unmodified line5075085095105115125137 unmodified lines52152252352452552627 unmodified lines# English Metric Unit (used by PowerPoint) to inchesEMU_TO_INCH_SCALING_FACTOR = 1.0 / 914400INCHES_2 = pptx.util.Inches(2)INCHES_1_5 = pptx.util.Inches(1.5)INCHES_1 = pptx.util.Inches(1)465 unmodified linesmatch = ICONS_REGEX.search(item)if not match:print('No icon/text pattern match found...skipping to the next item')continueicon_name = match.group(1)1 unmodified lineicon_path = f'{GlobalConfig.ICONS_DIR}/{icon_name}.png'left = spacing + idx * (ICON_SIZE + spacing)top = pptx.util.Inches(2) # Adjust the vertical position as needed# Calculate the center position for alignmentcenter = left + ICON_SIZE / 27 unmodified linesINCHES_1, INCHES_1)shape.fill.solid()# Set the icon's background shape colorcolor = random.choice(ICON_COLORS)27 unmodified lines28293031323334465 unmodified lines5005015025035045055061 unmodified line5085095105115125135147 unmodified lines52252352452552652752827 unmodified lines# English Metric Unit (used by PowerPoint) to inchesEMU_TO_INCH_SCALING_FACTOR = 1.0 / 914400INCHES_3 = pptx.util.Inches(3)INCHES_2 = pptx.util.Inches(2)INCHES_1_5 = pptx.util.Inches(1.5)INCHES_1 = pptx.util.Inches(1)465 unmodified linesmatch = ICONS_REGEX.search(item)if not match:# print('No icon/text pattern match found...skipping to the next item')continueicon_name = match.group(1)1 unmodified lineicon_path = f'{GlobalConfig.ICONS_DIR}/{icon_name}.png'left = spacing + idx * (ICON_SIZE + spacing)top = INCHES_3# Calculate the center position for alignmentcenter = left + ICON_SIZE / 27 unmodified linesINCHES_1, INCHES_1)shape.fill.solid()shape.shadow.inherit = False# Set the icon's background shape colorcolor = random.choice(ICON_COLORS)
helpers/pptx_helper.py+4-2