LayOut C API
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
LayOutAPI
model
path.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_PATH_H_
5
#define LAYOUT_MODEL_PATH_H_
6
7
#include <
LayOutAPI/common.h
>
8
#include <
LayOutAPI/geometry/geometry.h
>
9
#include <
LayOutAPI/model/defs.h
>
10
21
typedef
enum
{
22
LOPathPointType_MoveTo
= 0,
23
LOPathPointType_LineTo
,
24
LOPathPointType_BezierTo
,
25
LOPathPointType_ArcCenter
,
26
LOPathPointType_BezierControl
,
27
LOPathPointType_Close
,
28
LONumPathPointTypes
29
}
LOPathPointType
;
30
36
typedef
enum
{
37
LOPathWindingType_None
= 0,
38
LOPathWindingType_Clockwise
,
39
LOPathWindingType_CounterClockwise
,
40
LONumPathWindingTypes
41
}
LOPathWindingType
;
42
43
#ifdef __cplusplus
44
extern
"C"
{
45
#endif // __cplusplus
46
61
LO_RESULT
LOPathCreate
(
LOPathRef
* path,
62
const
LOPoint2D
* start_point,
63
const
LOPoint2D
* end_point);
64
83
LO_RESULT
LOPathCreateBezier
(
LOPathRef
* path,
84
const
LOPoint2D
* start_point,
85
const
LOPoint2D
* control_point_1,
86
const
LOPoint2D
* control_point_2,
87
const
LOPoint2D
* end_point);
88
100
LO_RESULT
LOPathCreateFromRectangle
(
LOPathRef
* path,
LORectangleRef
rectangle);
101
113
LO_RESULT
LOPathCreateFromEllipse
(
LOPathRef
* path,
LOEllipseRef
ellipse);
114
130
LO_RESULT
LOPathCreateArc
(
LOPathRef
* path,
const
LOPoint2D
* center_point,
131
double
radius,
double
start_angle,
double
end_angle);
132
140
LO_RESULT
LOPathAddReference
(
LOPathRef
path);
141
151
LO_RESULT
LOPathRelease
(
LOPathRef
* path);
152
162
LO_EXPORT
LOPathRef
LOPathFromEntity
(
LOEntityRef
entity);
163
172
LO_EXPORT
LOEntityRef
LOPathToEntity
(
LOPathRef
path);
173
183
LO_RESULT
LOPathGetNumberOfPoints
(
LOPathRef
path,
size_t
* size);
184
198
LO_RESULT
LOPathGetPoints
(
LOPathRef
path,
199
size_t
points_size,
200
LOPoint2D
points[],
201
size_t
* number_of_points_copied);
202
214
LO_RESULT
LOPathGetPointAtIndex
(
LOPathRef
path,
215
size_t
point_index,
216
LOPoint2D
* point);
217
234
LO_RESULT
LOPathGetPointTypes
(
LOPathRef
path,
235
size_t
pointtypes_size,
236
LOPathPointType
pointtypes[],
237
size_t
* number_of_pointtypes_copied);
238
249
LO_RESULT
LOPathGetPointTypeAtIndex
(
LOPathRef
path,
250
size_t
point_index,
251
LOPathPointType
* pointtype);
252
262
LO_RESULT
LOPathGetStartPoint
(
LOPathRef
path,
263
LOPoint2D
* point);
264
274
LO_RESULT
LOPathGetEndPoint
(
LOPathRef
path,
275
LOPoint2D
* point);
276
289
LO_RESULT
LOPathCreateFromStartArrow
(
LOPathRef
* arrow_path,
290
LOPathRef
path);
291
304
LO_RESULT
LOPathCreateFromEndArrow
(
LOPathRef
* arrow_path,
305
LOPathRef
path);
306
316
LO_RESULT
LOPathGetClosed
(
LOPathRef
path,
317
bool
* is_closed);
318
328
LO_RESULT
LOPathGetParametricLength
(
LOPathRef
path,
329
double
* parametric_length);
330
343
LO_RESULT
LOPathGetPointAtParameter
(
LOPathRef
path,
344
double
parametric_value,
345
LOPoint2D
* point);
346
359
LO_RESULT
LOPathGetTangentAtParameter
(
LOPathRef
path,
360
double
parametric_value,
361
LOVector2D
* tangent);
362
380
LO_RESULT
LOPathGetCircle
(
LOPathRef
path,
bool
* is_circle,
LOPoint2D
* center,
381
double
* radius);
382
406
LO_RESULT
LOPathGetArc
(
LOPathRef
path,
bool
* is_arc,
LOPoint2D
* center,
407
double
* radius,
double
* start_angle,
double
* end_angle);
408
420
LO_RESULT
LOPathAppendLineTo
(
LOPathRef
path,
const
LOPoint2D
* point);
421
437
LO_RESULT
LOPathAppendBezierTo
(
LOPathRef
path,
438
const
LOPoint2D
* control_point_1,
439
const
LOPoint2D
* control_point_2,
440
const
LOPoint2D
* point);
441
456
LO_RESULT
LOPathAppendPathTo
(
LOPathRef
path,
LOPathRef
other_path);
457
468
LO_RESULT
LOPathClose
(
LOPathRef
path);
469
480
LO_RESULT
LOPathGetWindingType
(
LOPathRef
path,
LOPathWindingType
* winding);
481
482
#ifdef __cplusplus
483
}
// end extern "C"
484
#endif // __cplusplus
485
#endif // LAYOUT_MODEL_PATH_H_
Generated on Wed Sep 8 2021 14:15:26 for LayOut C API by
1.8.3.1