#include <IClipSettings.h>
|
| enum | { kDefaultIID = IID_ICLIPSETTINGS } |
| |
| enum | ClipType { kClipNone = 0, kClipEdgeDetection = 1, kClipAlpha = 2, kClipEmbeddedPath = 3, kClipUserPath = 4 } |
| |
| enum | { kDefaultClipIndex = -1 } |
| |
This class describes the clipping path settings for an image. These settings can be applied via the kSetClipValuesCmdBoss command.
- See Also
- ISetClipValuesCmdData
Default IID enumeration for this class.
| virtual uint8 IClipSettings::GetAllowHoles | ( | | ) | const |
| pure virtual |
Returns whether or not to allow holes, set via SetAllowHoles.
| virtual int16 IClipSettings::GetAlphaIndex | ( | void | | ) | const |
| pure virtual |
Returns which zero based alpha channel index to use when there is more than one alpha. Set via SetAlphaIndex.
| virtual ClipType IClipSettings::GetClipType | ( | | ) | const |
| pure virtual |
Returns the current clipping type set via SetClipType.
| virtual int16 IClipSettings::GetEmbeddedPathIndex | ( | void | | ) | const |
| pure virtual |
Returns which zero based embedded path to use when there is more than one embedded path. Set via SetAlphaIndex. If kDefaultClipIndex is returned, then the default clipping path will be used. In Photoshop, any given path can be designated as the clipping path. The clipping path is stored in the '8BIM' resource with ID 2999. If such a path does not exist, then the first path will be used.
| virtual PMReal IClipSettings::GetInset | ( | | ) | const |
| pure virtual |
Returns the current inset to apply to the clipping set via SetInset.
| virtual uint8 IClipSettings::GetInvert | ( | | ) | const |
| pure virtual |
Returns the invert setting set by SetInvert.
| virtual bool8 IClipSettings::GetRestrictToFrame | ( | void | | ) | const |
| pure virtual |
Returns whether or not to restrict edge detection and alpha edge detection to the currently visible portions of the image not clipped/cropped by the containing frame. Set via SetRestrictToFrame.
| virtual uint8 IClipSettings::GetThreshold | ( | | ) | const |
| pure virtual |
Returns the current threshold value set via SetThreshold.
| virtual PMReal IClipSettings::GetTolerance | ( | | ) | const |
| pure virtual |
Returns the current tolerance set via SetTolerance.
| virtual uint8 IClipSettings::GetUseHighRes | ( | | ) | const |
| pure virtual |
Returns the current High Res setting, set via SetUseHighRes.
| virtual void IClipSettings::SetAllowHoles | ( | bool8 | AllowHoles | ) | |
| pure virtual |
Sets whether to filter out any holes in the resulting clipping path.
- Parameters
| AllowHoles | - IN: kFalse to filter out any holes in the resulting clipping path. |
| virtual void IClipSettings::SetAlphaIndex | ( | int16 | index | ) | |
| pure virtual |
Sets index to determine which alpha channel to use.
- Parameters
| index | - IN: If the clip type is kClipAlpha and there are multiple alpha channels, then use this zero-based index to determine which alpha channel to use. |
| virtual void IClipSettings::SetClipType | ( | ClipType | clipType | ) | |
| pure virtual |
Sets ClipType
- Parameters
| clipType | - IN: One of kClipNone, kClipEdgeDetection, kClipAlpha, and kClipEmbeddedPath. |
| virtual void IClipSettings::SetEmbeddedPathIndex | ( | int16 | index | ) | |
| pure virtual |
Sets path to use when the clip type is kClipEmbeddedPath and there are multiple embedded paths.
- Parameters
| index | - IN: If the clip type is kClipEmbeddedPath and there are multiple embedded paths, then use this zero-based index to determine which path to use. If kDefaultClipIndex is passed, then the default clipping path will be used. In Photoshop, any given path can be designated as the clipping path. The clipping path is stored in the '8BIM' resource with ID 2999. If such a path does not exist, then the first path will be used. |
| virtual void IClipSettings::SetInset | ( | PMReal | Inset | ) | |
| pure virtual |
Sets how far to inset the resulting clipping path
- Parameters
| Inset | - IN: Inset, in points. |
| virtual void IClipSettings::SetInvert | ( | bool8 | Invert | ) | |
| pure virtual |
Sets whether to invert the resulting clipping path.
- Parameters
| Invert | - IN: kTrue to invert the resulting clipping path. |
| virtual void IClipSettings::SetRestrictToFrame | ( | bool8 | yesno | ) | |
| pure virtual |
Sets whether to restrict edge detection and alpha edge detection to the currently visible portions of the image not clipped/cropped by the containing frame.
- Parameters
| yesno | - IN: kTrue to restrict edge detection and alpha edge detection to the currently visible portions of the image not clipped/cropped by the containing frame. |
| virtual void IClipSettings::SetThreshold | ( | uint8 | Threshold | ) | |
| pure virtual |
Sets threshold. The larger the threshold, the darker the pixels included in an edge detection operation.
- Parameters
| Threshold | - IN: A value between 0 and 255. |
| virtual void IClipSettings::SetTolerance | ( | PMReal | Tolerance | ) | |
| pure virtual |
After an edge detection or alpha edge detection operation to compute a clipping path, the resulting path is a polygon. This path then goes through a smoothing process to convert the polygonal path to a bezier path and reduce the total number of points. The Tolerance specifies how closely the smoothed path must match the polygonal path. The smaller the tolerance, the more points the resulting path will have.
- Parameters
| Tolerance | - IN: How closely the smoothed path must follow the original polygonal path. |
| virtual void IClipSettings::SetUseHighRes | ( | bool8 | UseHighRes | ) | |
| pure virtual |
Sets whether to force the high res image to be used to obtain pixel or alpha data.
- Parameters
| UseHighRes | - IN: kTrue to force the high res image to be used to obtain pixel or alpha data. This option is slower but will produce the most accurate results. |