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

Allows for placed art manipulation, metadata access, etc. More...

#include <hdicorePlacedArt.h>

Public Types

enum  PlacedType { PlacedTypeUnknown = 0, PlacedTypeEPS = 10, PlacedTypeOther = 20 }
 Describes what type of data is placed.
 
enum  PlaceMethod {
  PlaceMethodUnknown = 0, PlaceMethodAsIs = 10, PlaceMethodFill = 20, PlaceMethodFit = 30,
  PlaceMethodConform = 40, PlaceMethodReconform = 50
}
 Describes how the data has been placed.
 
enum  PlaceMode {
  PlaceModeVanilla = 0, PlaceModeQueryReplace = 10, PlaceModeForceReplace = 20, PlaceModeUnlinkPlaced = 30,
  PlaceModeForceReplaceValidate = 50, PlaceModeQueryUnlinkPlaced = 60
}
 

Public Member Functions

 ~PlacedArt ()
 Destructs a PlacedArt object. More...
 
PlacedType placedType () const
 Gets the type of placed art. More...
 
std::string filePath () const
 Gets the file path for the placed art. More...
 
void setFilePath (const std::string &path_)
 Sets the file path for the placed art. More...
 
core::TransformMatrix matrix () const
 Retrieves the transformation matrix that positions the content of a placed art object's linked file in the document. More...
 
void setMatrix (const core::TransformMatrix &matrix_)
 Sets the transformation matrix of the target placed art object. More...
 
core::ArtboardRect bounds () const
 Retrieves the boundary dimensions of placed art, regardless of the transformations applied to it. More...
 
void setBounds (const core::ArtboardRect &b_)
 Sets the preliminary bounding box information for a placed object. More...
 
bool options (PlaceMethod &method__, BoundsPinPointType &align__, bool &clip__)
 Retrieves the placement options for a placed object. More...
 
void setOptions (const PlaceMethod method_, const BoundsPinPointType align_, const bool clip_)
 Sets the placement options for a placed object. More...
 

Static Public Member Functions

static bool Create (const PlaceMode mode_, const std::string &path_, const bool link_, core::Art *const oldArt_, core::Art &newArt__)
 Creates a new piece of art of type ArtTypePlaced. More...
 

Friends

class Art
 

Detailed Description

Allows for placed art manipulation, metadata access, etc.

Constructor & Destructor Documentation

hdi::core::PlacedArt::~PlacedArt ( )

Destructs a PlacedArt object.

Author
GW
Date
08/2014

Member Function Documentation

core::ArtboardRect hdi::core::PlacedArt::bounds ( ) const

Retrieves the boundary dimensions of placed art, regardless of the transformations applied to it.

Author
GW
Date
08/2014
Returns
The bounding rect
static bool hdi::core::PlacedArt::Create ( const PlaceMode  mode_,
const std::string &  path_,
const bool  link_,
core::Art *const  oldArt_,
core::Art newArt__ 
)
static

Creates a new piece of art of type ArtTypePlaced.

Author
GW
Date
01/2016
Parameters
mode_Type of (re)placement operation to perform
path_File path of the file to place; if empty, shows a dialog to query the user instead
link_true to link the file, false to place/import the file
oldArt_Art to be replaced, if mode_ is a replacement operation; pass NULL otherwise
newArt__Return-by-reference for the newly created art
Returns
true if the art was created, false otherwise
std::string hdi::core::PlacedArt::filePath ( ) const

Gets the file path for the placed art.

Author
GW
Date
08/2014
Returns
The file path as UTF-8, or "" for error
core::TransformMatrix hdi::core::PlacedArt::matrix ( ) const

Retrieves the transformation matrix that positions the content of a placed art object's linked file in the document.

Author
GW
Date
08/2014
Returns
The transformation matrix for the placed art
bool hdi::core::PlacedArt::options ( PlaceMethod method__,
BoundsPinPointType &  align__,
bool &  clip__ 
)

Retrieves the placement options for a placed object.

Author
GW
Date
08/2014
Parameters
method__Return-by-reference for the method used to position and size the linked object
align__Return-by-reference for the alignment of the linked object
clip__Return-by-reference for true if the linked object is clipped
Returns
true if the options could be acquired, false otherwise
PlacedType hdi::core::PlacedArt::placedType ( ) const

Gets the type of placed art.

Author
GW
Date
08/2014
Returns
The place art type
void hdi::core::PlacedArt::setBounds ( const core::ArtboardRect b_)

Sets the preliminary bounding box information for a placed object.

Author
GW
Date
08/2014
Parameters
b_The new bounding box
void hdi::core::PlacedArt::setFilePath ( const std::string &  path_)

Sets the file path for the placed art.

Author
GW
Date
08/2014
Parameters
path_New file path, as UTF-8
void hdi::core::PlacedArt::setMatrix ( const core::TransformMatrix matrix_)

Sets the transformation matrix of the target placed art object.

Author
GW
Date
08/2014
Parameters
matrix_New transformation matrix
void hdi::core::PlacedArt::setOptions ( const PlaceMethod  method_,
const BoundsPinPointType  align_,
const bool  clip_ 
)

Sets the placement options for a placed object.

Author
GW
Date
08/2014
Parameters
method_New method used to position and size the linked object
align_New alignment of the linked object
clip_true if the linked object should be clipped