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

Allows manipulation of Illustrator's built-in grids. More...

#include <hdicoreGrid.h>

Classes

class  Spacing
 Describes the spacing and density of gridlines. More...
 

Public Types

enum  Style { UnknownStyle = 0, GraphStyle = 10, DottedStyle = 20 }
 Indicates how the grid is drawn.
 
typedef std::auto_ptr< SpacingSpacingAP
 

Public Member Functions

 ~Grid ()
 Destructs a Grid object. More...
 
void show ()
 Shows the grid. More...
 
void hide ()
 Hides the grid. More...
 
bool visible () const
 Gets whether the grid is visible or not. More...
 
void setVisible (const bool visible_)
 Sets whether the grid is visible. More...
 
bool snaps () const
 Gets whether the gridlines can be snapped to. More...
 
void setSnaps (const bool snaps_)
 Sets whether the gridlines can be snapped to. More...
 
bool behindArt () const
 Gets whether the grid draws behind art. More...
 
void setBehindArt (const bool behind_)
 Sets whether the grid draws behind art. More...
 
Style style () const
 Gets the gridline style, either kAIGridStyleGraph and kAIGridStyleDotted. More...
 
void setStyle (const Style style_)
 Sets the gridline style, either kAIGridStyleGraph and kAIGridStyleDotted. More...
 
Spacing spacing () const
 Gets the spacing of the gridlines. More...
 
void setSpacing (const Spacing &spacing_)
 Sets the spacing of the gridlines from an AIGridSpacing struct. More...
 
void setSpacing (const double spacing_, const int32_t ticks_)
 Sets the spacing of the gridlines from a spacing distance and the number of ticks between. More...
 
Color darkColor () const
 Gets the current "dark" color (for major gridlines) More...
 
void setDarkColor (const Color &color_)
 Sets the current "dark" color (for major gridlines) More...
 
Color lightColor () const
 Gets the current "light" color (for minor gridlines, also called "ticks") More...
 
void setLightColor (const Color &color_)
 Sets the current "light" color (for minor gridlines, also called "ticks") More...
 

Friends

class CurrentDocument
 

Detailed Description

Allows manipulation of Illustrator's built-in grids.

Constructor & Destructor Documentation

hdi::core::Grid::~Grid ( )

Destructs a Grid object.

Author
GW
Date
08/2013

Member Function Documentation

bool hdi::core::Grid::behindArt ( ) const

Gets whether the grid draws behind art.

Author
GW
Date
08/2013
Returns
true if the grid is behind art, false otherwise
Color hdi::core::Grid::darkColor ( ) const

Gets the current "dark" color (for major gridlines)

Author
GW
Date
08/2013
Returns
Current color for the major gridlines
void hdi::core::Grid::hide ( )

Hides the grid.

Author
GW
Date
08/2013
Color hdi::core::Grid::lightColor ( ) const

Gets the current "light" color (for minor gridlines, also called "ticks")

Author
GW
Date
08/2013
Returns
Current color for the minor gridlines
void hdi::core::Grid::setBehindArt ( const bool  behind_)

Sets whether the grid draws behind art.

Author
GW
Date
08/2013
Parameters
behind_true for gridline drawing at the "backmost" of the document, false for "frontmost"
void hdi::core::Grid::setDarkColor ( const Color color_)

Sets the current "dark" color (for major gridlines)

Author
GW
Date
08/2013
Parameters
color_New color for the major gridlines
void hdi::core::Grid::setLightColor ( const Color color_)

Sets the current "light" color (for minor gridlines, also called "ticks")

Author
GW
Date
08/2013
Parameters
color_New color for the minor gridlines
void hdi::core::Grid::setSnaps ( const bool  snaps_)

Sets whether the gridlines can be snapped to.

Author
GW
Date
08/2013
Parameters
snaps_true for snapping, false otherwise
void hdi::core::Grid::setSpacing ( const Spacing spacing_)

Sets the spacing of the gridlines from an AIGridSpacing struct.

Author
GW
Date
08/2013
Parameters
spacing_New (major) gridline spacing and number of ticks (minor lines) between them
void hdi::core::Grid::setSpacing ( const double  spacing_,
const int32_t  ticks_ 
)

Sets the spacing of the gridlines from a spacing distance and the number of ticks between.

Author
GW
Date
08/2013
Parameters
spacing_New (major) gridline spacing
ticks_Number of ticks (minor lines) between the gridlines
void hdi::core::Grid::setStyle ( const Style  style_)

Sets the gridline style, either kAIGridStyleGraph and kAIGridStyleDotted.

Author
GW
Date
08/2013
Parameters
style_New gridline styling
void hdi::core::Grid::setVisible ( const bool  visible_)

Sets whether the grid is visible.

Author
GW
Date
08/2013
Parameters
visible_true for visible, false otherwise
Note
This method simply calls show() or hide() as appropriate
void hdi::core::Grid::show ( )

Shows the grid.

Author
GW
Date
08/2013
bool hdi::core::Grid::snaps ( ) const

Gets whether the gridlines can be snapped to.

Author
GW
Date
08/2013
Returns
true to snap the cursor to gridlines, false otherwise
Spacing hdi::core::Grid::spacing ( ) const

Gets the spacing of the gridlines.

Author
GW
Date
08/2013
Returns
Current gridline spacing settings
Style hdi::core::Grid::style ( ) const

Gets the gridline style, either kAIGridStyleGraph and kAIGridStyleDotted.

Author
GW
Date
08/2013
Returns
The current gridline styling
bool hdi::core::Grid::visible ( ) const

Gets whether the grid is visible or not.

Author
GW
Date
08/2013
Returns
true if the grid is visible, false otherwise