Don't be scared by the fact the file is really large you need to work only on small portions of it.
We use the barWipe shape effect for illustrating the steps to follows for adding a shape transition:
1) Choose the shape effect from here: http://cgit.freedesktop.org/libreoffice/core/tree/sd/xml/effects.xml.
For a visual description of the effect go here: http://www.w3.org/TR/2005/REC-SMIL2-20050107/smil-transitions.html#TransitionEffects-Appendix
2) For a list of transition type constant look at:
For a list of transition subtype constant look at:
Near to some type or subtype constant you can see a number commented out that number is the value of the constant in the C++ file, please keep such constants in the correct order.
You need to update aTransitionTypeInMap, aTransitionTypeOutMap, aTransitionSubtypeInMap and aTransitionSubtypeOutMap accordingly.
3) You can get the transition parameters to be used here:
For the BARWIPE transition type with subtype LEFTTORIGHT we have:
// mapped to BarWipePolyPolygon:
animations::TransitionSubType::LEFTTORIGHT, // (1)
0.0, // no rotation
1.0, // no scaling
1.0, // no scaling
false, // 'out' by subtraction
false // scale isotrophically to target size
'class' : TRANSITION_CLIP_POLYPOLYGON,
'rotationAngle' : 0.0,
'scaleX' : 1.0,
'scaleY' : 1.0,
'reverseMethod' : REVERSEMETHOD_FLIP_X,
'outInvertsSweep' : false,
'scaleIsotropically' : false
Note that there is no need to port the first two info entries (type and subtype).
return new BarWipePath( 1 );
For the transition effect you want to implement you need to add the related "case" for the transition type and if it is needed also for the transition subtype (look at the pinWheelWipe transition case).
Now the final implementation step.
5) Create the class that implements the transition effect you have chosen.
Transition effect classes can be found here: http://cgit.freedesktop.org/libreoffice/core/tree/slideshow/source/engine/transitions.
For instance barwipepolypolygon.hpp and barwipepolypolygon.cxx implements the barWipe effect.
In order to create or precompute the initial base path you can utilize helper functions such as PathTools.normalizePath and PathTools.createPathFromEllipse, give a glance to the EllipseWipePath class.
You can read more on how slide and shape transition has been ported/implemented here: https://docs.google.com/document/d/1GSLPSIWRGSDTSi69dT9Te8tRyTJcAekxT7scoCoGO2M/edit?pli=1#heading=h.zak45bwtec07.
For a working example you can look at: http://users.freedesktop.org/~thorsten/gsoc-2012/shape_transitions-week3/
Created attachment 64460 [details]
Support for the checkerboard transition effect
The checkerboard transition effect was implemented following the steps in this easyhack. Check the attachment for the effect. The code can be viewed at http://cgit.freedesktop.org/libreoffice/core/commit/?id=6ee666c53da83982784ea59894479a8b93c8ecd7 .
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.
see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Removing comma from whiteboard (please use a space to delimit values in this field)
Hello, I'm going to add the support for the Iriswipe-Transitionl.
Thanks for helping me.
I'm sorry, but I can't do the IrisWipe-Transition anymore, because I get some kernel rejected CS messages when using the IrisWipe. So it's still left to be implemented.
JanI is default CC for Easy Hacks (Add Jan; remove LibreOffice Dev List from CC)
A polite ping, still working on this issue?
Unassign due to lack of work
Hello, I would like to work on this issue,
I have few doubts about the first task
>Near to some type or subtype constant you can see a number commented out that >number is the value of the constant in the C++ file, please keep such constants in >the correct order.
What do you mean by *correct order*?Could you please brief it.
>You need to update aTransitionTypeInMap, aTransitionTypeOutMap, >aTransitionSubtypeInMap and aTransitionSubtypeOutMap accordingly.
Moreover I can't find aTransitionSubtypeOutMap and aTransitionTypeOutMap in https://cgit.freedesktop.org/libreoffice/core/tree/filter/source/svg/presentation_engine.js