Allows manipulation of Illustrator's built-in grids.
More...
#include <hdicoreGrid.h>
|
enum | Style { UnknownStyle = 0
, GraphStyle = 10
, DottedStyle = 20
} |
| Indicates how the grid is drawn.
|
|
typedef std::unique_ptr< Spacing > | SpacingUP |
|
typedef std::shared_ptr< Spacing > | SpacingSP |
|
typedef std::weak_ptr< Spacing > | SpacingWP |
|
|
| ~Grid () |
| Destructs a Grid object.
|
|
void | show () |
| Shows the grid.
|
|
void | hide () |
| Hides the grid.
|
|
bool | visible () const |
| Gets whether the grid is visible or not.
|
|
void | setVisible (const bool visible_) |
| Sets whether the grid is visible.
|
|
bool | snaps () const |
| Gets whether the gridlines can be snapped to.
|
|
void | setSnaps (const bool snaps_) |
| Sets whether the gridlines can be snapped to.
|
|
bool | behindArt () const |
| Gets whether the grid draws behind art.
|
|
void | setBehindArt (const bool behind_) |
| Sets whether the grid draws behind art.
|
|
Style | style () const |
| Gets the gridline style, either kAIGridStyleGraph and kAIGridStyleDotted.
|
|
void | setStyle (const Style style_) |
| Sets the gridline style, either kAIGridStyleGraph and kAIGridStyleDotted.
|
|
Spacing | spacing () const |
| Gets the spacing of the gridlines.
|
|
void | setSpacing (const Spacing &spacing_) |
| Sets the spacing of the gridlines from an AIGridSpacing struct.
|
|
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.
|
|
Color | darkColor () const |
| Gets the current "dark" color (for major gridlines)
|
|
void | setDarkColor (const Color &color_) |
| Sets the current "dark" color (for major gridlines)
|
|
Color | lightColor () const |
| Gets the current "light" color (for minor gridlines, also called "ticks")
|
|
void | setLightColor (const Color &color_) |
| Sets the current "light" color (for minor gridlines, also called "ticks")
|
|
Allows manipulation of Illustrator's built-in grids.
◆ ~Grid()
hdi::core::Grid::~Grid |
( |
| ) |
|
Destructs a Grid object.
- Author
- GW
- Date
- 08/2013
◆ behindArt()
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
◆ darkColor()
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
◆ hide()
void hdi::core::Grid::hide |
( |
| ) |
|
Hides the grid.
- Author
- GW
- Date
- 08/2013
◆ lightColor()
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
◆ setBehindArt()
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" |
◆ setDarkColor()
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 |
◆ setLightColor()
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 |
◆ setSnaps()
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 |
◆ setSpacing() [1/2]
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 |
◆ setSpacing() [2/2]
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 |
◆ setStyle()
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 |
◆ setVisible()
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
◆ show()
void hdi::core::Grid::show |
( |
| ) |
|
Shows the grid.
- Author
- GW
- Date
- 08/2013
◆ snaps()
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()
Spacing hdi::core::Grid::spacing |
( |
| ) |
const |
Gets the spacing of the gridlines.
- Author
- GW
- Date
- 08/2013
- Returns
- Current gridline spacing settings
◆ style()
Style hdi::core::Grid::style |
( |
| ) |
const |
Gets the gridline style, either kAIGridStyleGraph and kAIGridStyleDotted.
- Author
- GW
- Date
- 08/2013
- Returns
- The current gridline styling
◆ visible()
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