LayOut C API

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
grid.h File Reference
`#include <LayOutAPI/common.h>`
`#include <LayOutAPI/model/defs.h>`
`#include <SketchUpAPI/color.h>`

Go to the source code of this file.

## Functions
LO_RESULT | LOGridGetMajorSpacing (LOGridRef grid, double *spacing)
| Gets the major space size of the grid. More...
LO_RESULT | LOGridSetMajorSpacing (LOGridRef grid, double spacing)
| Sets the gap between major grid lines for the grid. More...
LO_RESULT | LOGridGetMinorDivisions (LOGridRef grid, int *divisions)
| Gets the number of minor divisions of the grid. More...
LO_RESULT | LOGridSetMinorDivisions (LOGridRef grid, int divisions)
| Sets the number of minor divisions for the grid. More...
LO_RESULT | LOGridGetMajorColor (LOGridRef grid, SUColor *color)
| Gets the color for the major grid lines. More...
LO_RESULT | LOGridSetMajorColor (LOGridRef grid, SUColor color)
| Sets the color for the major grid lines. More...
LO_RESULT | LOGridGetMinorColor (LOGridRef grid, SUColor *color)
| Gets the color for the minor grid lines. More...
LO_RESULT | LOGridSetMinorColor (LOGridRef grid, SUColor color)
| Sets the color for the minor grid lines. More...
LO_RESULT | LOGridGetShow (LOGridRef grid, bool *show)
| Gets whether or not the grid is visible. More...
LO_RESULT | LOGridSetShow (LOGridRef grid, bool show)
| Sets whether or not the grid is visible. More...
LO_RESULT | LOGridGetShowMajor (LOGridRef grid, bool *show)
| Gets whether or not the major grid lines are visible. More...
LO_RESULT | LOGridSetShowMajor (LOGridRef grid, bool show)
| Sets whether or not the major grid lines are visible. More...
LO_RESULT | LOGridGetShowMinor (LOGridRef grid, bool *show)
| Gets whether or not the minor grid lines are visible. More...
LO_RESULT | LOGridSetShowMinor (LOGridRef grid, bool show)
| Sets whether or not the minor grid lines are visible. More...
LO_RESULT | LOGridGetPrint (LOGridRef grid, bool *print)
| Gets whether or not the grid will be printed. More...
LO_RESULT | LOGridSetPrint (LOGridRef grid, bool print)
| Sets whether or not the grid is will be printed. More...
LO_RESULT | LOGridGetInFront (LOGridRef grid, bool *in_front)
| Gets whether or not the grid is drawn on top of entities. More...
LO_RESULT | LOGridSetInFront (LOGridRef grid, bool in_front)
| Sets whether or not the grid is drawn on top of entities. More...
LO_RESULT | LOGridGetClipToMargins (LOGridRef grid, bool *clip)
| Gets whether or not the grid is clipped to the paper margins. More...
LO_RESULT | LOGridSetClipToMargins (LOGridRef grid, bool clip)
| Sets whether or not the grid is clipped to the paper margins. More...

## Function Documentation

LO_RESULT LOGridGetClipToMargins | ( | LOGridRef | grid,
|  | bool * | clip
| ) |  |

Gets whether or not the grid is clipped to the paper margins.

Since
  LayOut 2020.1, API 5.1

Parameters

  [in] | grid | The grid object.
  [out] | clip | Whether or not the grid is on top of entities.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if grid does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if clipped is NULL

LO_RESULT LOGridGetInFront | ( | LOGridRef | grid,
|  | bool * | in_front
| ) |  |

Gets whether or not the grid is drawn on top of entities.

Since
  LayOut 2020.1, API 5.1

Parameters

  [in] | grid | The grid object.
  [out] | in_front | Whether or not the grid is on top of entities.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if grid does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if in_front is NULL

LO_RESULT LOGridGetMajorColor | ( | LOGridRef | grid,
|  | SUColor * | color
| ) |  |

Gets the color for the major grid lines.

Parameters

  [in] | grid | The grid object.
  [out] | color | The color of the major grid lines.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if grid does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if color is NULL

LO_RESULT LOGridGetMajorSpacing | ( | LOGridRef | grid,
|  | double * | spacing
| ) |  |

Gets the major space size of the grid.

Parameters

  [in] | grid | The grid object.
  [out] | spacing | The spacing of the major divisions of the grid.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if grid does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if spacing is NULL

LO_RESULT LOGridGetMinorColor | ( | LOGridRef | grid,
|  | SUColor * | color
| ) |  |

Gets the color for the minor grid lines.

Parameters

  [in] | grid | The grid object.
  [out] | color | The color of the minor grid lines.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if grid does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if color is NULL

LO_RESULT LOGridGetMinorDivisions | ( | LOGridRef | grid,
|  | int * | divisions
| ) |  |

Gets the number of minor divisions of the grid.

Parameters

  [in] | grid | The grid object.
  [out] | divisions | The minor division count.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if grid does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if divisions is NULL

LO_RESULT LOGridGetPrint | ( | LOGridRef | grid,
|  | bool * | print
| ) |  |

Gets whether or not the grid will be printed.

Parameters

  [in] | grid | The grid object.
  [out] | print | Whether or not the grid will be printed.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if grid does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if print is NULL

LO_RESULT LOGridGetShow | ( | LOGridRef | grid,
|  | bool * | show
| ) |  |

Gets whether or not the grid is visible.

Parameters

  [in] | grid | The grid object.
  [out] | show | Whether or not the grid is visible.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if grid does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if show is NULL

LO_RESULT LOGridGetShowMajor | ( | LOGridRef | grid,
|  | bool * | show
| ) |  |

Gets whether or not the major grid lines are visible.

Parameters

  [in] | grid | The grid object.
  [out] | show | Whether or not the major grid lines are visible.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if grid does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if show is NULL

LO_RESULT LOGridGetShowMinor | ( | LOGridRef | grid,
|  | bool * | show
| ) |  |

Gets whether or not the minor grid lines are visible.

Parameters

  [in] | grid | The grid object.
  [out] | show | Whether or not the minor grid lines are visible.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if grid does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if show is NULL

LO_RESULT LOGridSetClipToMargins | ( | LOGridRef | grid,
|  | bool | clip
| ) |  |

Sets whether or not the grid is clipped to the paper margins.

Since
  LayOut 2020.1, API 5.1

Parameters

  [in] | grid | The grid object.
  [in] | clip | Whether or not the grid is clipped to the paper margins.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if grid does not refer to a valid object

LO_RESULT LOGridSetInFront | ( | LOGridRef | grid,
|  | bool | in_front
| ) |  |

Sets whether or not the grid is drawn on top of entities.

Since
  LayOut 2020.1, API 5.1

Parameters

  [in] | grid | The grid object.
  [in] | in_front | Whether or not the grid is on top of entities.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if grid does not refer to a valid object

LO_RESULT LOGridSetMajorColor | ( | LOGridRef | grid,
|  | SUColor | color
| ) |  |

Sets the color for the major grid lines.

Since
  LayOut 2020.1, API 5.1

Parameters

  [in] | grid | The grid object.
  [in] | color | The new color for the major grid lines.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if grid does not refer to a valid object

LO_RESULT LOGridSetMajorSpacing | ( | LOGridRef | grid,
|  | double | spacing
| ) |  |

Sets the gap between major grid lines for the grid.

Since
  LayOut 2020.1, API 5.1

Parameters

  [in] | grid | The grid object.
  [in] | spacing | The number of minor grid lines to have between major grid lines. Must be positive.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if grid does not refer to a valid object
  - SU_ERROR_OUT_OF_RANGE if divisions is less than zero

LO_RESULT LOGridSetMinorColor | ( | LOGridRef | grid,
|  | SUColor | color
| ) |  |

Sets the color for the minor grid lines.

Since
  LayOut 2020.1, API 5.1

Parameters

  [in] | grid | The grid object.
  [in] | color | The new color for the minor grid lines.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if grid does not refer to a valid object

LO_RESULT LOGridSetMinorDivisions | ( | LOGridRef | grid,
|  | int | divisions
| ) |  |

Sets the number of minor divisions for the grid.

Since
  LayOut 2020.1, API 5.1

Parameters

  [in] | grid | The grid object.
  [in] | divisions | The number of minor grid lines to have between major grid lines. Must not be negative.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if grid does not refer to a valid object
  - SU_ERROR_OUT_OF_RANGE if divisions is less than zero

LO_RESULT LOGridSetPrint | ( | LOGridRef | grid,
|  | bool | print
| ) |  |

Sets whether or not the grid is will be printed.

Since
  LayOut 2020.1, API 5.1

Parameters

  [in] | grid | The grid object.
  [in] | print | Whether or not the grid will be printed.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if grid does not refer to a valid object

LO_RESULT LOGridSetShow | ( | LOGridRef | grid,
|  | bool | show
| ) |  |

Sets whether or not the grid is visible.

Since
  LayOut 2020.1, API 5.1

Parameters

  [in] | grid | The grid object.
  [in] | show | Whether or not the grid is visible.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if grid does not refer to a valid object

LO_RESULT LOGridSetShowMajor | ( | LOGridRef | grid,
|  | bool | show
| ) |  |

Sets whether or not the major grid lines are visible.

Since
  LayOut 2020.1, API 5.1

Parameters

  [in] | grid | The grid object.
  [in] | show | Whether or not the major grid lines are visible.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if grid does not refer to a valid object

LO_RESULT LOGridSetShowMinor | ( | LOGridRef | grid,
|  | bool | show
| ) |  |

Sets whether or not the minor grid lines are visible.

Since
  LayOut 2020.1, API 5.1

Parameters

  [in] | grid | The grid object.
  [in] | show | Whether or not the minor grid lines are visible.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if grid does not refer to a valid object