Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
Classes | Public Types | Public Member Functions | Friends | List of all members
hdi::core::Art Class Reference

Handles general art-related functionality. More...

#include <hdicoreArt.h>

Classes

class  Iterator
 Allows for iteration through the siblings of a piece of source art, a la std::vector iteration. More...
 

Public Types

enum  BoundsOptions {
  VisibleBounds = 1 << 0, ControlBounds = 1 << 1, NoStrokeBounds = 1 << 2, NoExtendedBounds = 1 << 3,
  StrokeDependsOnPref = 1 << 4, ExcludeHiddenObjectBounds = 1 << 5, ExcludeUnpaintedObjectBounds = 1 << 6, ExcludeGuideBounds = 1 << 7
}
 Allows for querying various attributes of some art's bounds.
 
enum  ExpandOptions {
  ExpandPluginArt = 1 << 0, ExpandText = 1 << 1, ExpandStroke = 1 << 2, ExpandPattern = 1 << 3,
  ExpandGradientToMesh = 1 << 4, ExpandGradientToPaths = 1 << 5, ExpandSymbolInstances = 1 << 6, ExpandOneAtATime = 1 << 7,
  ExpandShowProgressBar = 1 << 8, ExpandLockedObjects = 1 << 9
}
 Controls how art should be expanded by the expand() method.
 
enum  TransformOptions {
  TransformOptionNone = 0, TransformOptionObjects = 1 << 0, TransformOptionFillGradients = 1 << 1, TransformOptionFillPatterns = 1 << 2,
  TransformOptionStrokePatterns = 1 << 3, TransformOptionLinkedMasks = 1 << 5, TransformOptionChildren = 1 << 6, TransformOptionSelectedSegsOnly = 1 << 7
}
 Controls how art should be transformed by the transform() method.
 
typedef std::vector< Artboard * > ArtboardVector
 
typedef std::vector< Art * > ArtVector
 
typedef std::vector< MatchArtSpecMatchArtSpecVector
 
typedef std::auto_ptr< IteratorIteratorAP
 

Public Member Functions

 Art ()
 Constructs an empty Art object. More...
 
 Art (const Art &art_)
 Constructs a new Art object from an existing Art object (copy constructor) More...
 
 Art (const AIArtHandle aiArt_)
 Constructs a new Art object from an AIArtHandle. More...
 
 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. More...
 
 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) More...
 
virtual ~Art ()
 Art object destructor. More...
 
virtual Artoperator= (const Art &rhs_)
 Assigns one Art object to another. More...
 
virtual bool dispose ()
 Removes the art from the artboard. More...
 
virtual std::auto_ptr< Artduplicate (const PaintOrder order_, const Art *const prep_=NULL) const
 Duplicates the target piece of art on the artboard. More...
 
virtual AIArtHandle aiArtHandle () const
 Gets the art handle around which the target object is wrapped. More...
 
virtual bool isEmpty () const
 Gets whether the target Art object is empty (constructed with the default ctor) More...
 
virtual bool valid () const
 Tests the validity of the target piece of art by searching for it in the document. More...
 
virtual bool operator== (const Art &rhs_) const
 Tests whether a given Art object is the same as another. More...
 
virtual bool operator!= (const Art &rhs_) const
 Tests whether a given Art object is not the same as another. More...
 
virtual ArtType artType () const
 Gets the type of the art. More...
 
virtual std::auto_ptr< UIDuid () const
 Gets the UID for the target art. More...
 
virtual MaskArt *const mask () const
 Gets a MaskArt object for this Art object. More...
 
virtual MeshArt *const mesh () const
 Gets a MeshArt object for this Art object. More...
 
virtual PathArt *const path () const
 Gets a PathArt object for this Art object. More...
 
virtual PlacedArt *const placed () const
 Gets a PlacedArt object for this Art object. More...
 
virtual RasterArt *const raster () const
 Gets a RasterArt object for this Art object. More...
 
virtual TextArt *const text () const
 Gets a TextArt object for this Art object. More...
 
virtual void markDirty ()
 Marks an Art object for redrawing by incrementing its internal modification time stamp. More...
 
virtual void select ()
 Sets the art object and all its children (in the case of a container) to be selected. More...
 
virtual void deselect ()
 Sets the art object and all its children (in the case of a container) to be deselected. More...
 
virtual bool selected () const
 Gets whether the art is selected. More...
 
virtual bool fullySelected () const
 Gets whether the art is fully selected. More...
 
virtual void setSelected (const bool select_)
 Sets whether the art is selected. More...
 
virtual bool editable () const
 Gets whether the art is editable. More...
 
virtual void setEditable (const bool editable_)
 Sets whether the art is editable. More...
 
virtual bool locked () const
 Gets whether the art is locked. More...
 
virtual void setLocked (const bool lock_)
 Sets whether the art is locked. More...
 
virtual bool hidden () const
 Gets whether the art is hidden. More...
 
virtual void setHidden (const bool hidden_)
 Sets whether the art is hidden. More...
 
virtual bool anyAncestorSelected () const
 Gets whether any ancestor of the art is selected. More...
 
virtual bool anyAncestorLocked () const
 Gets whether any ancestor of the art is locked. More...
 
virtual bool anyAncestorHidden () const
 Gets whether any ancestor of the art is hidden. More...
 
virtual ArtAttribute allAttributes () const
 Gets a bitwise OR'd enum value of all currently set art attributes. More...
 
virtual void setAllAttributes (const ArtAttribute attrs_)
 Sets a bitwise OR'd enum value for all art attributes. More...
 
virtual bool attribute (const ArtAttribute attr_) const
 Gets whether a specific art attribute is true. More...
 
virtual void setAttribute (const ArtAttribute attr_, const bool enable_)
 Sets an art attribute for the target art (e.g. hidden, locked, etc.) More...
 
virtual std::auto_ptr< ai::Dictionarydictionary () const
 Gets the built-in art data dictionary object for the target art. More...
 
virtual ArtboardRect strokeBounds () const
 Gets the bounds rect for the target art, including the stroke. More...
 
virtual ArtboardRect noStrokeBounds () const
 Gets the bounds rect for the target art, excluding the stroke. More...
 
virtual ArtboardRect bounds (const BoundsOptions opts_) const
 Gets the bounds rect for the target art. More...
 
virtual void updateBounds ()
 Updates the bounds rect for the target art by updating Illustrator caches (regarding bounding boxes) More...
 
virtual ArtboardRect transformBounds (const TransformMatrix &transform_, const BoundsOptions opts_) const
 Gets the bounds that would be the result of a transform. More...
 
virtual bool updateLinks (const bool force_=false)
 Checks whether any linked objects (linked images or placed objects) contained in the subtree of a given container need updating, and updates them if needed. More...
 
virtual double x () const
 Gets the top-left x-value of the art. More...
 
virtual double y () const
 Gets the top-left y-value of the art. More...
 
virtual double width () const
 Gets the width of the bounds of the art. More...
 
virtual double height () const
 Gets the height of the bounds of the art. More...
 
virtual double perimeter () const
 Gets the perimeter of the art. More...
 
virtual double area () const
 Gets the area of the art. More...
 
virtual bool centerPointVisible () const
 Gets whether the center point is visible for the target art. More...
 
virtual void setCenterPointVisible (const bool visible_)
 Sets whether the center point is visible for the target art. More...
 
virtual std::auto_ptr< Artboardartboard () const
 Gets the "most overlapping" artboard for the target art. More...
 
virtual ArtboardVector allArtboards () const
 Gets all the artboards that "touch" the target art. More...
 
virtual std::auto_ptr< Layerlayer () const
 Gets the parent layer for the target art. More...
 
virtual uint32_t childCount () const
 Gets the count of the children for the target art. More...
 
virtual std::auto_ptr< Artparent () const
 Gets the parent art object for the target art. More...
 
virtual std::auto_ptr< ArtfirstChild () const
 Gets the first child art object for the target art. More...
 
virtual std::auto_ptr< ArtlastChild () const
 Gets the last child art object for the target art. More...
 
virtual std::auto_ptr< Artsibling () const
 Gets the next sibling art object for the target art. More...
 
virtual std::auto_ptr< ArtpriorSibling () const
 Gets the previous sibling art object for the target art. More...
 
virtual std::auto_ptr< ArtpluginEditArt () const
 Gets the editable art object for the target plugin art. More...
 
virtual std::auto_ptr< Symbolsymbol () const
 Gets the original symbol definition for an instance of a symbol. More...
 
virtual bool setSymbol (const Symbol &sym_)
 Sets the original symbol definition object for an instance of a symbol. More...
 
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. More...
 
virtual bool hasFill () const
 Gets whether the target art object has a fill. More...
 
virtual bool hasStroke () const
 Gets whether the target art object has a stroke. More...
 
virtual bool isLayerGroup () const
 Gets whether the target art object is a group that corresponds to a layer or sublayer. More...
 
virtual bool isClipGroup () const
 Gets whether the target art object is a group that has clip mask children. More...
 
virtual std::auto_ptr< ArtStylestyle () const
 Gets the art's style. More...
 
virtual void setStyle (const ArtStyle &style_)
 Sets the art's style. More...
 
virtual bool isStyled () const
 Gets whether the target art is part of the styled art of another art object. More...
 
virtual BlendMode blendMode () const
 Retrieves the current blending mode of an art object, which applies to the object as a whole. More...
 
virtual void setBlendMode (const BlendMode mode_)
 Sets the current blending mode of an art object, which applies to the object as a whole. More...
 
virtual double opacity () const
 Retrieves the current opacity value applied to an art object. More...
 
virtual void setOpacity (const double o_)
 Sets the current opacity value applied to an art object. More...
 
virtual BlendKnockout knockout () const
 Retrieves the current knockout state of an art object. More...
 
virtual BlendKnockout inheritedKnockout () const
 Retrieves the inherited knockout state (on or off) of an art object. More...
 
virtual void setKnockout (const BlendKnockout ko_)
 Sets the current knockout state of an art object. More...
 
virtual void reorder (const PaintOrder order_, const Art *const prep_=NULL)
 Reorders the target art in Illustrator's drawing order. More...
 
virtual void expand (const ExpandOptions opts_, const uint32_t steps_)
 Expands the target art object. More...
 
virtual void rotate (const Angle &angle_, const bool deep_=false)
 Rotates the target art by a given angle around its center point. More...
 
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. More...
 
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. More...
 
virtual void scale (const double scaler_, const bool deep_=false)
 Scales the art by a given scaler from its center point. More...
 
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. More...
 
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. More...
 
virtual void scale (const double xScaler_, const double yScaler_, const bool deep_=false)
 Scales the art by givens scaler from its center point. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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) More...
 
virtual void transform (const TransformMatrix &matrix_, const bool deep_=false)
 Performs an arbitrary transformation on the target art. More...
 
virtual void transformWithOptions (const TransformMatrix &matrix_, const TransformOptions options_)
 Performs an arbitrary transformation on the target art with the given options. More...
 
virtual bool canIsolate () const
 Gets whether the art, or one of its parents, can be isolated. More...
 
virtual bool isIsolated () const
 Gets whether the art, or one of its parents, is currently isolated. More...
 
virtual bool isolate (const bool hideOtherArt_)
 Isolates the art or one of its parents. More...
 
Iterator begin () const
 Gets an iterator for the art in the target's parent group, starting with the target. More...
 

Friends

plugin::Art * __accessImpl (const Art &)
 
Art __accessCtor (plugin::Art *&)
 

Detailed Description

Handles general art-related functionality.

This class handles general art functionality (e.g. tranforms, metadata, duplication, reordering, siblings, etc.); more specific actions can be taken on specific art types (e.g. paths, text, etc.) by accessing the appropriate method in this class (e.g. path(), text(), etc.), but be sure to verify the type of the art first by calling artType()

Constructor & Destructor Documentation

hdi::core::Art::Art ( )

Constructs an empty Art object.

Author
GW
Date
08/2013
Note
To test if an Art object is empty, call isEmpty() on it
Empty Art objects do not relate to any art on the Illustrator artboard; they are designed to be "receivers" of some other Art object via the overloaded assignment operator. Empty Art objects are useless until such time (though it is safe to call any of their methods)
hdi::core::Art::Art ( const Art art_)

Constructs a new Art object from an existing Art object (copy constructor)

Author
GW
Date
08/2013
Parameters
art_Existing Art object
hdi::core::Art::Art ( const AIArtHandle  aiArt_)

Constructs a new Art object from an AIArtHandle.

Author
GW
Date
08/2015
Parameters
aiArt_Raw Illustrator AIArtHandle
hdi::core::Art::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.

Author
GW
Date
08/2013
Parameters
type_Type of art to create
order_Order in which to create the art
prep_Prepositional piece of art to which order_ will apply (or NULL if not needed)
Warning
This method does not assume responsibility of the memory for the prep_ argument.
hdi::core::Art::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)

Author
GW
Date
09/2014
Parameters
anchor_Start point of the baseline of the first character
dir_Text orientation direction
order_Order in which to create the art
prep_Prepositional piece of art to which order_ will apply (or NULL if not needed)
Warning
This method does not assume responsibility of the memory for the prep_ argument.
virtual hdi::core::Art::~Art ( )
virtual

Art object destructor.

Author
GW
Date
08/2013

Member Function Documentation

virtual AIArtHandle hdi::core::Art::aiArtHandle ( ) const
virtual

Gets the art handle around which the target object is wrapped.

Author
GW
Date
11/2013
Returns
AIArtHandle for this object
Note
Generally, you shouldn't need to call this method. Only use it if you know what you're doing. If a specific piece of functionality provided by Illustrator is not handled by this class (or related classes), then it should probably be added to the hdi_core library.
virtual ArtboardVector hdi::core::Art::allArtboards ( ) const
virtual

Gets all the artboards that "touch" the target art.

Author
GW
Date
08/2014
Returns
A vector of artboards whose bounds intersect the bounds of the target piece of art in any way
Warning
The caller assumes responsibility for the memory of the contained Artboard objects.
virtual ArtAttribute hdi::core::Art::allAttributes ( ) const
virtual

Gets a bitwise OR'd enum value of all currently set art attributes.

Author
GW
Date
12/2015
Returns
All art attributes that are currently true bitwise OR'd into a single enum value
virtual bool hdi::core::Art::anyAncestorHidden ( ) const
virtual

Gets whether any ancestor of the art is hidden.

Author
GW
Date
08/2013
Returns
true for art being hidden, false otherwise
virtual bool hdi::core::Art::anyAncestorLocked ( ) const
virtual

Gets whether any ancestor of the art is locked.

Author
GW
Date
08/2013
Returns
true for the art being locked (uneditable), false otherwise
virtual bool hdi::core::Art::anyAncestorSelected ( ) const
virtual

Gets whether any ancestor of the art is selected.

Author
GW
Date
08/2013
Returns
true for the art being selected, false otherwise
virtual double hdi::core::Art::area ( ) const
virtual

Gets the area of the art.

Author
GW
Date
08/2013
Returns
The area of the art, in square points, excluding the stroke
virtual std::auto_ptr<Artboard> hdi::core::Art::artboard ( ) const
virtual

Gets the "most overlapping" artboard for the target art.

Author
GW
Date
08/2014
Returns
The artboard that is most overlapped with the bounds of the target piece of art (if an artboard could be inferred and acquired)
Note
Since Illustrator artwork is not hierarchically contained within an artboard (such as with layers), this method merely infers the placement of a piece of art on a given artboard by searching for whichever artboard whose bounds most overlaps the bounds of the target piece of art. If you are interested in all the artboards that touch the target piece of art, call allArtboards() instead.
virtual ArtType hdi::core::Art::artType ( ) const
virtual

Gets the type of the art.

Author
GW
Date
08/2013
Returns
The type of the target art, or ArtTypeUnknown if the art is invalid
virtual bool hdi::core::Art::attribute ( const ArtAttribute  attr_) const
virtual

Gets whether a specific art attribute is true.

Author
GW
Date
08/2013
Parameters
attr_The attribute of interest
Returns
true if the provided attribute is enabled/true/set, false otherwise
Iterator hdi::core::Art::begin ( ) const

Gets an iterator for the art in the target's parent group, starting with the target.

Author
GW
Date
08/2013
Returns
An ArtIterator object, for iterating through the target's siblings
// Here's an example, iterating through all children of someArt:
someArt.firstChild(child0);
for(hdi::core::Art::Iterator iter = child0.begin(); !iter.atEnd(); ++iter)
{
// Do stuff with iter.art() ...
}
// Here's another example, reverse iterating through all children of someArt:
someArt.lastChild(childN);
for(hdi::core::Art::Iterator iter = childN.begin(); !iter.atEnd(); --iter)
{
// Do more stuff with iter.art() ...
}
virtual BlendMode hdi::core::Art::blendMode ( ) const
virtual

Retrieves the current blending mode of an art object, which applies to the object as a whole.

Author
GW
Date
08/2014
Returns
The blending mode enum value
virtual ArtboardRect hdi::core::Art::bounds ( const BoundsOptions  opts_) const
virtual

Gets the bounds rect for the target art.

Author
GW
Date
08/2013
Parameters
opts_A bitwise OR of the bounds in question; see BoundsOptions
Returns
A rect object describing the art's bounds, taking the provided options into account
virtual bool hdi::core::Art::canIsolate ( ) const
virtual

Gets whether the art, or one of its parents, can be isolated.

Author
GW
Date
08/2013
Returns
true if the art can be isolated, false otherwise
Note
Typically, Illustrator does not allow "leaf art" (e.g. paths) to be isolated; however, this method looks up the parent lineage to see if a parent can be isolated.
When isolating a piece of art, the isolate() method will look up the parent lineage and automatically isolate the first parent that can be isolated.
virtual bool hdi::core::Art::centerPointVisible ( ) const
virtual

Gets whether the center point is visible for the target art.

Author
GW
Date
08/2013
Returns
true for a visible center point, false otherwise
virtual uint32_t hdi::core::Art::childCount ( ) const
virtual

Gets the count of the children for the target art.

Author
GW
Date
08/2013
Returns
The count of children that the art contains, or 0 if it is not a container type
Note
Illustrator provides no way to directly access the child count, so they must be manually iterated through. As such, the complexity of this method is O(n).
virtual void hdi::core::Art::deselect ( )
virtual

Sets the art object and all its children (in the case of a container) to be deselected.

Author
GW
Date
08/2013
Note
Illustrator doesn't always deselect art properly, and generally seems to have trouble deselecting art that has had select() called on it.
Sometimes calling sync() on the current document can aid in art deselection woes when Illustrator "misbehaves".
virtual std::auto_ptr<ai::Dictionary> hdi::core::Art::dictionary ( ) const
virtual

Gets the built-in art data dictionary object for the target art.

Author
GW
Date
08/2013
Returns
A Dictionary object for the art's unique data dictionary
virtual bool hdi::core::Art::dispose ( )
virtual

Removes the art from the artboard.

Author
GW
Date
08/2013
Returns
true for successful disposal, false otherwise
Note
After calling dispose(), this object is basically useless! The actual art is gone, so obviously none of these methods will work after that.
virtual std::auto_ptr<Art> hdi::core::Art::duplicate ( const PaintOrder  order_,
const Art *const  prep_ = NULL 
) const
virtual

Duplicates the target piece of art on the artboard.

Author
GW
Date
08/2013
Parameters
order_Order in which to create the art
prep_Prepositional piece of art to which order_ will apply (or NULL if not needed)
Returns
Art object representing the duplicated piece of art, or NULL for none
Warning
This method does not assume responsibility of the memory for the prep_ argument.
virtual bool hdi::core::Art::editable ( ) const
virtual

Gets whether the art is editable.

Author
GW
Date
08/2013
Returns
true for the art being editable (unlocked), false otherwise
Note
Always returns the opposite of locked() method.
virtual void hdi::core::Art::expand ( const ExpandOptions  opts_,
const uint32_t  steps_ 
)
virtual

Expands the target art object.

Author
GW
Date
08/2013
Parameters
opts_Controls how the expansion is done
steps_For artwork with gradient fills, this is the number of art pieces to create to approximate the gradient
Note
Expansion will usually cause the art to change types (into a group), because it's possible for expansion to result in multiple art objects. For example, if you have some path art with a wide stroke and expand it, you may have to get the first child of the resulting group to get at the new path art itself.
virtual std::auto_ptr<Art> hdi::core::Art::firstChild ( ) const
virtual

Gets the first child art object for the target art.

Author
GW
Date
08/2013
Returns
The container's first child Art object
virtual bool hdi::core::Art::fullySelected ( ) const
virtual

Gets whether the art is fully selected.

Author
GW
Date
08/2013
Returns
true for the art being fully selected, false otherwise
Note
Container art (e.g. a group) is considered to be fully selected when all its children are selected. Other types of art will always return true for fullySelected() if the selected() method returns true, and vice versa.
virtual bool hdi::core::Art::hasFill ( ) const
virtual

Gets whether the target art object has a fill.

Author
GW
Date
08/2013
Returns
true for filled, false otherwise
virtual bool hdi::core::Art::hasStroke ( ) const
virtual

Gets whether the target art object has a stroke.

Author
GW
Date
08/2013
Returns
true for stroked, false otherwise
virtual double hdi::core::Art::height ( ) const
virtual

Gets the height of the bounds of the art.

Author
GW
Date
08/2013
Returns
The height of the art, excluding the stroke
virtual bool hdi::core::Art::hidden ( ) const
virtual

Gets whether the art is hidden.

Author
GW
Date
08/2013
Returns
true for art being hidden, false otherwise
virtual BlendKnockout hdi::core::Art::inheritedKnockout ( ) const
virtual

Retrieves the inherited knockout state (on or off) of an art object.

Author
GW
Date
08/2014
Returns
The inherited knockout enum value
virtual bool hdi::core::Art::isClipGroup ( ) const
virtual

Gets whether the target art object is a group that has clip mask children.

Author
GW
Date
11/2014
Returns
true if the art object is a clip group, false otherwise
virtual bool hdi::core::Art::isEmpty ( ) const
virtual

Gets whether the target Art object is empty (constructed with the default ctor)

Author
GW
Date
08/2013
Returns
true if the target Art object is empty, false otherwise
virtual bool hdi::core::Art::isIsolated ( ) const
virtual

Gets whether the art, or one of its parents, is currently isolated.

Author
GW
Date
08/2013
Returns
true if the art is currently isolated, false otherwise
Note
Typically, Illustrator does not allow "leaf art" (e.g. paths) to be isolated; however, this method looks up the parent lineage to see if a parent is currently isolated.
virtual bool hdi::core::Art::isLayerGroup ( ) const
virtual

Gets whether the target art object is a group that corresponds to a layer or sublayer.

Author
GW
Date
08/2013
Returns
true if the target is a layer group, false otherwise
virtual bool hdi::core::Art::isolate ( const bool  hideOtherArt_)
virtual

Isolates the art or one of its parents.

Author
GW
Date
08/2013
Parameters
hideOtherArt_true to make non-isolated invisible, false to dim it instead
Returns
true for successful isolation, false otherwise
Note
When isolating a piece of art, this will look up the parent lineage and automatically isolate the first parent that can be isolated (as Illustrator does not allow "leaf art", such as paths, to be isolated).
virtual bool hdi::core::Art::isStyled ( ) const
virtual

Gets whether the target art is part of the styled art of another art object.

Author
GW
Date
08/2013
Returns
true if the art is styled, false otherwise
virtual BlendKnockout hdi::core::Art::knockout ( ) const
virtual

Retrieves the current knockout state of an art object.

Author
GW
Date
08/2014
Returns
The knockout enum value
Note
If the state is KnockoutInherited, the on/off state is inherited from the object's parent, which can be acquired with inheritedKnockout()
virtual std::auto_ptr<Art> hdi::core::Art::lastChild ( ) const
virtual

Gets the last child art object for the target art.

Author
GW
Date
08/2013
Returns
The container's last child Art object
virtual std::auto_ptr<Layer> hdi::core::Art::layer ( ) const
virtual

Gets the parent layer for the target art.

Author
GW
Date
08/2013
Returns
The layer that contains the target piece of art
virtual bool hdi::core::Art::locked ( ) const
virtual

Gets whether the art is locked.

Author
GW
Date
08/2013
Returns
true for the art being locked (uneditable), false otherwise
Note
Always returns the opposite of editable() method.
virtual void hdi::core::Art::markDirty ( )
virtual

Marks an Art object for redrawing by incrementing its internal modification time stamp.

Author
GW
Date
11/2016
virtual MaskArt* const hdi::core::Art::mask ( ) const
virtual

Gets a MaskArt object for this Art object.

Author
GW
Date
08/2014
Returns
A MaskArt object unique to this piece of art, for further manipulating mask-related attributes of the art
Note
The MaskArt class has all mask-related methods.
virtual ArtVector hdi::core::Art::matchingChildren ( const MatchArtSpecVector &  specs_) const
virtual

Gets a vector of art in the art tree, rooted at the target, whose specs match those given.

Author
GW
Date
11/2014
Parameters
specs_Vector of match specifications
Returns
An artwork vector whose entries match the provided specifications
Note
This method takes a vector of specs so the caller can specify a multitude of artwork properties, thereby acquiring a vector of artwork that (currently) exhibit all of the provided properties.
Warning
The caller assumes responsibility for the memory of the contained Art objects.
virtual MeshArt* const hdi::core::Art::mesh ( ) const
virtual

Gets a MeshArt object for this Art object.

Author
GW
Date
08/2014
Returns
A MeshArt object unique to this piece of art, for further manipulating mesh-related attributes of the art
Note
The MeshArt class has all mesh-related methods.
This method is "dumb" in that it will return a MeshArt object even if the target art is not really a mesh. It's up to the caller to check the type before blindly calling this method.
virtual void hdi::core::Art::move ( const ArtboardPoint newOrigin_,
const BoundsPinPointType  pinPt_,
const bool  deep_ = false 
)
virtual

Moves the art to a given point, placing its pin point (pinPt_ arg) at a particular pre- defined point.

Author
GW
Date
08/2013
Parameters
newOrigin_New "origin" for the art
pinPt_"Pin point" which will be moved to the new "origin"
deep_Whether the move transform is recursively applied to child objects
virtual void hdi::core::Art::move ( const ArtboardPoint newOrigin_,
const ArtboardPoint origin_,
const bool  deep_ = false 
)
virtual

Moves the art to a given point, placing its pin point at another arbitrary point (pinPt_ arg)

Author
GW
Date
08/2013
Parameters
newOrigin_New "origin" for the art
origin_"Pin point", at an arbitrary position, which will be moved to the new "origin"
deep_Whether the move transform is recursively applied to child objects
virtual ArtboardRect hdi::core::Art::noStrokeBounds ( ) const
virtual

Gets the bounds rect for the target art, excluding the stroke.

This is a convenience method for calling bounds(VisibleBounds | NoStrokeBounds | ExcludeGuideBounds)

Author
GW
Date
08/2013
Returns
A rect object describing the art's bounds, excluding the stroke width
virtual void hdi::core::Art::offset ( const double  x_,
const double  y_,
const bool  deep_ = false 
)
virtual

Offsets (moves) the art by given x-axis and y-axis values.

Author
GW
Date
08/2013
Parameters
x_Amount to offset along the x-axis
y_Amount to offset along the y-axis
deep_Whether the offset transform is recursively applied to child objects
virtual double hdi::core::Art::opacity ( ) const
virtual

Retrieves the current opacity value applied to an art object.

Author
GW
Date
08/2014
Returns
The opacity value, in the range [0,1] where 0 is completely transparent and 1 is completely opaque
virtual bool hdi::core::Art::operator!= ( const Art rhs_) const
virtual

Tests whether a given Art object is not the same as another.

Author
GW
Date
08/2013
Parameters
rhs_Art to compare against (righthand side of inequality operator)
Returns
true for the target and rhs_ being different pieces of art, false otherwise
virtual Art& hdi::core::Art::operator= ( const Art rhs_)
virtual

Assigns one Art object to another.

Author
GW
Date
08/2013
Parameters
rhs_Existing Art object to copy values from
Returns
The target Art object, but with its values updated to match that of the rhs_ argument
virtual bool hdi::core::Art::operator== ( const Art rhs_) const
virtual

Tests whether a given Art object is the same as another.

Author
GW
Date
08/2013
Parameters
rhs_Art to compare against (righthand side of equality operator)
Returns
true for the target and rhs_ being the same piece of art, false otherwise
virtual std::auto_ptr<Art> hdi::core::Art::parent ( ) const
virtual

Gets the parent art object for the target art.

Author
GW
Date
08/2013
Returns
The target's parent Art object
virtual PathArt* const hdi::core::Art::path ( ) const
virtual

Gets a PathArt object for this Art object.

Author
GW
Date
08/2013
Returns
A PathArt object unique to this piece of art, for further manipulating path-related attributes of the art
Note
The PathArt class has all path-related methods, e.g. segment counts, path length, path intersection detection, etc.
This method is "dumb" in that it will return a PathArt object even if the target art is not really a path. It's up to the caller to check the type before blindly calling this method.
virtual double hdi::core::Art::perimeter ( ) const
virtual

Gets the perimeter of the art.

Author
GW
Date
08/2013
Returns
The perimeter of the art, excluding the stroke
virtual PlacedArt* const hdi::core::Art::placed ( ) const
virtual

Gets a PlacedArt object for this Art object.

Author
GW
Date
08/2014
Returns
A PlacedArt object unique to this piece of art, for further manipulating placed art- related attributes of the art
Note
The PlacedArt class has all placed art-related methods.
This method is "dumb" in that it will return a PlacedArt object even if the target art is not really placed art. It's up to the caller to check the type before blindly calling this method.
virtual std::auto_ptr<Art> hdi::core::Art::pluginEditArt ( ) const
virtual

Gets the editable art object for the target plugin art.

Author
GW
Date
08/2013
Returns
The plugin art's editable Art object
virtual std::auto_ptr<Art> hdi::core::Art::priorSibling ( ) const
virtual

Gets the previous sibling art object for the target art.

Author
GW
Date
08/2013
Returns
The container's prior sibling Art object
virtual RasterArt* const hdi::core::Art::raster ( ) const
virtual

Gets a RasterArt object for this Art object.

Author
GW
Date
08/2014
Returns
A RasterArt object unique to this piece of art, for further manipulating raster-related attributes of the art
Note
The RasterArt class has all path-related methods.
This method is "dumb" in that it will return a RasterArt object even if the target art is not really raster art. It's up to the caller to check the type before blindly calling this method.
virtual void hdi::core::Art::reorder ( const PaintOrder  order_,
const Art *const  prep_ = NULL 
)
virtual

Reorders the target art in Illustrator's drawing order.

Author
GW
Date
08/2013
Parameters
order_Order in which to place the art
prep_Prepositional piece of art to which order_ will apply (or NULL if not needed)
Warning
This method does not assume responsibility of the memory for the prep_ argument.
virtual void hdi::core::Art::rotate ( const Angle angle_,
const bool  deep_ = false 
)
virtual

Rotates the target art by a given angle around its center point.

Author
GW
Date
08/2013
Parameters
angle_Angle to rotate the art around its center point
deep_Whether the rotation transform is recursively applied to child objects
virtual void hdi::core::Art::rotate ( const Angle angle_,
const BoundsPinPointType  pinPt_,
const bool  deep_ = false 
)
virtual

Rotates the target art by a given angle around a given pre-defined pin point.

Author
GW
Date
08/2013
Parameters
angle_Angle to rotate the art
pinPt_"Pin point" around which the art will be rotated
deep_Whether the rotation transform is recursively applied to child objects
virtual void hdi::core::Art::rotate ( const Angle angle_,
const ArtboardPoint origin_,
const bool  deep_ = false 
)
virtual

Rotates the target art by a given angle around a given pin point.

Author
GW
Date
08/2013
Parameters
angle_Angle to rotate the art
origin_New "origin" around which the art will be rotated
deep_Whether the rotation transform is recursively applied to child objects
virtual void hdi::core::Art::scale ( const double  scaler_,
const bool  deep_ = false 
)
virtual

Scales the art by a given scaler from its center point.

Author
GW
Date
08/2013
Parameters
scaler_Multiplier for scaling (e.g. 0.75 is 75% of the current size)
deep_Whether the scale transform is recursively applied to child objects
virtual void hdi::core::Art::scale ( const double  scaler_,
const BoundsPinPointType  pinPt_,
const bool  deep_ = false 
)
virtual

Scales the art by a given scaler from a preset pin point.

Author
GW
Date
08/2013
Parameters
scaler_Multiplier for scaling (e.g. 0.75 is 75% of the current size)
pinPt_"Pin point" from which the art will be scaled
deep_Whether the scale transform is recursively applied to child objects
virtual void hdi::core::Art::scale ( const double  scaler_,
const ArtboardPoint origin_,
const bool  deep_ = false 
)
virtual

Scales the art by a given scaler from a given pin point.

Author
GW
Date
08/2013
Parameters
scaler_Multiplier for scaling (e.g. 0.75 is 75% of the current size)
origin_"Origin" from which the art will be scaled
deep_Whether the scale transform is recursively applied to child objects
virtual void hdi::core::Art::scale ( const double  xScaler_,
const double  yScaler_,
const bool  deep_ = false 
)
virtual

Scales the art by givens scaler from its center point.

Author
GW
Date
08/2013
Parameters
xScaler_Multiplier for scaling horizontally (e.g. 0.75 is 75% of the current size)
yScaler_Multiplier for scaling vertically (e.g. 0.75 is 75% of the current size)
deep_Whether the scale transform is recursively applied to child objects
virtual void hdi::core::Art::scale ( const double  xScaler_,
const double  yScaler_,
const BoundsPinPointType  pinPt_,
const bool  deep_ = false 
)
virtual

Scales the art by given scalers from a preset pin point.

Author
GW
Date
08/2013
Parameters
xScaler_Multiplier for scaling horizontally (e.g. 0.75 is 75% of the current size)
yScaler_Multiplier for scaling vertically (e.g. 0.75 is 75% of the current size)
pinPt_"Pin point" from which the art will be scaled
deep_Whether the scale transform is recursively applied to child objects
virtual void hdi::core::Art::scale ( const double  xScaler_,
const double  yScaler_,
const ArtboardPoint origin_,
const bool  deep_ = false 
)
virtual

Scales the art by given scalers from a given pin point.

Author
GW
Date
08/2013
Parameters
xScaler_Multiplier for scaling horizontally (e.g. 0.75 is 75% of the current size)
yScaler_Multiplier for scaling vertically (e.g. 0.75 is 75% of the current size)
origin_New "origin" from which the art will be scaled
deep_Whether the scale transform is recursively applied to child objects
virtual void hdi::core::Art::select ( )
virtual

Sets the art object and all its children (in the case of a container) to be selected.

Author
GW
Date
08/2013
Note
Illustrator doesn't always select art properly, and generally seems to have trouble selecting during mouse drag and track events. If you need to select some newly created art, it's best to do it in response to a mouse up event.
Sometimes calling sync() on the current document can aid in art selection woes when Illustrator "misbehaves".
virtual bool hdi::core::Art::selected ( ) const
virtual

Gets whether the art is selected.

Author
GW
Date
08/2013
Returns
true for the art being selected, false otherwise
Note
Container art (e.g. a group) is considered to be selected even when only one child is selected. To determine if a container is fully selected, call fullySelected() instead.
virtual void hdi::core::Art::setAllAttributes ( const ArtAttribute  attrs_)
virtual

Sets a bitwise OR'd enum value for all art attributes.

Author
GW
Date
12/2015
Parameters
attrs_All art attributes that should be true bitwise OR'd into a single enum value
virtual void hdi::core::Art::setAttribute ( const ArtAttribute  attr_,
const bool  enable_ 
)
virtual

Sets an art attribute for the target art (e.g. hidden, locked, etc.)

Author
GW
Date
08/2013
Parameters
attr_The attribute of interest
enable_Whether to enable the attribute (e.g. true for ArtAttrSelected to make it selected, false to deselect)
virtual void hdi::core::Art::setBlendMode ( const BlendMode  mode_)
virtual

Sets the current blending mode of an art object, which applies to the object as a whole.

Author
GW
Date
08/2014
Parameters
mode_New blending mode enum value
virtual void hdi::core::Art::setCenterPointVisible ( const bool  visible_)
virtual

Sets whether the center point is visible for the target art.

Author
GW
Date
08/2013
Parameters
visible_Whether the center point is visible
virtual void hdi::core::Art::setEditable ( const bool  editable_)
virtual

Sets whether the art is editable.

Author
GW
Date
08/2013
Parameters
editable_true to allow editing, false otherwise
Note
Always sets the art to be locked.
virtual void hdi::core::Art::setHidden ( const bool  hidden_)
virtual

Sets whether the art is hidden.

Author
GW
Date
08/2013
Parameters
hidden_true to hide, false otherwise
virtual void hdi::core::Art::setKnockout ( const BlendKnockout  ko_)
virtual

Sets the current knockout state of an art object.

Author
GW
Date
08/2014
Parameters
ko_New knockout enum value
virtual void hdi::core::Art::setLocked ( const bool  lock_)
virtual

Sets whether the art is locked.

Author
GW
Date
08/2013
Parameters
lock_true to lock, false otherwise
Note
Always sets the art to be uneditable.
virtual void hdi::core::Art::setOpacity ( const double  o_)
virtual

Sets the current opacity value applied to an art object.

Author
GW
Date
08/2014
Parameters
o_New opacity value, in the range [0,1]
virtual void hdi::core::Art::setSelected ( const bool  select_)
virtual

Sets whether the art is selected.

Author
GW
Date
08/2013
Parameters
select_true to select, false otherwise
Note
This method simply calls select() or deselect() as appropriate
Container art (e.g. a group) will be fully selected, meaning that all its children will also be selected.
virtual void hdi::core::Art::setStyle ( const ArtStyle style_)
virtual

Sets the art's style.

Author
GW
Date
08/2013
Parameters
style_New style for the art
virtual bool hdi::core::Art::setSymbol ( const Symbol sym_)
virtual

Sets the original symbol definition object for an instance of a symbol.

Author
GW
Date
11/2013
Parameters
sym_The symbol art instance's definition
Returns
true if the symbol instance's defintion was set, false otherwise
virtual std::auto_ptr<Art> hdi::core::Art::sibling ( ) const
virtual

Gets the next sibling art object for the target art.

Author
GW
Date
08/2013
Returns
The target's sibling Art object
virtual ArtboardRect hdi::core::Art::strokeBounds ( ) const
virtual

Gets the bounds rect for the target art, including the stroke.

This is a convenience method for calling bounds(VisibleBounds | ExcludeGuideBounds)

Author
GW
Date
08/2013
Returns
A rect object describing the art's bounds, including the stroke width
virtual std::auto_ptr<ArtStyle> hdi::core::Art::style ( ) const
virtual

Gets the art's style.

Author
GW
Date
08/2013
Returns
The target art's styling
virtual std::auto_ptr<Symbol> hdi::core::Art::symbol ( ) const
virtual

Gets the original symbol definition for an instance of a symbol.

Author
GW
Date
08/2013
Returns
The symbol instance's source group Art object
virtual TextArt* const hdi::core::Art::text ( ) const
virtual

Gets a TextArt object for this Art object.

Author
GW
Date
08/2013
Returns
A TextArt object unique to this piece of art, for further manipulating text-related attributes of the art
Note
The TextArt class has all text-related methods, e.g. text type, orientation, text ranges, etc.
This method is "dumb" in that it will return a TextArt object even if the target art is not really a text frame. It's up to the caller to check the type before blindly calling this method.
virtual void hdi::core::Art::transform ( const TransformMatrix matrix_,
const bool  deep_ = false 
)
virtual

Performs an arbitrary transformation on the target art.

Author
GW
Date
08/2013
Parameters
matrix_Transformation matrix to apply for the transform
deep_Whether the transform is recursively applied to child objects
virtual ArtboardRect hdi::core::Art::transformBounds ( const TransformMatrix transform_,
const BoundsOptions  opts_ 
) const
virtual

Gets the bounds that would be the result of a transform.

Author
GW
Date
08/2013
Parameters
transform_Transform to "virtually" perform before acquiring bounds
opts_Flags for which attributes to take into consideration during bounds calculations (bitwise OR of BoundsOptions enum)
Returns
A rect object describing the art's bounds, were it to be transformed by the given matrix
virtual void hdi::core::Art::transformWithOptions ( const TransformMatrix matrix_,
const TransformOptions  options_ 
)
virtual

Performs an arbitrary transformation on the target art with the given options.

Author
GW
Date
03/2016
Parameters
matrix_Transformation matrix to apply for the transform
options_TransformOptions enum values bitwise OR'd together
virtual std::auto_ptr<UID> hdi::core::Art::uid ( ) const
virtual

Gets the UID for the target art.

Author
GW
Date
08/2013
Returns
The target art's UID object, from which the target piece of art can be uniquely acquired at a later time (provided it exists)
virtual void hdi::core::Art::updateBounds ( )
virtual

Updates the bounds rect for the target art by updating Illustrator caches (regarding bounding boxes)

Author
GW
Date
08/2013
virtual bool hdi::core::Art::updateLinks ( const bool  force_ = false)
virtual

Checks whether any linked objects (linked images or placed objects) contained in the subtree of a given container need updating, and updates them if needed.

Author
GW
Date
01/2016
Parameters
force_Whether to force updating of objects regardless of whether they have changed
Returns
true if any objects were updated, false otherwise
virtual bool hdi::core::Art::valid ( ) const
virtual

Tests the validity of the target piece of art by searching for it in the document.

Author
GW
Date
08/2013
Returns
true for valid art, false otherwise
virtual double hdi::core::Art::width ( ) const
virtual

Gets the width of the bounds of the art.

Author
GW
Date
08/2013
Returns
The width of the art, excluding the stroke
virtual double hdi::core::Art::x ( ) const
virtual

Gets the top-left x-value of the art.

Author
GW
Date
08/2013
Returns
The x-position of the art, excluding the stroke
virtual double hdi::core::Art::y ( ) const
virtual

Gets the top-left y-value of the art.

Author
GW
Date
08/2013
Returns
The y-position of the art, excluding the stroke