#include <IGradientAttributeSuite.h>
|
| enum | { kDefaultIID = IID_IGRADIENTATTRIBUTESUITE } |
| |
| enum | AttributeType { kUnknownAttrType = -1, kFillAngle = 0, kFillLength, kFillCenter, kFIllRadius, kFIllHiliteAngle, kFIllHiliteLength, kStrokeAngle, kStrokeLength, kStrokeCenter, kStrokeRadius, kStrokeHiliteAngle, kStrokeHiliteLength, kMaxNumberAttrTypes } |
| |
|
| virtual uint16 | GetAttributeCount (ClassID attributeClassID)=0 |
| |
| virtual uint16 | GetAttributeValueCount (ClassID attributeClassID, uint32 index)=0 |
| |
| virtual uint16 | GetAttributeCount (AttributeType attributeType)=0 |
| |
| virtual const IPMUnknown * | QueryAttribute (uint32 index, ClassID attributeClass, const PMIID &interfaceIID=IID_IUNKNOWN)=0 |
| |
| virtual IPMUnknown * | CreateAttributeCopy (uint32 index, ClassID attributeClass, const PMIID &interfaceIID=IID_IUNKNOWN)=0 |
| |
| virtual ErrorCode | CopyIntoAttribute (uint32 index, IPMUnknown *iSourceAttribute)=0 |
| |
| virtual PMReal | GetRealNumberAttributeValue (uint32 index, AttributeType attributeType)=0 |
| |
| virtual PMPoint | GetPointAttributeValue (uint32 index, AttributeType attributeType)=0 |
| |
| virtual bool16 | IsAttributeUnique (ClassID attributeClass)=0 |
| |
| virtual bool16 | IsAttributeUnique (AttributeType attributeType)=0 |
| |
| virtual ErrorCode | ApplyAttribute (ClassID attributeClass, const IPMUnknown *iAttribute)=0 |
| |
| virtual ErrorCode | ApplyAttributes (IGraphicStyleAttributeBossList *iAttributeList)=0 |
| |
| virtual ErrorCode | ApplyGradientVector (const PMPoint &startPoint, const PMPoint &endPoint)=0 |
| |
| virtual ErrorCode | ApplyDefaultAttributes (GradientType gradientType)=0 |
| |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| |
| virtual void | AddRef () const =0 |
| |
| virtual void | Release () const =0 |
| |
A selection related attribute suite interface for the gradient attributes. It provides get and set methods for accessing the gradient attributes. It works in conjunction with the IGraphicAttributeSuite.
- See Also
- also IGraphicAttributeSuite.h
| Enumerator |
|---|
| kUnknownAttrType | kUnknownAttrType indicates an unknown gradient attribute type. |
| kFillAngle | kFillAngle indicates the gradient fill angle attribute. |
| kFillLength | kFillLength indicates the gradient fill length attribute. |
| kFillCenter | kFillCenter indicates the gradient fill center attribute if gradient type is a kRadial gradient. It indicates a gradient start point attribute if gradient type is a kAxial gradient. |
| kFIllRadius | kFIllRadius indicates the gradient fill radius attribute. |
| kFIllHiliteAngle | kFIllHiliteAngle indicates the gradient fill hilite angle attribute. |
| kFIllHiliteLength | kFIllHiliteLength indicates the gradient fill hilite length attribute. |
| kStrokeAngle | kFillAngle indicates the gradient stroke angle attribute. |
| kStrokeLength | kFillLength indicates the gradient stroke length attribute. |
| kStrokeCenter | kFillCenter indicates the gradient stroke center attribute if gradient type is a kRadial gradient. It indicates a gradient start point attribute if gradient type is a kAxial gradient. |
| kStrokeRadius | kFIllRadius indicates the gradient stroke radius attribute. |
| kStrokeHiliteAngle | kFIllHiliteAngle indicates the gradient stroke hilite angle attribute. |
| kStrokeHiliteLength | kFIllHiliteLength indicates the gradient stroke hilite length attribute. |
| kMaxNumberAttrTypes | kMaxNumberAttrTypes indicates the maximum number of gradient attribute types. |
| virtual ErrorCode IGradientAttributeSuite::ApplyAttribute | ( | ClassID | attributeClass, | | | const IPMUnknown * | iAttribute | | ) | | |
| pure virtual |
Apply the specified attribute. If applying a angle attribute, other related gradient attributes will be adjusted relative to the left-bottom of the text/graphic frame which the angle attribute is being applied.
- Parameters
| attributeClass | is the specified attribute class. |
| iAttribute | is the attribute. |
- Returns
- kSuccess if successful. Otherwise returns an error code.
Apply the list of attributes. Attributes are applied as is without any modification.
- Parameters
| iAttributeList | is the list of attributes to apply. |
- Returns
- kSuccess if successful. Otherwise returns an error code.
| virtual ErrorCode IGradientAttributeSuite::ApplyDefaultAttributes | ( | GradientType | gradientType | ) | |
| pure virtual |
Apply the default gradient attributes based on the gradient type. Attributes are applied relative to the frame geometry. All related attributes are reset to their original default values.
- Parameters
| gradientType | specifies the gradient type. This is either kAxial or kRadial. |
- See Also
- also GraphicTypes.h
- Returns
- kSuccess if successful. Otherwise returns an error code.
| virtual ErrorCode IGradientAttributeSuite::ApplyGradientVector | ( | const PMPoint & | startPoint, | | | const PMPoint & | endPoint | | ) | | |
| pure virtual |
Apply the gradient vector to the current selection. If one or more item in the current current selection does not already have gradient fill rendering object applied, the current stroke or fill gradient rendering object will be applied to the entire selection first.
- Parameters
| startPoint | is the starting point of the vector in the pastboard coordinate. |
| endPoint | is the ending point of the vector in the pastboard coordinate. |
- Returns
- kSuccess if successful. Otherwise returns an error code.
| virtual ErrorCode IGradientAttributeSuite::CopyIntoAttribute | ( | uint32 | index, | | | IPMUnknown * | iSourceAttribute | | ) | | |
| pure virtual |
Copy the content of source attribute into the nth attribute of the same type.
- Parameters
| index | specifies the nth attribute for this attribute class. |
| iSourceAttribute | specifies the source attribute. |
- Returns
- kSuccess if successful. Otherwise returns an error code.
| virtual IPMUnknown* IGradientAttributeSuite::CreateAttributeCopy | ( | uint32 | index, | | | ClassID | attributeClass, | | | const PMIID & | interfaceIID = IID_IUNKNOWN | | ) | | |
| pure virtual |
Create a copy of the nth attribute specified by the attribute class ID. The caller is responsible to release the object returned.
- Parameters
| index | specifies the nth attribute for this attribute class. |
| attributeClass | specifies the attribute class. |
| interfaceIID | is the interested interface IID. |
- Returns
- the interface pointer to the specified attribute copy.
| virtual uint16 IGradientAttributeSuite::GetAttributeCount | ( | ClassID | attributeClassID | ) | |
| pure virtual |
Return the attribute count for the spcified attrribute class.
- Parameters
| ClassID | attributeClassID specifies the attribute class. |
- Returns
- the number of count for this attribute class.
| virtual uint16 IGradientAttributeSuite::GetAttributeCount | ( | AttributeType | attributeType | ) | |
| pure virtual |
Return the attribute count for the spcified attrribute type.
- Parameters
| attributeType | specifies the attribute type. |
- Returns
- the number of count for this attribute type.
| virtual uint16 IGradientAttributeSuite::GetAttributeValueCount | ( | ClassID | attributeClassID, | | | uint32 | index | | ) | | |
| pure virtual |
Return the attribute count for the spcified attrribute class and value.
- Parameters
| attributeClassID | specifies the attribute class. |
| index | specifies the nth attribute value. |
- Returns
- the number of count for this attribute class and value.
| virtual PMPoint IGradientAttributeSuite::GetPointAttributeValue | ( | uint32 | index, | | | AttributeType | attributeType | | ) | | |
| pure virtual |
Returns the nth attribute value for the specified attribute type.
- Parameters
| index | specifies the nth attribute for this attribute class. |
| attributeType | specifies the attribute type. |
- Returns
- a PMPoint for the specified attribute.
| virtual PMReal IGradientAttributeSuite::GetRealNumberAttributeValue | ( | uint32 | index, | | | AttributeType | attributeType | | ) | | |
| pure virtual |
Returns the nth attribute value for the specified attribute type.
- Parameters
| index | specifies the nth attribute for this attribute class. |
| attributeType | specifies the attribute type. |
- Returns
- a PMReal for the specified attribute.
| virtual bool16 IGradientAttributeSuite::IsAttributeUnique | ( | ClassID | attributeClass | ) | |
| pure virtual |
Return kTrue if the attribugte specified is unique.
- Parameters
| attributeClass | specifies the attribute class. |
- Returns
- true if specified attribute is unique.
| virtual bool16 IGradientAttributeSuite::IsAttributeUnique | ( | AttributeType | attributeType | ) | |
| pure virtual |
Return kTrue if the attribugte specified is unique.
- Parameters
| attributeType | specifies the attribute type. |
- Returns
- true if specified attribute is unique.
| virtual const IPMUnknown* IGradientAttributeSuite::QueryAttribute | ( | uint32 | index, | | | ClassID | attributeClass, | | | const PMIID & | interfaceIID = IID_IUNKNOWN | | ) | | |
| pure virtual |
Returns the nth attribute specified by the attribute class ID. The caller is responsible to release the object returned.
- Parameters
| index | specifies the nth attribute for this attribute class. |
| attributeClass | specifies the attribute class. |
| interfaceIID | is the interested interface IID. |
- Returns
- the interface pointer to the specified attribute.