InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IAnimationCore Class Referenceabstract

#include <IAnimationCore.h>

Inheritance diagram for IAnimationCore:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IANIMATIONCORE }
 
enum  MotionXMLOptions { kDefaultOptions = 0x00, kStrip3DParameters = 0x01, kStripFilters = 0x02, kDisableFilters = 0x04 }
 

Public Member Functions

virtual bool SetXMLDescription (const WideString &xmlIn, bool useTimescaleFromXml=false)=0
 
virtual bool GetXMLDescription (WideString &xmlOut, uint32 options=kDefaultOptions) const =0
 
virtual boost::shared_ptr< uint8 > GetMotionXML (size_t &size, uint32 options=kDefaultOptions) const =0
 
virtual void SetDuration (const PMReal &durationInSecond)=0
 
virtual PMReal GetDuration () const =0
 
virtual bool SetFrameRate (int32 frameRatePerSecond)=0
 
virtual int32 GetFrameRate () const =0
 
virtual uint32 GetKeyframeForTime (const PMReal &time) const =0
 
virtual bool PropertiesUsingFancyEase () const =0
 
virtual bool RemoveAllEase ()=0
 
virtual bool ApplySimpleEaseToAll (const AnimationEaseType &easeType)=0
 
virtual void SetTransformOffsetPoint (const PMPoint &offsetPoint)=0
 
virtual PMPoint GetTransformOffsetPoint () const =0
 
virtual bool Set2DPath (const AnimationPathDataList &path)=0
 
virtual bool Get2DPath (PMPathPointList &path, bool *pHasRovingPathPoints=nil) const =0
 
virtual bool Get2DPath (AnimationPathDataList &path) const =0
 
virtual void SetNew2DBezierPath (const PMPathPointList &path)=0
 
virtual void RemovePath ()=0
 
virtual void OffsetPath ()=0
 
virtual bool GetPathOffset (double &offsetX, double &offsetY) const =0
 
virtual void GetMotionPath (std::vector< double > &xValues, std::vector< double > &yValues) const =0
 
virtual void GetOpacityValues (std::vector< double > &alphaValues) const =0
 
virtual uint32 GetOpacityKeyFrameCount () const =0
 
virtual bool GetOpacityKeyFrame (uint32 which, uint32 &keyframe, PMReal &value) const =0
 
virtual bool GetOpacityValueAtKeyFrame (uint32 keyframe, PMReal &value) const =0
 
virtual bool RemoveOpacityValueAtKeyFrame (uint32 keyframe)=0
 
virtual void RemoveAllOpacityKeyFrames ()=0
 
virtual bool SetOpacityValueAtKeyFrame (uint32 keyframe, const PMReal &value)=0
 
virtual void GetRotationValues (std::vector< double > &rValues) const =0
 
virtual uint32 GetRotationKeyFrameCount () const =0
 
virtual bool GetRotationKeyFrame (uint32 which, uint32 &keyframe, PMReal &value) const =0
 
virtual bool GetRotationValueAtKeyFrame (uint32 keyframe, PMReal &value) const =0
 
virtual bool RemoveRotationValueAtKeyFrame (uint32 keyframe)=0
 
virtual void RemoveAllRotationKeyFrames ()=0
 
virtual bool SetRotationValueAtKeyFrame (uint32 keyframe, const PMReal &value)=0
 
virtual void GetScaleValues (std::vector< double > &xValues, std::vector< double > &yValues) const =0
 
virtual uint32 GetScaleXKeyFrameCount () const =0
 
virtual bool GetScaleXKeyFrame (uint32 which, uint32 &keyframe, PMReal &value) const =0
 
virtual bool GetScaleXValueAtKeyFrame (uint32 keyframe, PMReal &value) const =0
 
virtual bool RemoveScaleXValueAtKeyFrame (uint32 keyframe)=0
 
virtual void RemoveAllScaleXKeyFrames ()=0
 
virtual bool SetScaleXValueAtKeyFrame (uint32 keyframe, const PMReal &value)=0
 
virtual uint32 GetScaleYKeyFrameCount () const =0
 
virtual bool GetScaleYKeyFrame (uint32 which, uint32 &keyframe, PMReal &value) const =0
 
virtual bool GetScaleYValueAtKeyFrame (uint32 keyframe, PMReal &value) const =0
 
virtual bool RemoveScaleYValueAtKeyFrame (uint32 keyframe)=0
 
virtual void RemoveAllScaleYKeyFrames ()=0
 
virtual bool SetScaleYValueAtKeyFrame (uint32 keyframe, const PMReal &value)=0
 
virtual void ReverseAllProperties ()=0
 
virtual void Initialize ()=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

This interface is responsible for interacting with flash animation core component.

See Also
also IAnimationAttributeData.h

Member Enumeration Documentation

A bitfield of options for driving GetMotionXML and GetXMLDescription.
Enumerator
kDefaultOptions 

kDefaultOptions is to include all data.

kStrip3DParameters 

If set, all 3D parameters will be removed. If both kStrip3DParameters and kDisable3DParameters are set, all 3D parameters will be removed.

kStripFilters 

If set, all filters will be removed. If both kStripFilters and kDisableFilters are set, all filters will be removed.

kDisableFilters 

If set, all filters are disabled. For GetMotionXML, kDisableFilters is the same as kStripFilters.

Member Function Documentation

virtual bool IAnimationCore::ApplySimpleEaseToAll (const AnimationEaseType & easeType)
pure virtual

Apply the specified ease type to all properties in the preset. If there's an ease that is different from the specified ease, the existing ease will be removed first for all properties.

Parameters
easeTypeis the ease to apply.
Returns
true if successful; otherwise returns false.
virtual bool IAnimationCore::Get2DPath (PMPathPointListpath,
bool * pHasRovingPathPoints = nil 
) const
pure virtual

Gets the 2D path point list

Parameters
pathis the list of path points.
pHasRovingPathPointsif not nil returns true if at least one path point is set to roving.
Returns
true if successful; otherwise false.
virtual bool IAnimationCore::Get2DPath (AnimationPathDataList & path) const
pure virtual

Gets the 2D keyframe path.

Parameters
pathis the list of keyframe path point pairs.
virtual PMReal IAnimationCore::GetDuration () const
pure virtual
Returns
the duration in second for this animation.
virtual int32 IAnimationCore::GetFrameRate () const
pure virtual
Returns
the frame rate in frames per second for this animation.
virtual uint32 IAnimationCore::GetKeyframeForTime (const PMRealtime) const
pure virtual

Returns the keyframe for the specified time in second.

Parameters
timeis the time.
Returns
the keyframe.
virtual void IAnimationCore::GetMotionPath (std::vector< double > & xValues,
std::vector< double > & yValues 
) const
pure virtual

Get the actual 2D motion path for all frames. This path takes into account offset, easing and time map.

Parameters
xValuesis the resulting x values.
yValuesis the resutling y values.
virtual boost::shared_ptr<uint8> IAnimationCore::GetMotionXML (size_t & size,
uint32 options = kDefaultOptions 
) const
pure virtual

Gets the XML for SWF export. This data uses a custom XML schema to represent the animation data in a form that can be processed by InDesign's ActionScript code.

Parameters
sizeis the buffer size containing the xml string.
optionsare the options to use while creating the motion XML data.
Returns
the xml.
See Also
MotionXMLOptions for a list of possible bitfield values to be used.
virtual bool IAnimationCore::GetOpacityKeyFrame (uint32 which,
uint32 & keyframe,
PMRealvalue 
) const
pure virtual

Returns nth opacity keyframe value.

Parameters
whichthe nth keyframe to get.
keyframethe keyframe at which position.
valueis the value at keyframe.
virtual uint32 IAnimationCore::GetOpacityKeyFrameCount () const
pure virtual

Returns the total number of keyframes with designated opacity values.

Returns
total number of opacity keyFrames.
virtual bool IAnimationCore::GetOpacityValueAtKeyFrame (uint32 keyframe,
PMRealvalue 
) const
pure virtual

Gets the opacity values at a specified keyframe. If the value does not exist at this keyframe, an interpolated value is returned.

Parameters
keyframeto get
valueis the opacity value at specified keyframe.
virtual void IAnimationCore::GetOpacityValues (std::vector< double > & alphaValues) const
pure virtual

Methods for opacity propertyGet the actual opacity values for all frames. The values returned take into account easing and time map. If opacity property does not exist, then resulting vector is emtpy.

Parameters
alphaValuesis the resulting opacity values.
virtual bool IAnimationCore::GetPathOffset (double & offsetX,
double & offsetY 
) const
pure virtual

Returns the path offset x and y such that the motion path is shifted by width and height of the current path and the new path ends where the current path should starts.

Parameters
offsetXis the x offset value.
offsetYis the y offset value.
Returns
true if successful.
virtual bool IAnimationCore::GetRotationKeyFrame (uint32 which,
uint32 & keyframe,
PMRealvalue 
) const
pure virtual

Returns nth rotation keyframe value.

Parameters
whichthe nth keyframe to get.
keyframethe keyframe at which position.
valueis the value at keyframe.
virtual uint32 IAnimationCore::GetRotationKeyFrameCount () const
pure virtual

Returns the total number of keyframes with designated rotation values.

Returns
total number of rotation keyFrames.
virtual bool IAnimationCore::GetRotationValueAtKeyFrame (uint32 keyframe,
PMRealvalue 
) const
pure virtual

Gets the rotation values at a specified keyframe. If the value does not exist at this keyframe, an interpolated value is returned.

Parameters
keyframeto get
valueis the rotation value at specified keyframe.
virtual void IAnimationCore::GetRotationValues (std::vector< double > & rValues) const
pure virtual

Methods for Rotation propertyGet the actual rotation values for all frames. The values returned take into account easing and time map. If rotation property does not exist, then resulting vector is emtpy.

Parameters
rValuesis the resulting rotation values. If the resulting vector is empty, then there's no rotation component in the animation. If the vector has one single entry, then the rotation is constant over the entire duration with this value.
virtual void IAnimationCore::GetScaleValues (std::vector< double > & xValues,
std::vector< double > & yValues 
) const
pure virtual

Methods for Scale X and Scale Y propertyGet the actual x an y scale percentage values all frames. The values returned take into account easing and time map. If x or y scale property does not exist, then the resulting vector will be empty.

Parameters
xValuesis the resulting scale x values.
yValuesis the resutling scale y values. If the resulting vector is empty, then there's no scale x or y component in the animation. If the vector has one single entry, then the scale is constant over the entire duration with this value.
virtual bool IAnimationCore::GetScaleXKeyFrame (uint32 which,
uint32 & keyframe,
PMRealvalue 
) const
pure virtual

Returns nth scale x keyframe value.

Parameters
whichthe nth keyframe to get.
keyframethe keyframe at which position.
valueis the value at keyframe.
virtual uint32 IAnimationCore::GetScaleXKeyFrameCount () const
pure virtual

Returns the total number of keyframes with designated scale x values.

Returns
total number of scale x keyFrames.
virtual bool IAnimationCore::GetScaleXValueAtKeyFrame (uint32 keyframe,
PMRealvalue 
) const
pure virtual

Gets the scale x values at a specified keyframe. If the value does not exist at this keyframe, an interpolated value is returned.

Parameters
keyframeto get
valueis the scale x value at specified keyframe.
virtual bool IAnimationCore::GetScaleYKeyFrame (uint32 which,
uint32 & keyframe,
PMRealvalue 
) const
pure virtual

Returns nth scale y keyframe value.

Parameters
whichthe nth keyframe to get.
keyframethe keyframe at which position.
valueis the value at keyframe.
virtual uint32 IAnimationCore::GetScaleYKeyFrameCount () const
pure virtual

Returns the total number of keyframes with designated scale y values.

Returns
total number of scale y keyFrames.
virtual bool IAnimationCore::GetScaleYValueAtKeyFrame (uint32 keyframe,
PMRealvalue 
) const
pure virtual

Gets the scale y values at a specified keyframe. If the value does not exist at this keyframe, an interpolated value is returned.

Parameters
keyframeto get
valueis the scale y value at specified keyframe.
virtual PMPoint IAnimationCore::GetTransformOffsetPoint () const
pure virtual
Returns
the transform offset point.
virtual bool IAnimationCore::GetXMLDescription (WideStringxmlOut,
uint32 options = kDefaultOptions 
) const
pure virtual

Gets the current XML description representing the animation preset.

Parameters
xmlOutis the xml string representing the current animation.
optionsare the options to use when retrieving the preset xml description.
virtual void IAnimationCore::Initialize ()
pure virtual

Internal use only

virtual void IAnimationCore::OffsetPath ()
pure virtual

Offsset motion path by the width and height of the current path so that the end of path is where the start of path is before the offset.

virtual bool IAnimationCore::PropertiesUsingFancyEase () const
pure virtual

Returns true if properties has ease applied.

Returns
true if properties has ease applied.
virtual bool IAnimationCore::RemoveAllEase ()
pure virtual

Remove all ease types in the preset.

Returns
true if successful; otherwise returns false.
virtual void IAnimationCore::RemoveAllOpacityKeyFrames ()
pure virtual

Removes all opacity keyframes and reset to default condition.

virtual void IAnimationCore::RemoveAllRotationKeyFrames ()
pure virtual

Removes all rotation keyframes and reset to default condition.

virtual void IAnimationCore::RemoveAllScaleXKeyFrames ()
pure virtual

Removes all scale x keyframes and reset to default condition.

virtual void IAnimationCore::RemoveAllScaleYKeyFrames ()
pure virtual

Removes all scale y keyframes and reset to default condition.

virtual bool IAnimationCore::RemoveOpacityValueAtKeyFrame (uint32 keyframe)
pure virtual

Removes the designated opacity value at the specified keyframe. is the keyframe to remove.

virtual void IAnimationCore::RemovePath ()
pure virtual

Remove all path data.

virtual bool IAnimationCore::RemoveRotationValueAtKeyFrame (uint32 keyframe)
pure virtual

Removes the designated rotation value at the specified keyframe. is the keyframe to remove.

virtual bool IAnimationCore::RemoveScaleXValueAtKeyFrame (uint32 keyframe)
pure virtual

Removes the designated scale x value at the specified keyframe. is the keyframe to remove.

virtual bool IAnimationCore::RemoveScaleYValueAtKeyFrame (uint32 keyframe)
pure virtual

Removes the designated scale y value at the specified keyframe. is the keyframe to remove.

virtual void IAnimationCore::ReverseAllProperties ()
pure virtual

Reverse all properties.

virtual bool IAnimationCore::Set2DPath (const AnimationPathDataList & path)
pure virtual

Sets the 2D keyframe path.

Parameters
pathis the list of keyframe path point pairs.
virtual void IAnimationCore::SetDuration (const PMRealdurationInSecond)
pure virtual

Sets the duration for this animation.

Parameters
durationInSecondis the duration to set.
virtual bool IAnimationCore::SetFrameRate (int32 frameRatePerSecond)
pure virtual

Sets the frame rate for this animation.

Parameters
framesPerSecondis the frame rate.
virtual void IAnimationCore::SetNew2DBezierPath (const PMPathPointListpath)
pure virtual

Replaces the current motion path with the new path. This assumes the number of keyframes in the current path matches the number of points.

Parameters
pathis the list of path point to set.
virtual bool IAnimationCore::SetOpacityValueAtKeyFrame (uint32 keyframe,
const PMRealvalue 
)
pure virtual

Sets a specific opacity value at the specified keyframe.

Parameters
keyframeto set
valueis the opacity value to set.
virtual bool IAnimationCore::SetRotationValueAtKeyFrame (uint32 keyframe,
const PMRealvalue 
)
pure virtual

Sets a specific rotation value at the specified keyframe.

Parameters
keyframeto set
valueis the rotation value to set.
virtual bool IAnimationCore::SetScaleXValueAtKeyFrame (uint32 keyframe,
const PMRealvalue 
)
pure virtual

Sets a specific scale x value at the specified keyframe.

Parameters
keyframeto set
valueis the scale x value to set.
virtual bool IAnimationCore::SetScaleYValueAtKeyFrame (uint32 keyframe,
const PMRealvalue 
)
pure virtual

Sets a specific scale y value at the specified keyframe.

Parameters
keyframeto set
valueis the scale y value to set.
virtual void IAnimationCore::SetTransformOffsetPoint (const PMPointoffsetPoint)
pure virtual

Sets the transform offset point. This is the offset percent from the left-top point of target object's bounding box.

Parameters
offsetPointis the transform offset point.
virtual bool IAnimationCore::SetXMLDescription (const WideStringxmlIn,
bool useTimescaleFromXml = false 
)
pure virtual

Sets the XML description representing the animation preset.

Parameters
xmlInis the xml description.
ustTimescaleFromXmlis true if using the animation time scale from the xml description.