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

#include <IDashedAttributeValues.h>

Inheritance diagram for IDashedAttributeValues:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IDASHEDATTRIBUTEVALUES }
 
enum  CornerAdjustment {
  kNone, kAdjustDashes, kAdjustGaps, kAdjustBoth,
  kDefault = kAdjustBoth
}
 

Public Member Functions

virtual void SetValue (int32 n, const PMReal &value)=0
 
virtual PMReal GetValue (int32 n) const =0
 
virtual int32 NumValues () const =0
 
virtual void ClearFrom (int32 n)=0
 
virtual void GetDashArray (float *fltArray) const =0
 
virtual bool16 IsEqual (const IDashedAttributeValues *iDashedVal) const =0
 
virtual PMReal GetPhase (void) const =0
 
virtual void SetPhase (PMReal newPhase)=0
 
virtual void Copy (const IDashedAttributeValues *iDashedVal)=0
 
virtual void SetCornerAdjustment (CornerAdjustment cornerAdjustment)=0
 
virtual CornerAdjustment GetCornerAdjustment () const =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

Interface for storing a dashed stroke's attributes, including the dash array, its phase, and any corner adjustment that should be done

Member Enumeration Documentation

The various kinds of corner adjustment possible. Specifies whether to skip adjustment, adjust by modifying dashes only, adjust by modifying gaps only, or adjust by modifying both dashes and gaps

Member Function Documentation

virtual void IDashedAttributeValues::ClearFrom (int32 n)
pure virtual

Removes all values from n to the number of dashes

Parameters
nThe index of the entry at which to start removal
virtual void IDashedAttributeValues::Copy (const IDashedAttributeValuesiDashedVal)
pure virtual

Copies dashed attributes from fromDash to this

Parameters
iDashedValThe attributes to copy
virtual CornerAdjustment IDashedAttributeValues::GetCornerAdjustment () const
pure virtual
Returns
the corner adjustment
virtual void IDashedAttributeValues::GetDashArray (float * fltArray) const
pure virtual

Retrieves the entire dash array at once. fltArray must have NumValues elements

Parameters
fltArrayArray into which to store the dash array
virtual PMReal IDashedAttributeValues::GetPhase (void ) const
pure virtual
Returns
the dash's phase
virtual PMReal IDashedAttributeValues::GetValue (int32 n) const
pure virtual

Gets a value in the dash array. If asking for a value greater than defined in NumValues it will return the same value as the last valid value

Parameters
nThe index of the entry to get
Returns
Its value
See Also
NumValues
virtual bool16 IDashedAttributeValues::IsEqual (const IDashedAttributeValuesiDashedVal) const
pure virtual

Compares two attribute values for equality

Parameters
iDashedValThe attribute values to compare against this one
Returns
kTrue if the attributes are equal, else kFalse
virtual int32 IDashedAttributeValues::NumValues () const
pure virtual
Returns
the number of valid values. This returns 1 to 6
virtual void IDashedAttributeValues::SetCornerAdjustment (CornerAdjustment cornerAdjustment)
pure virtual

Sets the corner adjustment

Parameters
cornerAdjustmentThe corner adjustment to use
virtual void IDashedAttributeValues::SetPhase (PMReal newPhase)
pure virtual

Sets the dash's phase

Parameters
newPhaseThe new phase to use
virtual void IDashedAttributeValues::SetValue (int32 n,
const PMRealvalue 
)
pure virtual

Sets a value in the dash array

The sequence of values represent alternating dash and gap numbers. The first value is dash0, the second value is gap0, the third value is dash1, etc.

Setting higher number dash/gaps will implicitly set lower number dash/gaps if lower number dash/gaps have not been set yet.

For example, the client sets dash0 to 30 pt. The client then sets dash2 to 45 pt. This results in gap0 set to 30, and dash1, gap1, and dash2 set to 45.

Parameters
nThe index of the entry to set
valueIts value