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
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,
const
LOPoint2D
* start_point,
const
LOPoint2D
* end_point);
62
81
LO_RESULT
LOPathCreateBezier
(
82
LOPathRef
* path,
const
LOPoint2D
* start_point,
const
LOPoint2D
* control_point_1,
83
const
LOPoint2D
* control_point_2,
const
LOPoint2D
* end_point);
84
96
LO_RESULT
LOPathCreateFromRectangle
(
LOPathRef
* path,
LORectangleRef
rectangle);
97
109
LO_RESULT
LOPathCreateFromEllipse
(
LOPathRef
* path,
LOEllipseRef
ellipse);
110
126
LO_RESULT
LOPathCreateArc
(
127
LOPathRef
* path,
const
LOPoint2D
* center_point,
double
radius,
double
start_angle,
128
double
end_angle);
129
137
LO_RESULT
LOPathAddReference
(
LOPathRef
path);
138
148
LO_RESULT
LOPathRelease
(
LOPathRef
* path);
149
159
LO_EXPORT
LOPathRef
LOPathFromEntity
(
LOEntityRef
entity);
160
169
LO_EXPORT
LOEntityRef
LOPathToEntity
(
LOPathRef
path);
170
180
LO_RESULT
LOPathGetNumberOfPoints
(
LOPathRef
path,
size_t
* size);
181
195
LO_RESULT
LOPathGetPoints
(
196
LOPathRef
path,
size_t
points_size,
LOPoint2D
points[],
size_t
* number_of_points_copied);
197
209
LO_RESULT
LOPathGetPointAtIndex
(
LOPathRef
path,
size_t
point_index,
LOPoint2D
* point);
210
227
LO_RESULT
LOPathGetPointTypes
(
228
LOPathRef
path,
size_t
pointtypes_size,
LOPathPointType
pointtypes[],
229
size_t
* number_of_pointtypes_copied);
230
241
LO_RESULT
LOPathGetPointTypeAtIndex
(
LOPathRef
path,
size_t
point_index,
LOPathPointType
* pointtype);
242
252
LO_RESULT
LOPathGetStartPoint
(
LOPathRef
path,
LOPoint2D
* point);
253
263
LO_RESULT
LOPathGetEndPoint
(
LOPathRef
path,
LOPoint2D
* point);
264
277
LO_RESULT
LOPathCreateFromStartArrow
(
LOPathRef
* arrow_path,
LOPathRef
path);
278
291
LO_RESULT
LOPathCreateFromEndArrow
(
LOPathRef
* arrow_path,
LOPathRef
path);
292
302
LO_RESULT
LOPathGetClosed
(
LOPathRef
path,
bool
* is_closed);
303
313
LO_RESULT
LOPathGetParametricLength
(
LOPathRef
path,
double
* parametric_length);
314
327
LO_RESULT
LOPathGetPointAtParameter
(
LOPathRef
path,
double
parametric_value,
LOPoint2D
* point);
328
341
LO_RESULT
LOPathGetTangentAtParameter
(
LOPathRef
path,
double
parametric_value,
LOVector2D
* tangent);
342
360
LO_RESULT
LOPathGetCircle
(
LOPathRef
path,
bool
* is_circle,
LOPoint2D
* center,
double
* radius);
361
385
LO_RESULT
LOPathGetArc
(
386
LOPathRef
path,
bool
* is_arc,
LOPoint2D
* center,
double
* radius,
double
* start_angle,
387
double
* end_angle);
388
400
LO_RESULT
LOPathAppendLineTo
(
LOPathRef
path,
const
LOPoint2D
* point);
401
417
LO_RESULT
LOPathAppendBezierTo
(
418
LOPathRef
path,
const
LOPoint2D
* control_point_1,
const
LOPoint2D
* control_point_2,
419
const
LOPoint2D
* point);
420
435
LO_RESULT
LOPathAppendPathTo
(
LOPathRef
path,
LOPathRef
other_path);
436
447
LO_RESULT
LOPathClose
(
LOPathRef
path);
448
459
LO_RESULT
LOPathGetWindingType
(
LOPathRef
path,
LOPathWindingType
* winding);
460
461
#ifdef __cplusplus
462
}
// end extern "C"
463
#endif // __cplusplus
464
#endif // LAYOUT_MODEL_PATH_H_
Generated on Fri Mar 1 2024 11:17:19 for LayOut C API by
1.8.3.1