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
ellipse.h File Reference
`#include <LayOutAPI/common.h>`
`#include <LayOutAPI/geometry/geometry.h>`
`#include <LayOutAPI/model/defs.h>`

Go to the source code of this file.

## Functions
LO_RESULT | LOEllipseCreate (LOEllipseRef *ellipse, const LOAxisAlignedRect2D *bounds)
| Creates a new ellipse entity object. More...
LO_RESULT | LOEllipseAddReference (LOEllipseRef ellipse)
| Adds a reference to an ellipse object. More...
LO_RESULT | LOEllipseRelease (LOEllipseRef *ellipse)
| Releases an ellipse object. The object will be invalidated if releasing the last reference. More...
LO_EXPORT LOEllipseRef | LOEllipseFromEntity (LOEntityRef entity)
| Converts from a LOEntityRef to a LOEllipseRef. This is essentially a downcast operation so the given LOEntityRef must be convertible to a LOEllipseRef. More...
LO_EXPORT LOEntityRef | LOEllipseToEntity (LOEllipseRef ellipse)
| Converts from a LOEllipseRef to a LOEntityRef. This is essentially an upcast operation. More...

## Function Documentation

LO_RESULT LOEllipseAddReference | ( | LOEllipseRef | ellipse | ) |

Adds a reference to an ellipse object.

Parameters

  [in] | ellipse | The ellipse object.

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

LO_RESULT LOEllipseCreate | ( | LOEllipseRef * | ellipse,
|  | const LOAxisAlignedRect2D * | bounds
| ) |  |

Creates a new ellipse entity object.

Parameters

  [out] | ellipse | The newly created ellipse.
  [in] | bounds | The bounds of the ellipse.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_NULL_POINTER_OUTPUT if ellipse is NULL
  - SU_ERROR_OVERWRITE_VALID if *ellipse already refers to a valid object
  - SU_ERROR_NULL_POINTER_INPUT if bounds is NULL
  - SU_ERROR_OUT_OF_RANGE if bounds are not greater than (0, 0)

LO_EXPORT LOEllipseRef LOEllipseFromEntity | ( | LOEntityRef | entity | ) |

Converts from a LOEntityRef to a LOEllipseRef. This is essentially a downcast operation so the given LOEntityRef must be convertible to a LOEllipseRef.

Parameters

  [in] | entity | The entity object.

Returns
  - The converted LOEllipseRef if the downcast operation succeeds
  - If not, the returned reference will be invalid

LO_RESULT LOEllipseRelease | ( | LOEllipseRef * | ellipse | ) |

Releases an ellipse object. The object will be invalidated if releasing the last reference.

Parameters

  [in] | ellipse | The ellipse object.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_NULL_POINTER_INPUT if ellipse is NULL
  - SU_ERROR_INVALID_INPUT if *ellipse does not refer to a valid object

LO_EXPORT LOEntityRef LOEllipseToEntity | ( | LOEllipseRef | ellipse | ) |

Converts from a LOEllipseRef to a LOEntityRef. This is essentially an upcast operation.

Parameters

  [in] | ellipse | The ellipse object.

Returns
  - The converted LOEntityRef if ellipse is a valid object
  - If not, the returned reference will be invalid