This section contains the definitions of all reusable Ken Burns (KB) effects (which incorporate both panning and zooming and can be applied to slides). To learn more about using KB effects, see the Using the Ken Burns Effect Editor topic; you should review this topic before proceeding.
Because the same KB effects are often used more than once in a given slideshow, KB effects are defined in one central location, the <kenburns> section. Each of the defined effects is assigned a unique ID identifier. When an effect is needed for a slide, a KB effect is referenced using its ID value in the following format:
<gallery ... kbEffect="effectIDValue" ... >
or
<img ... kbEffect="" ... />
You can also specify multiple effect ID's (separated by commas), and one will be chosen randomly each time. For more information about how to utilize the defined KB effects, see the <galleries> section documentation.
To begin, here is an example of an <kenburns> section with two effects:
<kenburns>
<kbEffect id="NWtoSE" startX="-111" startY="-34" startZoom="1.2" endX="105" endY="57" endZoom="1" delay="500" duration="5000" easing="Easing(Quadratic.easeInOut)"/>
<kbEffect id="SEtoNW" startX="100" startY="40" startZoom="1.2" endX="-100" endY="-50" endZoom="1" delay="500" duration="5000" easing="Easing(Quadratic.easeInOut)"/>
</kenburns>
The slideshow converts each <kbEffect> node in the <kenburns> section into a com.dwuser.ss4.utils.KBEffect instance. You should review this class (in the API Reference) for more information about the underlying architecture and information about all of the various settings.
The <kenburns> section is comprised of zero or more <kbEffect> nodes (no effects are required to be defined). Each of these <kbEffect> nodes defines a separate KB effect. Each <kbEffect> has one required attribute -- it's ID value -- and several important but optional settings:
Attribute | Description |
---|---|
id | Required; specifies the unique ID value with which the effect will be referenced elsewhere (see above). |
startX | Optional; specifies the x-offset from the center of the image which will be treated as the center when the panning/zooming effect starts. For example, a value of -100 makes the panning effect start 100 pixels to the left of the image's center. Default value of 0 |
startY | Optional; specifies the y-offset from the center of the image which will be treated as the center when the panning/zooming effect starts. For example, a value of -100 makes the panning effect start 100 pixels above the image's center. Default value of 0 |
startZoom | Optional; specifies the zoom factor (with 1 being the original size) of the image when the panning/zooming effect starts. Default value of 1.2 |
endX | Optional; specifies the x-offset from the center of the image which will be treated as the center when the panning/zooming effect completes. For example, a value of 100 makes the panning effect complete 100 pixels to the right of the image's center. Default value of 0 |
endY | Optional; specifies the y-offset from the center of the image which will be treated as the center when the panning/zooming effect completes. For example, a value of 100 makes the panning effect complete 100 pixels below the image's center. Default value of 0 |
endZoom | Optional; specifies the zoom factor (with 1 being the original size) of the image when the panning/zooming effect completes. Default value of 1.2 |
delay | Optional; specifies, in milliseconds, the delay before the KB effect begins to play. This can allow time for the slide transition to fully complete. Default value of 500 |
duration | Optional; specifies, in milliseconds, the duration of the KB effect. Default value of 5000 (5 seconds) |
easing | Optiona; specifies the easing equation used to play the effect. To learn more about supported values, see the easing property on the KBEffect class referenced above. The default value is Easing(Quartic.easeInOut) |
To disable panning for a given KB effect, set startX, startY, endX, and endY to 0. To disable zooming for a given KB effect, set startZoom and endZoom to 1. All of the settings mentioned here are described in more detail in the com.dwuser.ss4.utils.KBEffect class in the API Reference.