Hot Door CORE  0.7.1
Adobe® Illustrator® Plug-in Library
hdicoreArtStyle.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_ART_STYLE__
8 #define __HDI_CORE_ART_STYLE__
9 
10 #include "hdicoreArtboardPoint.h"
11 #include "hdicoreLiveEffect.h"
12 #include "hdicorePathStyle.h"
13 #include "hdicoreTypes.h"
14 
15 namespace hdi
16 {
17  namespace plugin
18  {
19  class ArtStyle;
20  }
21 
22  namespace core
23  {
27  class ArtStyle
28  {
29  public:
30  class BlendField;
31  class Effect;
32  class PaintField;
33 
37  struct PaintData
38  {
44 
49 
54 
60 
65 
70 
76  PaintData();
77 
85  PaintData(const PaintData& pd_);
86 
92  virtual ~PaintData();
93 
103  PaintData& operator=(const PaintData& rhs_);
104  };
105 
106  typedef std::auto_ptr<PaintData> PaintDataAP;
107 
112  {
113  public:
125  BlendField();
126 
134  BlendField(const BlendField& bf_);
135 
141  virtual ~BlendField();
142 
152  BlendField& operator=(const BlendField& rhs_);
153 
162  bool isEmpty() const;
163 
172  bool isDefault() const;
173 
180  void setDefault();
181 
189  bool visible() const;
190 
199  void setVisible(const bool visible_);
200 
208  BlendMode mode() const;
209 
217  void setMode(const BlendMode mode_);
218 
227  double opacity() const;
228 
236  void setOpacity(const double o_);
237 
245  bool isolated() const;
246 
254  void setIsolated(const bool iso_);
255 
263  BlendKnockout knockout() const;
264 
272  void setKnockout(const BlendKnockout ko_);
273 
281  bool alphaIsShape() const;
282 
290  void setAlphaIsShape(const bool alpha_);
291 
292 
293  private:
294  friend class ArtStyle;
295  friend class PaintField;
296 
300  void* __data;
301  };
302 
303  typedef std::auto_ptr<BlendField> BlendFieldAP;
304 
313  class Effect
314  {
315  public:
327  Effect();
328 
336  Effect(const Effect& e_);
337 
343  virtual ~Effect();
344 
354  Effect& operator=(const Effect& rhs_);
355 
363  bool isEmpty() const;
364 
372  bool visible() const;
373 
381  void setVisible(const bool visible_);
382 
390  std::auto_ptr<LiveEffect> liveEffect() const;
391 
399  void setLiveEffect(const LiveEffect& le_);
400 
408  std::auto_ptr<LiveEffect::Parameters> parameters() const;
409 
417  void setParameters(const LiveEffect::Parameters& p_);
418 
419 
420  private:
421  friend class ArtStyle;
422  friend class PaintField;
423 
427  void* __data;
428  };
429 
430  typedef std::auto_ptr<Effect> EffectAP;
431 
437  {
438  public:
450  PaintField();
451 
459  PaintField(const PaintField& pf_);
460 
466  virtual ~PaintField();
467 
477  PaintField& operator=(const PaintField& rhs_);
478 
487  bool isEmpty() const;
488 
497  bool visible() const;
498 
508  void setVisible(const bool visible_);
509 
517  bool isFill() const;
518 
528  bool fill(FillStyle& fs__, PaintData& pd__);
529 
538  void setFill(const FillStyle& fs_, const PaintData& pd_);
539 
547  bool isStroke() const;
548 
558  bool stroke(StrokeStyle& ss__, PaintData& pd__);
559 
568  void setStroke(const StrokeStyle& ss_, const PaintData& pd_);
569 
578  int32_t colorPosition() const;
579 
588  void setColorPosition(const int32_t pos_);
589 
597  bool evenOdd() const;
598 
606  void setEvenOdd(const bool eo_);
607 
615  int32_t effectCount() const;
616 
625  std::auto_ptr<Effect> effectAtIndex(const int32_t index_) const;
626 
643  bool liveEffectInfo(LiveEffect& le__, LiveEffect::Parameters& p__);
644 
654  void setLiveEffectInfo(const LiveEffect& le_, const LiveEffect::Parameters& p_);
655 
663  std::auto_ptr<BlendField> blend() const;
664 
665 
666  private:
667  friend class ArtStyle;
668 
672  void* __data;
673  };
674 
675  typedef std::auto_ptr<PaintField> PaintFieldAP;
676 
680  enum Type
681  {
682  UnknownType = 0,
683  SimpleType = 10, // Has only one fill and one stroke
684  ActiveType = 20 // Can have multiple fills and strokes
685  };
686 
691  {
692  NoAttributes = 0,
693  HasFillAttribute = 1 << 0,
694  HasStrokeAttribute = 1 << 1,
695  PatternsAttribute = 1 << 2,
696  CustomColorsAttribute = 1 << 3,
697  FillGradientsAttribute = 1 << 4,
698  FillRadialGradientsAttribute = 1 << 5,
699  StrokeGradientsAttribute = 1 << 6,
700  StrokeRadialGradientsAttribute = 1 << 7,
701  TransparencyAttribute = 1 << 8,
702  BrushesAttribute = 1 << 9,
703  EffectsAttribute = 1 << 10,
704  ScalableEffectsAttribute = 1 << 11
705  };
706 
716  ArtStyle();
717 
725  ArtStyle(const ArtStyle& a_);
726 
734  ArtStyle(const AIArtStyleHandle aiArtStyle_);
735 
741  virtual ~ArtStyle();
742 
751  virtual ArtStyle& operator=(const ArtStyle& rhs_);
752 
761  virtual bool operator==(const ArtStyle& rhs_) const;
762 
771  virtual bool operator!=(const ArtStyle& rhs_) const;
772 
784  virtual AIArtStyleHandle aiArtStyleHandle() const;
785 
793  virtual bool valid();
794 
802  virtual std::string name() const;
803 
811  virtual void setName(const std::string& name_);
812 
820  virtual bool isAnonymous() const;
821 
829  virtual Type styleType() const;
830 
838  virtual Attributes attributes() const;
839 
850  virtual bool visible() const;
851 
859  virtual bool hasFillOrStroke() const;
860 
868  virtual bool hasEffects() const;
869 
877  virtual bool hasTransparency() const;
878 
886  virtual int32_t paintFieldCount() const;
887 
896  virtual std::auto_ptr<PaintField> paintFieldAtIndex(const int32_t index_) const;
897 
909  virtual std::auto_ptr<PaintField> focusFill() const;
910 
922  virtual std::auto_ptr<PaintField> focusStroke() const;
923 
931  virtual int32_t preEffectCount() const;
932 
941  virtual std::auto_ptr<Effect> preEffectAtIndex(const int32_t index_) const;
942 
950  virtual int32_t postEffectCount() const;
951 
960  virtual std::auto_ptr<Effect> postEffectAtIndex(const int32_t index_) const;
961 
969  virtual std::auto_ptr<BlendField> blendField() const;
970 
971 
972  private:
973  friend plugin::ArtStyle* __accessImpl(const ArtStyle&);
974  friend ArtStyle __accessCtor(plugin::ArtStyle*&);
975 
979  void* __data;
980 
986  void* __impl() const;
987 
993  ArtStyle(plugin::ArtStyle*&);
994  };
995 
996  typedef std::auto_ptr<ArtStyle> ArtStyleAP;
997 
998  extern plugin::ArtStyle* __accessImpl(const ArtStyle&);
999  extern ArtStyle __accessCtor(plugin::ArtStyle*&);
1000  }
1001 }
1002 
1006 );
1007 
1011 );
1012 
1013 #endif
1014 // __HDI_CORE_ART_STYLE__
BlendKnockout
Describes the blending knockout of art.
Definition: hdicoreTypes.h:287
double fillGradientAspectRatio
The fill gradient aspect ratio, for radial gradients.
Definition: hdicoreArtStyle.h:53
Describes the parameters of an Illustrator live effect.
Definition: hdicoreLiveEffect.h:24
Describes blending info for an art style or paint field of an art style.
Definition: hdicoreArtStyle.h:111
double fillRelativeGradientLength
The fill gradient length, in points.
Definition: hdicoreArtStyle.h:48
ArtboardPoint strokeRelativeGradientOrigin
The stroke gradient origin, relative to the bounding box of the object to which the style would be ap...
Definition: hdicoreArtStyle.h:59
Header file for Illustrator live effect manipulation.
Definition: hdicoreLiveEffect.h:18
Describes the stroke styling of a path.
Definition: hdicorePathStyle.h:249
Attributes
Indicates the various attributes of an art style.
Definition: hdicoreArtStyle.h:690
double strokeRelativeGradientLength
The stroke gradient length, in points.
Definition: hdicoreArtStyle.h:64
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
Header file for path style-related classes.
Header file for geometric point manipulation on the Illustrator artboard.
Corresponds to either a fill or a stroke in an art style. Each paint field can also contain live effe...
Definition: hdicoreArtStyle.h:436
BlendMode
Describes the blending mode of art (used for compositing art objects)
Definition: hdicoreTypes.h:263
Describes an art style.
Definition: hdicoreArtStyle.h:27
Definition: hdicoreaiArray.h:12
ArtboardPoint fillRelativeGradientOrigin
The fill gradient origin, relative to the bounding box of the object to which the style would be appl...
Definition: hdicoreArtStyle.h:43
Effects are contained by art styles and are used to replace typical fill/stroke drawing.
Definition: hdicoreArtStyle.h:313
Stores art style gradient information.
Definition: hdicoreArtStyle.h:37
Describes a point on the Illustrator artboard.
Definition: hdicoreArtboardPoint.h:28
Type
Indicates the type of an art style.
Definition: hdicoreArtStyle.h:680
Describes the fill styling of a path.
Definition: hdicorePathStyle.h:140
double strokeGradientAspectRatio
The stroke gradient aspect ratio, for radial gradients.
Definition: hdicoreArtStyle.h:69