Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreLiveEffect.h
Go to the documentation of this file.
1
7#ifndef __HDI_CORE_LIVE_EFFECT__
8#define __HDI_CORE_LIVE_EFFECT__
9
10#if defined(HDI_CORE_AIP_MODE)
11
12#include "hdicorePathStyle.h"
14#include "hdicoreTypes.h"
15
16namespace hdi
17{
18 namespace core
19 {
21 {
22 public:
27 {
28 public:
41
50
56 virtual ~Parameters();
57
67 virtual Parameters& operator=(const Parameters& rhs_);
68
77 virtual bool isEmpty() const;
78
91 virtual AILiveEffectParameters aiLiveEffectParams() const;
92
102 virtual bool operator==(const Parameters& rhs_) const;
103
113 virtual bool operator!=(const Parameters& rhs_) const;
114
123 virtual std::string displayString() const;
124
133 virtual std::string extraString() const;
134
143 virtual bool fillStyle(FillStyle& fs__) const;
144
158 virtual bool fillStyleMatrix(TransformMatrix& m__) const;
159
169 virtual bool xformedFillStyle(FillStyle& fs__) const;
170
179 virtual bool strokeStyle(StrokeStyle& ss__) const;
180
194 virtual bool strokeStyleMatrix(TransformMatrix& m__) const;
195
205 virtual bool xformedStrokeStyle(StrokeStyle& ss__) const;
206
214 virtual bool evenOdd() const;
215
223 virtual double scaleFactor() const;
224
225
226 private:
227 friend void* __accessImpl(const Parameters&);
228 friend Parameters __accessCtor(AILiveEffectParameters);
229
233 void* __data;
234
240 void* __impl() const;
241
247 Parameters(AILiveEffectParameters);
248 };
249
250 typedef std::unique_ptr<Parameters> ParametersUP;
251 typedef std::shared_ptr<Parameters> ParametersSP;
252 typedef std::weak_ptr<Parameters> ParametersWP;
253
254 enum PreferredInputArtType
255 {
256 InputArtTypeDynamic = 0,
257 InputArtTypeGroup = 1 << 0,
258 InputArtTypePath = 1 << 1,
259 InputArtTypeCompoundPath = 1 << 2,
260 InputArtTypePlaced = 1 << 3,
261 InputArtTypeRaster = 1 << 4,
262 InputArtTypeCustom = 1 << 5,
263 InputArtTypeMesh = 1 << 6,
264 InputArtTypeText = 1 << 7,
265 InputArtTypeSymbol = 1 << 8,
266 InputArtTypeForeign = 1 << 9,
267 InputArtTypeTextLegacy = 1 << 10,
268 InputArtTypeAll = ~0L
269 };
270
275 {
276 NoStyleFlags = 0,
277
278 // Applied by default before the object is painted with fill or stroke
279 PreEffectFilter = 1,
280
281 // Applied by default after the object is painted with fill or stroke
282 PostEffectFilter = 2,
283
284 // Replaces the default stroke behavior. Brushes are an example of an effect of this type.
285 StrokeFilter = 3,
286
287 // Replaces the default fill behavior
288 FillFilter = 4,
289
290 // A mask to OR with the filter-style value to retrieve specific bit flags. Don't use when
291 // registering a live effect.
292 FilterTypeMask = 0xFFFF,
293
294 // Parameters can be scaled
295 HasScalableParams = 1 << 17,
296
297 // Supports automatic rasterization
298 UsesAutoRasterize = 1 << 18,
299
300 // Supports the generation of an SVG filter
301 CanGenerateSVGFilter = 1 << 19,
302
303 // Has parameters that can be modified by a LiveEffectAdjustColorsMessageType message
304 HandlesAdjustColorMsg = 1 << 20,
305
306 // Handles LiveEffectIsCompatibleMessageType messages. If this flag is not set the message will not
307 // be sent.
308 HandlesIsCompatibleMsg = 1 << 21
309 };
310
315 {
316 UnknownMergeAction = 0,
317 AppendMergeAction = 10,
318 ReplaceFillMergeAction = 20,
319 ReplaceStrokeMergeAction = 30
320 };
321
334
343
351 LiveEffect(const AILiveEffectHandle aiLiveEff_);
352
358 virtual ~LiveEffect();
359
369 virtual LiveEffect& operator=(const LiveEffect& rhs_);
370
378 virtual bool isEmpty() const;
379
391 virtual AILiveEffectHandle aiLiveEffectHandle() const;
392
401 virtual bool operator==(const LiveEffect& rhs_) const;
402
411 virtual bool operator!=(const LiveEffect& rhs_) const;
412
420 virtual std::string name() const;
421
429 virtual std::string title() const;
430
440 virtual bool version(int32_t& major__, int32_t& minor__) const;
441
449 virtual PreferredInputArtType inputArtPreference() const;
450
458 virtual StyleFlags styleFlags() const;
459
468 virtual bool mergeIntoSelection(const MergeAction act_);
469
483 virtual bool getEarliestAppVersion(int16_t& rgbVers__, int16_t& cmykVers__) const;
484
496 virtual void setEarliestAppVersion(const int16_t rgbVers_, const int16_t cmykVers_);
497
498
499 private:
500 friend void* __accessImpl(const LiveEffect&);
501
505 void* __data;
506
512 void* __impl() const;
513 };
514
515 typedef std::unique_ptr<LiveEffect> LiveEffectUP;
516 typedef std::shared_ptr<LiveEffect> LiveEffectSP;
517 typedef std::weak_ptr<LiveEffect> LiveEffectWP;
518
519 extern void* __accessImpl(const LiveEffect::Parameters&);
520 extern LiveEffect::Parameters __accessCtor(AILiveEffectParameters);
521 extern void* __accessImpl(const LiveEffect&);
522 }
523}
524
525hdi::core::LiveEffect::PreferredInputArtType operator|(
526 const hdi::core::LiveEffect::PreferredInputArtType lhs_,
527 const hdi::core::LiveEffect::PreferredInputArtType rhs_
528);
529
530hdi::core::LiveEffect::PreferredInputArtType& operator|=(
531 hdi::core::LiveEffect::PreferredInputArtType& lhs__,
532 const hdi::core::LiveEffect::PreferredInputArtType rhs_
533);
534
535#endif
536// HDI_CORE_AIP_MODE
537
538#endif
539// __HDI_CORE_LIVE_EFFECT__
Describes the fill styling of a path.
Definition: hdicorePathStyle.h:147
Describes the parameters of an Illustrator live effect.
Definition: hdicoreLiveEffect.h:27
virtual std::string displayString() const
Gets the string that is displayed by the panel in reference to the filter name, if it is set.
virtual Parameters & operator=(const Parameters &rhs_)
Assigns one Parameters object to another.
virtual std::string extraString() const
Gets the string that gives extra information for the panel to display for this filter,...
virtual bool isEmpty() const
Gets whether the target Parameters object is empty (constructed with the default ctor)
Parameters()
Constructs an empty Parameters object.
virtual double scaleFactor() const
Gets the scale factor for the target param.
virtual bool fillStyle(FillStyle &fs__) const
Gets the fill style for the target param.
virtual ~Parameters()
Parameters object destructor.
virtual bool fillStyleMatrix(TransformMatrix &m__) const
Gets the fill transform for the target param.
virtual AILiveEffectParameters aiLiveEffectParams() const
Gets the live effect param ref around which the target object is wrapped.
virtual bool xformedStrokeStyle(StrokeStyle &ss__) const
Gets the stroke style for the target param, but with the object's style matrix multiplied in for grad...
virtual bool xformedFillStyle(FillStyle &fs__) const
Gets the fill style for the target param, but with the object's style matrix multiplied in for gradie...
virtual bool strokeStyle(StrokeStyle &ss__) const
Gets the stroke style for the target param.
virtual bool strokeStyleMatrix(TransformMatrix &m__) const
Gets the stroke transform for the target param.
Parameters(const Parameters &p_)
Constructs a new Parameters object from an existing Parameters object (copy ctor)
virtual bool operator==(const Parameters &rhs_) const
Tests whether a given Parameters object is the same as another.
virtual bool evenOdd() const
Gets the even-odd fill rule for the target param.
virtual bool operator!=(const Parameters &rhs_) const
Tests whether a given Parameters object is not the same as another.
Definition: hdicoreLiveEffect.h:21
virtual bool getEarliestAppVersion(int16_t &rgbVers__, int16_t &cmykVers__) const
Gets the earliest Illustrator version that an effect supports.
virtual bool mergeIntoSelection(const MergeAction act_)
Merges the target effect into the existing style of all selected objects.
virtual StyleFlags styleFlags() const
Gets the style flags of the target effect.
LiveEffect(const LiveEffect &le_)
Constructs a new LiveEffect object from an existing LiveEffect object (copy constructor)
virtual LiveEffect & operator=(const LiveEffect &rhs_)
Assigns one LiveEffect object to another.
LiveEffect(const AILiveEffectHandle aiLiveEff_)
Constructs a new LiveEffect object from an AILiveEffectHandle.
virtual bool version(int32_t &major__, int32_t &minor__) const
Gets the version info for the target live effect.
virtual ~LiveEffect()
LiveEffect object destructor.
virtual std::string name() const
Gets the unique name of the target effect.
virtual bool operator==(const LiveEffect &rhs_) const
Tests whether a given LiveEffect object is the same as another.
MergeAction
Describes the merge action of a live effect.
Definition: hdicoreLiveEffect.h:315
virtual AILiveEffectHandle aiLiveEffectHandle() const
Gets the live effect handle around which the target object is wrapped.
StyleFlags
Describes the style of a live effect.
Definition: hdicoreLiveEffect.h:275
virtual bool operator!=(const LiveEffect &rhs_) const
Tests whether a given LiveEffect object is not the same as another.
virtual std::string title() const
Gets the UI-visible title of the effect.
virtual bool isEmpty() const
Gets whether the target LiveEffect object is empty (constructed with the default ctor)
virtual void setEarliestAppVersion(const int16_t rgbVers_, const int16_t cmykVers_)
Sets the earliest Illustrator version that an effect supports.
LiveEffect()
Constructs an empty LiveEffect object.
virtual PreferredInputArtType inputArtPreference() const
Gets the preferred input art types of the target effect.
Describes the stroke styling of a path.
Definition: hdicorePathStyle.h:260
Allows for 2-dimensional transformations in a single application via matrix math.
Definition: hdicoreTransformMatrix.h:34
Header file for path style-related classes.
Header file for describing a 2D transformation matrix.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.