InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IOpacityGradientStops Class Referenceabstract
Inheritance diagram for IOpacityGradientStops:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IOPACITYGRADIENTSTOPS }
 

Public Member Functions

virtual void ResetToDefault ()=0
 
virtual void DeleteAllStops ()=0
 
virtual int32 GetNumStops () const =0
 
virtual int32 InsertStop (int32 beforeStop=-1)=0
 
virtual bool32 DeleteStop (int32 whichStop)=0
 
virtual void SetStopOpacity (int32 whichStop, PMReal opacity)=0
 
virtual PMReal GetStopOpacity (int32 whichStop) const =0
 
virtual int32 SetStopPosition (int32 whichStop, PMReal position, bool32 autoRearrange=kTrue)=0
 
virtual PMReal GetStopPosition (int32 whichStop) const =0
 
virtual void SetStopMidpoint (int32 whichStop, PMReal midpoint)=0
 
virtual PMReal GetStopMidpoint (int32 whichStop) const =0
 
virtual void SetStopMidpointRelativeLocation (int32 whichStop, PMReal relLoc)=0
 
virtual PMReal GetStopMidpointRelativeLocation (int32 whichStop) const =0
 
virtual bool16 Equals (const IOpacityGradientStops *iOther) const =0
 
virtual void CopyFrom (const IOpacityGradientStops *iOther)=0
 
virtual IDataBaseGetDataBase (void) const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Member Function Documentation

virtual void IOpacityGradientStops::CopyFrom (const IOpacityGradientStopsiOther)
pure virtual

Makes a copy of another gradient's data. Any existing data in this gradient is wiped.

Parameters
pSrcThe gradient data from which to copy.
virtual void IOpacityGradientStops::DeleteAllStops ()
pure virtual

Resets the gradient to a no-stop configuration. Note that this isn't technically a valid gradient state; you'll need to add at least two stops for it to be valid.

virtual bool32 IOpacityGradientStops::DeleteStop (int32 whichStop)
pure virtual

Removes the stop at the specified location.

Parameters
whichStopIN The stop you want to delete.
Returns
kTrue if successful; kFalse if not.
virtual bool16 IOpacityGradientStops::Equals (const IOpacityGradientStopsiOther) const
pure virtual

Return kTrue if both sets of gradient data are equal.

Parameters
iOtherThe gradient to compare.
Returns
kTrue if equal otherwise kFalse.
virtual IDataBase* IOpacityGradientStops::GetDataBase (void ) const
pure virtual

Return the data base associated with this gradient data.

Returns
the data base associated with this gradient data. IDataBase* can be nil if gradient object does not have a assoicated database or if a data base cannot be identified.
virtual int32 IOpacityGradientStops::GetNumStops () const
pure virtual

Returns the number of stops in the gradient.

Returns
The number of stops.
virtual PMReal IOpacityGradientStops::GetStopMidpoint (int32 whichStop) const
pure virtual

Get the midpoint for a particular stop.

Parameters
whichStopIN Which stop to set.
Returns
The midpoint of the specified stop.
virtual PMReal IOpacityGradientStops::GetStopMidpointRelativeLocation (int32 whichStop) const
pure virtual

Get the relative location for a particular stop.

Parameters
whichStopIN Which stop to set.
Returns
The relative location of the specified stop.
virtual PMReal IOpacityGradientStops::GetStopOpacity (int32 whichStop) const
pure virtual

Get the opacity for a particular stop.

Parameters
whichStopIN Which stop to set.
Returns
The opacity of the specified stop.
virtual PMReal IOpacityGradientStops::GetStopPosition (int32 whichStop) const
pure virtual

Get the position for a particular stop.

Parameters
whichStopIN Which stop to set.
Returns
The position of the specified stop.
virtual int32 IOpacityGradientStops::InsertStop (int32 beforeStop = -1)
pure virtual

Adds a new stop at the specified location.

Parameters
beforeStopIN The stop before which you want to add the new stop; -1 adds at the end.
Returns
The index of the new stop.
virtual void IOpacityGradientStops::ResetToDefault ()
pure virtual

Resets the gradient to the default configuration (100% opacity to 0% opacity).

virtual void IOpacityGradientStops::SetStopMidpoint (int32 whichStop,
PMReal midpoint 
)
pure virtual

Set the midpoint for a particular stop.

Parameters
whichStopIN Which stop to set.
midpointIN The midpoint to assign to the stop.
virtual void IOpacityGradientStops::SetStopMidpointRelativeLocation (int32 whichStop,
PMReal relLoc 
)
pure virtual

Set the relative location for a particular stop.

Parameters
whichStopIN Which stop to set.
relLocIN The relative location to assign to the stop.
virtual void IOpacityGradientStops::SetStopOpacity (int32 whichStop,
PMReal opacity 
)
pure virtual

Set the opacity for a particular stop.

Parameters
whichStopIN Which stop to set.
opacityIN The opacity to assign to the stop.
virtual int32 IOpacityGradientStops::SetStopPosition (int32 whichStop,
PMReal position,
bool32 autoRearrange = kTrue 
)
pure virtual

Set the position for a particular stop.

Parameters
whichStopIN Which stop to set.
positionIN The position to assign to the stop.
autoRearrangeIN True to rearrange stop indices automatically based on location comparisons. If False, the position will be set without any checking; the caller is responsible for maintaining correct ordering. This is useful if you want to create a particular arrangement of stops (legal, of course) without the auto-rearranging switching indices around on you.
Returns
The new index of the stop; -1 if an error occurred; whichStop if autoRearrange = kFalse.