本文整理汇总了Python中com.aspose.slides.Presentation.getMasters方法的典型用法代码示例。如果您正苦于以下问题:Python Presentation.getMasters方法的具体用法?Python Presentation.getMasters怎么用?Python Presentation.getMasters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.aspose.slides.Presentation
的用法示例。
在下文中一共展示了Presentation.getMasters方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: set_background_color_of_master_slide
# 需要导入模块: from com.aspose.slides import Presentation [as 别名]
# 或者: from com.aspose.slides.Presentation import getMasters [as 别名]
def set_background_color_of_master_slide(dataDir):
dataDir = Settings.dataDir + 'WorkingWithSlidesInPresentation/Background/'
# Instantiate Presentation class that represents the presentation file
pres = Presentation()
# Set the background color of the Master Slide to Forest Green
backgroundType = BackgroundType
fillType = FillType
color = Color
pres.getMasters().get_Item(0).getBackground().setType(backgroundType.OwnBackground)
pres.getMasters().get_Item(0).getBackground().getFillFormat().setFillType(fillType.Solid)
pres.getMasters().get_Item(0).getBackground().getFillFormat().getSolidFillColor().setColor(color.GREEN)
# Saving the presentation
save_format = SaveFormat
pres.save(dataDir + "MasterBG.pptx", save_format.Pptx)
print "Set background color of master slide, please check the output file."