Browse our Products

Aspose.Slides for Python 23.5 Release Notes

KeySummaryCategoryRelated Documentation
SLIDESPYNET-103Use Aspose.Slides for Net 23.5 featuresEnhancement
SLIDESPYNET-94Add support for Python 3.11Enhancement
SLIDESPYNET-93Invalid syntax error when using aspose.slides.import namespaceBug
SLIDESPYNET-98Aspose.Total for Python via .NET license not validBug

Public API Changes

AfterAnimationType enum, Effect.after_animation_type, and Effect.after_animation_color have been added

AfterAnimationType, a new enum, has been added. It represents the after animation type of an animation effect and can be used with Effect.after_animation_type and Effect.after_animation_color:

from aspose.slides import animation as anim
import aspose.slides as slides

with slides.Presentation() as pres:
    
    autoShape = pres.slides[0].shapes.add_auto_shape(slides.ShapeType.RECTANGLE, 150, 150, 250, 25)
    autoShape.add_text_frame("Animated TextBox")

    effect = pres.slides[0].timeline.main_sequence.add_effect(autoShape, 
        anim.EffectType.PATH_FOOTBALL,
        anim.EffectSubtype.NONE, 
        anim.EffectTriggerType.AFTER_PREVIOUS)

    pres.save("demo.pptx", slides.export.SaveFormat.PPTX)

with slides.Presentation("demo.pptx") as pres:
    effect = pres.slides[0].timeline.main_sequence[0]
    effect.after_animation_type = anim.AfterAnimationType.HIDE_ON_NEXT_MOUSE_CLICK
    
    pres.save("example1.pptx", slides.export.SaveFormat.PPTX)

Example that shows you how to use Effect.after_animation_color alongside AfterAnimationType:

from aspose.slides import animation as anim
import aspose.slides as slides
import aspose.pydrawing as draw

with slides.Presentation() as pres:
    autoShape = pres.slides[0].shapes.add_auto_shape(slides.ShapeType.RECTANGLE, 150, 150, 250, 25)
    autoShape.add_text_frame("Animated TextBox")

    effect = pres.slides[0].timeline.main_sequence.add_effect(autoShape, 
        anim.EffectType.PATH_FOOTBALL,
        anim.EffectSubtype.NONE, 
        anim.EffectTriggerType.AFTER_PREVIOUS)

    pres.save("demo.pptx", slides.export.SaveFormat.PPTX)

with slides.Presentation("demo.pptx") as pres:
    # Get the first effect of the first slide
    effect = pres.slides[0].timeline.main_sequence[0]

    # Change the After animation effect type to "Color"
    effect.after_animation_type = anim.AfterAnimationType.COLOR

    # Set the After animation effect color
    effect.after_animation_color.color = draw.Color.blue
    
    pres.save("example2.pptx", slides.export.SaveFormat.PPTX)

DataLabelCollection.LeaderLinesFormat has been added, DataLabelCollection.LeaderLinesColor declared as obsolete

To allow you to format a chart’s leader lines, leader_lines_format has been added to DataLabelCollection. This is how you format a chart’s lines using the new property:

from aspose.slides import charts as charts
import aspose.slides as slides

with slides.Presentation("pres.pptx") as pres:   
    chart = pres.slides[0].shapes[0]
    series = chart.chart_data.series
    labels = series[0].labels

    labels.leader_lines_format.line.fill_format.fill_type = slides.FillType.SOLID
    labels.leader_lines_format.line.fill_format.solid_fill_color.color = draw.Color.from_argb(255, 255, 0, 0)

DataLabelCollection.leader_lines_color is now obsolete and will be removed in Aspose.Slides 23.8.