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
rectangle.h
Go to the documentation of this file.
1 // Copyright 2015 Trimble Navigation Ltd. All rights reserved.
2 // This file is intended for public distribution.
3
4 #ifndef LAYOUT_MODEL_RECTANGLE_H_
5 #define LAYOUT_MODEL_RECTANGLE_H_
6
7 #include <LayOutAPI/common.h>
8 #include <LayOutAPI/geometry/geometry.h>
9 #include <LayOutAPI/model/defs.h>
10
20 typedef enum {
21 LORectangleType_Normal = 0,
22 LORectangleType_Rounded,
23 LORectangleType_Lozenge,
24
25 LORectangleType_Bulged,
26
27 LONumRectangleTypes
28 } LORectangleType;
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif // __cplusplus
33
45 LO_RESULT LORectangleCreate(LORectangleRef* rectangle, const LOAxisAlignedRect2D* bounds);
46
60 LO_RESULT LORectangleCreateRounded(
61 LORectangleRef* rectangle, const LOAxisAlignedRect2D* bounds, double corner_radius);
73 LO_RESULT LORectangleCreateLozenge(LORectangleRef* rectangle, const LOAxisAlignedRect2D* bounds);
88 LO_RESULT LORectangleCreateBulged(
89 LORectangleRef* rectangle, const LOAxisAlignedRect2D* bounds, double bulge_distance);
90
98 LO_RESULT LORectangleAddReference(LORectangleRef rectangle);
99
109 LO_RESULT LORectangleRelease(LORectangleRef* rectangle);
110
120 LO_EXPORT LORectangleRef LORectangleFromEntity(LOEntityRef entity);
121
130 LO_EXPORT LOEntityRef LORectangleToEntity(LORectangleRef rectangle);
131
143 LO_RESULT LORectangleGetTopLeftPoint(LORectangleRef rectangle, LOPoint2D* point);
144
156 LO_RESULT LORectangleGetTopRightPoint(LORectangleRef rectangle, LOPoint2D* point);
157
169 LO_RESULT LORectangleGetBottomLeftPoint(LORectangleRef rectangle, LOPoint2D* point);
170
182 LO_RESULT LORectangleGetBottomRightPoint(LORectangleRef rectangle, LOPoint2D* point);
183
193 LO_RESULT LORectangleGetRectangleType(LORectangleRef rectangle, LORectangleType* type);
194
206 LO_RESULT LORectangleSetRectangleType(LORectangleRef rectangle, LORectangleType type);
207
220 LO_RESULT LORectangleGetRadius(LORectangleRef rectangle, double* radius);
221
235 LO_RESULT LORectangleSetRadius(LORectangleRef rectangle, double radius);
236
237 #ifdef __cplusplus
238 } // end extern "C"
239 #endif // __cplusplus
240 #endif // LAYOUT_MODEL_RECTANGLE_H_