Hot Door CORE 0.8.4
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreLiveEffect.h
Go to the documentation of this file.
1
6
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 {
24 {
25 public:
30 {
31 public:
44
53
59 virtual ~Parameters();
60
70 virtual Parameters& operator=(const Parameters& rhs_);
71
80 virtual bool isEmpty() const;
81
94 virtual AILiveEffectParameters aiLiveEffectParams() const;
95
105 virtual bool operator==(const Parameters& rhs_) const;
106
116 virtual bool operator!=(const Parameters& rhs_) const;
117
126 virtual std::string displayString() const;
127
136 virtual std::string extraString() const;
137
146 virtual bool fillStyle(FillStyle& fs__) const;
147
161 virtual bool fillStyleMatrix(TransformMatrix& m__) const;
162
172 virtual bool xformedFillStyle(FillStyle& fs__) const;
173
182 virtual bool strokeStyle(StrokeStyle& ss__) const;
183
197 virtual bool strokeStyleMatrix(TransformMatrix& m__) const;
198
208 virtual bool xformedStrokeStyle(StrokeStyle& ss__) const;
209
217 virtual bool evenOdd() const;
218
226 virtual double scaleFactor() const;
227
228
229 private:
230 friend void* __accessImpl(const Parameters&);
231 friend Parameters __accessCtor(AILiveEffectParameters);
232
236 void* __data;
237
243 void* __impl() const;
244
250 Parameters(AILiveEffectParameters);
251 };
252
253 typedef std::unique_ptr<Parameters> ParametersUP;
254 typedef std::shared_ptr<Parameters> ParametersSP;
255 typedef std::weak_ptr<Parameters> ParametersWP;
256
257 enum PreferredInputArtType
258 {
259 InputArtTypeDynamic = 0,
260 InputArtTypeGroup = 1 << 0,
261 InputArtTypePath = 1 << 1,
262 InputArtTypeCompoundPath = 1 << 2,
263 InputArtTypePlaced = 1 << 3,
264 InputArtTypeRaster = 1 << 4,
265 InputArtTypeCustom = 1 << 5,
266 InputArtTypeMesh = 1 << 6,
267 InputArtTypeText = 1 << 7,
268 InputArtTypeSymbol = 1 << 8,
269 InputArtTypeForeign = 1 << 9,
270 InputArtTypeTextLegacy = 1 << 10,
271 InputArtTypeAll = ~0L
272 };
273
278 {
279 NoStyleFlags = 0,
280
281 // Applied by default before the object is painted with fill or stroke
282 PreEffectFilter = 1,
283
284 // Applied by default after the object is painted with fill or stroke
285 PostEffectFilter = 2,
286
287 // Replaces the default stroke behavior. Brushes are an example of an effect of this type.
288 StrokeFilter = 3,
289
290 // Replaces the default fill behavior
291 FillFilter = 4,
292
293 // A mask to OR with the filter-style value to retrieve specific bit flags. Don't use when
294 // registering a live effect.
295 FilterTypeMask = 0xFFFF,
296
297 // Parameters can be scaled
298 HasScalableParams = 1 << 17,
299
300 // Supports automatic rasterization
301 UsesAutoRasterize = 1 << 18,
302
303 // Supports the generation of an SVG filter
304 CanGenerateSVGFilter = 1 << 19,
305
306 // Has parameters that can be modified by a LiveEffectAdjustColorsMessageType message
307 HandlesAdjustColorMsg = 1 << 20,
308
309 // Handles LiveEffectIsCompatibleMessageType messages. If this flag is not set the message will not
310 // be sent.
311 HandlesIsCompatibleMsg = 1 << 21
312 };
313
318 {
319 UnknownMergeAction = 0,
320 AppendMergeAction = 10,
321 ReplaceFillMergeAction = 20,
322 ReplaceStrokeMergeAction = 30
323 };
324
337
346
354 LiveEffect(const AILiveEffectHandle aiLiveEff_);
355
361 virtual ~LiveEffect();
362
372 virtual LiveEffect& operator=(const LiveEffect& rhs_);
373
381 virtual bool isEmpty() const;
382
394 virtual AILiveEffectHandle aiLiveEffectHandle() const;
395
404 virtual bool operator==(const LiveEffect& rhs_) const;
405
414 virtual bool operator!=(const LiveEffect& rhs_) const;
415
423 virtual std::string name() const;
424
432 virtual std::string title() const;
433
443 virtual bool version(int32_t& major__, int32_t& minor__) const;
444
452 virtual PreferredInputArtType inputArtPreference() const;
453
461 virtual StyleFlags styleFlags() const;
462
471 virtual bool mergeIntoSelection(const MergeAction act_);
472
486 virtual bool getEarliestAppVersion(int16_t& rgbVers__, int16_t& cmykVers__) const;
487
499 virtual void setEarliestAppVersion(const int16_t rgbVers_, const int16_t cmykVers_);
500
501
502 private:
503 friend void* __accessImpl(const LiveEffect&);
504
508 void* __data;
509
515 void* __impl() const;
516 };
517
518 typedef std::unique_ptr<LiveEffect> LiveEffectUP;
519 typedef std::shared_ptr<LiveEffect> LiveEffectSP;
520 typedef std::weak_ptr<LiveEffect> LiveEffectWP;
521
522 extern void* __accessImpl(const LiveEffect::Parameters&);
523 extern LiveEffect::Parameters __accessCtor(AILiveEffectParameters);
524 extern void* __accessImpl(const LiveEffect&);
525 }
526}
527
528hdi::core::LiveEffect::PreferredInputArtType operator|(
529 const hdi::core::LiveEffect::PreferredInputArtType lhs_,
530 const hdi::core::LiveEffect::PreferredInputArtType rhs_
531);
532
533hdi::core::LiveEffect::PreferredInputArtType& operator|=(
534 hdi::core::LiveEffect::PreferredInputArtType& lhs__,
535 const hdi::core::LiveEffect::PreferredInputArtType rhs_
536);
537
538#endif
539// HDI_CORE_AIP_MODE
540
541#endif
542// __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:30
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.
Encapsulates live effect functionality from the Illustrator SDK.
Definition hdicoreLiveEffect.h:24
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:318
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:278
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.