7#ifndef __HDI_CORE_ART__
8#define __HDI_CORE_ART__
10#if defined(HDI_CORE_AIP_MODE)
53 typedef std::vector< std::shared_ptr<Artboard> > ArtboardVector;
54 typedef std::vector< std::shared_ptr<Art> > ArtVector;
55 typedef std::vector<MatchArtSpec> MatchArtSpecVector;
63 VisibleBounds = 1 << 0,
67 ControlBounds = 1 << 1,
71 NoStrokeBounds = 1 << 2,
75 NoExtendedBounds = 1 << 3,
80 StrokeDependsOnPref = 1 << 4,
83 ExcludeHiddenObjectBounds = 1 << 5,
86 ExcludeUnpaintedObjectBounds = 1 << 6,
89 ExcludeGuideBounds = 1 << 7
97 ExpandPluginArt = 1 << 0,
99 ExpandStroke = 1 << 2,
100 ExpandPattern = 1 << 3,
101 ExpandGradientToMesh = 1 << 4,
102 ExpandGradientToPaths = 1 << 5,
103 ExpandSymbolInstances = 1 << 6,
104 ExpandOneAtATime = 1 << 7,
105 ExpandShowProgressBar = 1 << 8,
106 ExpandLockedObjects = 1 << 9
115 TransformOptionNone = 0,
118 TransformOptionObjects = 1 << 0,
121 TransformOptionFillGradients = 1 << 1,
124 TransformOptionFillPatterns = 1 << 2,
127 TransformOptionStrokeGradients = 1 << 3,
130 TransformOptionStrokePatterns = 1 << 4,
133 TransformOptionLinkedMasks = 1 << 5,
136 TransformOptionChildren = 1 << 6,
139 TransformOptionSelectedSegsOnly = 1 << 7
265 std::unique_ptr<Art>
art()
const;
295 typedef std::unique_ptr<Iterator> IteratorUP;
296 typedef std::shared_ptr<Iterator> IteratorSP;
297 typedef std::weak_ptr<Iterator> IteratorWP;
327 Art(
const AIArtHandle aiArt_);
336 Art(
const AISafeArtHandle aiArt_);
345 Art(
const std::string& uuid_);
377 const Art*
const prep_ = NULL
464 virtual std::string
uuid()
const;
521 virtual std::unique_ptr<UID>
uid()
const;
907 virtual double x()
const;
916 virtual double y()
const;
986 virtual std::unique_ptr<Artboard>
artboard()
const;
1005 virtual std::unique_ptr<Layer>
layer()
const;
1071 virtual std::unique_ptr<Symbol>
symbol()
const;
1162 virtual std::unique_ptr<ArtStyle>
style()
const;
1335 virtual void scale(
const double scaler_,
const bool deep_ =
false);
1368 virtual void scale(
const double xScaler_,
const double yScaler_,
const bool deep_ =
false);
1381 const double xScaler_,
1382 const double yScaler_,
1384 const bool deep_ =
false
1398 const double xScaler_,
1399 const double yScaler_,
1401 const bool deep_ =
false
1413 virtual void offset(
const double x_,
const double y_,
const bool deep_ =
false);
1428 const bool deep_ =
false
1443 const bool deep_ =
false
1545 friend aip::Art* __accessImpl(
const Art&);
1546 friend Art __accessCtor(aip::Art*&);
1558 void* __impl()
const;
1568 typedef std::unique_ptr<Art> ArtUP;
1569 typedef std::shared_ptr<Art> ArtSP;
1570 typedef std::weak_ptr<Art> ArtWP;
1572 extern aip::Art* __accessImpl(
const Art&);
1573 extern Art __accessCtor(aip::Art*&);
Describes an angle, and allows for easy conversion between various units.
Definition: hdicoreAngle.h:26
Allows for iteration through the siblings of a piece of source art, a la std::vector iteration.
Definition: hdicoreArt.h:162
Iterator & operator=(const Iterator &rhs_)
Assigns one Iterator object to another.
bool operator!=(const Iterator &rhs_) const
Tests whether a given Iterator object is not the same as another.
std::unique_ptr< Art > art() const
Gets the current art pointed to by the iterator.
Iterator operator++(int)
Postfix increment operator for forward iteration.
bool operator==(const Iterator &rhs_) const
Tests whether a given Iterator object is the same as another.
~Iterator()
Destructs an Iterator object.
Iterator & operator--()
Prefix decrement operator for reverse iteration.
Iterator(const Iterator &iter_)
Constructs an Iterator object from an existing Iterator object (copy constructor)
Iterator & operator++()
Prefix increment operator for forward iteration.
bool atEnd() const
Determines whether iteration should stop; works well as the conditional in a for() loop.
Iterator operator--(int)
Postfix decrement operator for reverse iteration.
Handles general art-related functionality.
Definition: hdicoreArt.h:51
virtual ArtboardRect strokeBounds() const
Gets the bounds rect for the target art, including the stroke.
Art()
Constructs an empty Art object.
BoundsOptions
Allows for querying various attributes of some art's bounds.
Definition: hdicoreArt.h:61
virtual bool canIsolate() const
Gets whether the art, or one of its parents, can be isolated.
virtual std::unique_ptr< ai::Dictionary > dictionary() const
Gets the built-in art data dictionary object for the target art.
virtual bool valid() const
Tests the validity of the target piece of art by searching for it in the document.
virtual bool editable() const
Gets whether the art is editable.
virtual MeshArt *const mesh() const
Gets a MeshArt object for this Art object.
virtual bool selected() const
Gets whether the art is selected.
virtual bool isIsolated() const
Gets whether the art, or one of its parents, is currently isolated.
virtual BlendMode blendMode() const
Retrieves the current blending mode of an art object, which applies to the object as a whole.
Art(const AISafeArtHandle aiArt_)
Constructs a new Art object from an AISafeArtHandle.
virtual double width() const
Gets the width of the bounds of the art.
virtual void transformWithOptions(const TransformMatrix &matrix_, const TransformOptions options_)
Performs an arbitrary transformation on the target art with the given options.
virtual bool isStyled() const
Gets whether the target art is part of the styled art of another art object.
virtual void scale(const double scaler_, const ArtboardPoint &origin_, const bool deep_=false)
Scales the art by a given scaler from a given pin point.
virtual ArtType artType() const
Gets the type of the art.
virtual std::unique_ptr< Layer > layer() const
Gets the parent layer for the target art.
virtual std::unique_ptr< Art > lastChild() const
Gets the last child art object for the target art.
virtual bool anyAncestorSelected() const
Gets whether any ancestor of the art is selected.
virtual std::unique_ptr< Artboard > artboard() const
Gets the "most overlapping" artboard for the target art.
Iterator begin() const
Gets an iterator for the art in the target's parent group, starting with the target.
Art(const AIArtHandle aiArt_)
Constructs a new Art object from an AIArtHandle.
Art(const Art &art_)
Constructs a new Art object from an existing Art object (copy constructor)
virtual void scale(const double xScaler_, const double yScaler_, const bool deep_=false)
Scales the art by givens scaler from its center point.
virtual void setAttribute(const ArtAttribute attr_, const bool enable_)
Sets an art attribute for the target art (e.g. hidden, locked, etc.)
virtual bool disposeChildren()
Removes all the children art from the parent group or compound path.
virtual void transformStrokes(const double scaler_, const bool children_)
Performs a transformation of the size of strokes on the target art.
virtual void setBlendMode(const BlendMode mode_)
Sets the current blending mode of an art object, which applies to the object as a whole.
virtual std::unique_ptr< Art > parent() const
Gets the parent art object for the target art.
virtual PlacedArt *const placed() const
Gets a PlacedArt object for this Art object.
virtual void deselect()
Sets the art object and all its children (in the case of a container) to be deselected.
virtual bool isClipGroup() const
Gets whether the target art object is a group that has clip mask children.
virtual Art & operator=(const Art &rhs_)
Assigns one Art object to another.
virtual void reorder(const PaintOrder order_, const Art *const prep_=NULL)
Reorders the target art in Illustrator's drawing order.
virtual bool dispose()
Removes the art from the artboard.
virtual double area() const
Gets the area of the art.
virtual void setAllAttributes(const ArtAttribute attrs_)
Sets a bitwise OR'd enum value for all art attributes.
virtual uint32_t childCount() const
Gets the count of the children for the target art.
virtual AISafeArtHandle aiSafeArtHandle() const
Gets the "safe" art handle around which the target object is wrapped.
virtual bool locked() const
Gets whether the art is locked.
virtual bool fullySelected() const
Gets whether the art is fully selected.
virtual bool hidden() const
Gets whether the art is hidden.
virtual double x() const
Gets the top-left x-value of the art.
virtual TextArt *const text() const
Gets a TextArt object for this Art object.
virtual double y() const
Gets the top-left y-value of the art.
virtual bool isolate(const bool hideOtherArt_)
Isolates the art or one of its parents.
virtual void scale(const double scaler_, const bool deep_=false)
Scales the art by a given scaler from its center point.
virtual void offset(const double x_, const double y_, const bool deep_=false)
Offsets (moves) the art by given x-axis and y-axis values.
virtual std::unique_ptr< Art > sibling() const
Gets the next sibling art object for the target art.
virtual MaskArt *const mask() const
Gets a MaskArt object for this Art object.
virtual void setLocked(const bool lock_)
Sets whether the art is locked.
virtual std::unique_ptr< ArtStyle > style() const
Gets the art's style.
virtual void scale(const double xScaler_, const double yScaler_, const ArtboardPoint &origin_, const bool deep_=false)
Scales the art by given scalers from a given pin point.
virtual double opacity() const
Retrieves the current opacity value applied to an art object.
virtual void markClean()
Marks an Art object that previously would have been redrawn as NOT needing redrawing.
virtual void markDirty()
Marks an Art object for redrawing by incrementing its internal modification time stamp.
virtual void move(const ArtboardPoint &newOrigin_, const ArtboardPoint &origin_, const bool deep_=false)
Moves the art to a given point, placing its pin point at another arbitrary point (pinPt_ arg)
virtual void setHidden(const bool hidden_)
Sets whether the art is hidden.
virtual bool isEmpty() const
Gets whether the target Art object is empty (constructed with the default ctor)
virtual bool anyAncestorLocked() const
Gets whether any ancestor of the art is locked.
virtual void setOpacity(const double o_)
Sets the current opacity value applied to an art object.
virtual std::string uuid() const
Accessor for the UUID string for the Art object.
virtual void setSelected(const bool select_)
Sets whether the art is selected.
virtual ArtVector matchingChildren(const MatchArtSpecVector &specs_) const
Gets a vector of art in the art tree, rooted at the target, whose specs match those given.
virtual ArtboardVector allArtboards() const
Gets all the artboards that "touch" the target art.
ExpandOptions
Controls how art should be expanded by the expand() method.
Definition: hdicoreArt.h:96
virtual std::unique_ptr< Art > firstChild() const
Gets the first child art object for the target art.
virtual std::unique_ptr< Art > priorSibling() const
Gets the previous sibling art object for the target art.
virtual CustomArt *const customArt() const
Gets a CustomArt object for this Art object.
virtual bool hasFill() const
Gets whether the target art object has a fill.
virtual double perimeter() const
Gets the perimeter of the art.
virtual void setEditable(const bool editable_)
Sets whether the art is editable.
virtual void rotate(const Angle &angle_, const ArtboardPoint &origin_, const bool deep_=false)
Rotates the target art by a given angle around a given pin point.
virtual void setIsClipGroup(const bool clip_)
Sets whether the target art object is a group that has clip mask children.
virtual bool hasStroke() const
Gets whether the target art object has a stroke.
virtual void setKnockout(const BlendKnockout ko_)
Sets the current knockout state of an art object.
virtual bool operator!=(const Art &rhs_) const
Tests whether a given Art object is not the same as another.
virtual double height() const
Gets the height of the bounds of the art.
virtual void select()
Sets the art object and all its children (in the case of a container) to be selected.
Art(const ArtboardPoint &anchor_, const TextOrientation dir_, const PaintOrder order_, const Art *const prep_=NULL)
Constructs a new Art object for a newly created piece of Illustrator text art (type of ArtTypeText)
virtual void rotate(const Angle &angle_, const BoundsPinPointType pinPt_, const bool deep_=false)
Rotates the target art by a given angle around a given pre-defined pin point.
virtual bool operator==(const Art &rhs_) const
Tests whether a given Art object is the same as another.
virtual ArtboardRect noStrokeBounds() const
Gets the bounds rect for the target art, excluding the stroke.
virtual void updateBounds()
Updates the bounds rect for the target art by updating Illustrator caches (regarding bounding boxes)
virtual ArtboardRect bounds(const BoundsOptions opts_) const
Gets the bounds rect for the target art.
virtual AIArtHandle aiArtHandle() const
Gets the art handle around which the target object is wrapped.
virtual void transform(const TransformMatrix &matrix_, const bool deep_=false)
Performs an arbitrary transformation on the target art.
virtual std::unique_ptr< Art > styledArt() const
If the art has a style, this acquires its styled representation.
virtual bool centerPointVisible() const
Gets whether the center point is visible for the target art.
virtual std::unique_ptr< Art > duplicate(const PaintOrder order_, const Art *const prep_=NULL) const
Duplicates the target piece of art on the artboard.
virtual void move(const ArtboardPoint &newOrigin_, const BoundsPinPointType pinPt_, const bool deep_=false)
Moves the art to a given point, placing its pin point (pinPt_ arg) at a particular pre- defined point...
virtual bool isDimension() const
Gets whether the target art object is a piece of dimension art.
virtual bool isLayerGroup() const
Gets whether the target art object is a group that corresponds to a layer or sublayer.
virtual void setStyle(const ArtStyle &style_)
Sets the art's style.
virtual void setCenterPointVisible(const bool visible_)
Sets whether the center point is visible for the target art.
virtual void scale(const double scaler_, const BoundsPinPointType pinPt_, const bool deep_=false)
Scales the art by a given scaler from a preset pin point.
virtual PathArt *const path() const
Gets a PathArt object for this Art object.
virtual bool anyAncestorHidden() const
Gets whether any ancestor of the art is hidden.
virtual BlendKnockout inheritedKnockout() const
Retrieves the inherited knockout state (on or off) of an art object.
virtual void flattenStyledArt()
If the art has a style, this flattens the styled representation and replaces the source art with said...
virtual bool updateLinks(const bool force_=false)
Checks whether any linked objects (linked images or placed objects) contained in the subtree of a giv...
virtual std::unique_ptr< Symbol > symbol() const
Gets the original symbol definition for an instance of a symbol.
Art(const ArtType type_, const PaintOrder order_, const Art *const prep_=NULL)
Constructs a new Art object for a newly created piece of Illustrator art.
virtual ~Art()
Art object destructor.
virtual BlendKnockout knockout() const
Retrieves the current knockout state of an art object.
TransformOptions
Controls how art should be transformed by the transform() method.
Definition: hdicoreArt.h:113
Art(const std::string &uuid_)
Constructs a new Art object from a UUID string.
virtual std::unique_ptr< UID > uid() const
Gets the UID for the target art.
virtual void expand(const ExpandOptions opts_, const uint32_t steps_)
Expands the target art object.
virtual bool setSymbol(const Symbol &sym_)
Sets the original symbol definition object for an instance of a symbol.
virtual void rotate(const Angle &angle_, const bool deep_=false)
Rotates the target art by a given angle around its center point.
virtual bool attribute(const ArtAttribute attr_) const
Gets whether a specific art attribute is true.
virtual RasterArt *const raster() const
Gets a RasterArt object for this Art object.
virtual ArtAttribute allAttributes() const
Gets a bitwise OR'd enum value of all currently set art attributes.
virtual ArtboardRect transformBounds(const TransformMatrix &transform_, const BoundsOptions opts_) const
Gets the bounds that would be the result of a transform.
virtual void scale(const double xScaler_, const double yScaler_, const BoundsPinPointType pinPt_, const bool deep_=false)
Scales the art by given scalers from a preset pin point.
Describes an art style.
Definition: hdicoreArtStyle.h:30
Describes a point on the Illustrator artboard.
Definition: hdicoreArtboardPoint.h:31
Describes a rectangular area on the Illustrator artboard.
Definition: hdicoreArtboardRect.h:28
Allows for custom art "group", user-editable art, and user-viewable "result" art manipulation.
Definition: hdicoreCustomArt.h:24
Allows for mask manipulation, metadata access, etc.
Definition: hdicoreMaskArt.h:24
Allows for mesh manipulation, metadata access, etc.
Definition: hdicoreMeshArt.h:24
Allows for path manipulation, metadata access, trimming, extending, etc.
Definition: hdicorePathArt.h:31
Allows for placed art manipulation, metadata access, etc.
Definition: hdicorePlacedArt.h:25
Allows for raster art manipulation, metadata access, etc.
Definition: hdicoreRasterArt.h:25
Handles general symbol-related functionality.
Definition: hdicoreSymbol.h:27
Allows for text frame manipulation, selection, metadata access, etc.
Definition: hdicoreTextArt.h:29
Header file for geometric rectangle manipulation on the Illustrator artboard.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
BoundsPinPointType
These allow for simpler art transformation/bounds metadata access.
Definition: hdicoreTypes.h:794
ArtType
Indicates a type of art (when querying an art object for its type)
Definition: hdicoreTypes.h:165
PaintOrder
Indicates the position of art or layers when during creation or reordering.
Definition: hdicoreTypes.h:316
BlendMode
Describes the blending mode of art (used for compositing art objects)
Definition: hdicoreTypes.h:750
BlendKnockout
Describes the blending knockout of art.
Definition: hdicoreTypes.h:329
ArtAttribute
Indicates a queryable attribute of an art object.
Definition: hdicoreTypes.h:204
TextOrientation
Indicates the orientation of some text.
Definition: hdicoreTypes.h:392