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
style.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_STYLE_H_
5 #define LAYOUT_MODEL_STYLE_H_
6
7 #include <LayOutAPI/common.h>
8 #include <LayOutAPI/model/defs.h>
9 #include <LayOutAPI/geometry/geometry.h>
10 #include <SketchUpAPI/color.h>
11
29 typedef enum {
30 LOStrokeJoinStyle_Miter = 0,
31 LOStrokeJoinStyle_Round,
32 LOStrokeJoinStyle_Bevel,
33 LONumStrokeJoinStyles
34 } LOStrokeJoinStyle;
35
40 typedef enum {
41 LOStrokeCapStyle_Flat = 0,
42 LOStrokeCapStyle_Round,
43 LOStrokeCapStyle_Square,
44 LONumStrokeCapStyles
45 } LOStrokeCapStyle;
46
51 typedef enum {
52 LOStrokePattern_Solid = 0,
53 LOStrokePattern_Dash,
54 LOStrokePattern_Dot,
55 LOStrokePattern_DashDot,
56 LOStrokePattern_DashDotDot,
57 LOStrokePattern_DashSpace,
58 LOStrokePattern_DashDotDotDot,
59 LOStrokePattern_DashDashDot,
60 LOStrokePattern_DashDashDotDot,
61 LOStrokePattern_DashDashDotDotDot,
62 LOStrokePattern_Center,
63 LOStrokePattern_Phantom,
64 LOStrokePattern_ShortDash,
65 LONumStrokePatterns
66 } LOStrokePattern;
67
72 typedef enum {
73 LOTextUnderline_None = 0,
74 LOTextUnderline_Single,
75 LOTextUnderline_Double,
76 LONumTextUnderlines
77 } LOTextUnderline;
78
84 typedef enum {
85 LOTextStrikeThrough_None = 0,
86 LOTextStrikeThrough_Single,
87 LONumTextStrikeThroughs
88 } LOTextStrikeThrough;
89
94 typedef enum {
95 LOTextElevation_Normal = 0,
96 LOTextElevation_Superscript,
97 LOTextElevation_Subscript,
98 LONumTextElevations
99 } LOTextElevation;
100
105 typedef enum {
106 LOTextAlignment_Left = 0,
107 LOTextAlignment_Right,
108 LOTextAlignment_Center,
109 LONumTextAlignments
110 } LOTextAlignment;
111
116 typedef enum {
117 LOTextAnchor_Top = 0,
118 LOTextAnchor_Center,
119 LOTextAnchor_Bottom,
120 LONumTextAnchors
121 } LOTextAnchor;
122
127 typedef enum {
128 LODimensionRotationAlignment_Horizontal = 0,
129 LODimensionRotationAlignment_Vertical,
130 LODimensionRotationAlignment_Align,
131 LODimensionRotationAlignment_Perpendicular,
132
133 LONumDimensionRotationAlignments
134 } LODimensionRotationAlignment;
135
142 typedef enum {
143 LODimensionVerticalAlignment_Above = 0,
144 LODimensionVerticalAlignment_Center,
145 LODimensionVerticalAlignment_Below,
146 LODimensionVerticalAlignment_Offset,
147 LONumDimensionVerticalAlignments
148 } LODimensionVerticalAlignment;
149
155 typedef enum {
156 // Linear dimension units
157 LODimensionUnits_FractionalInches = 0,
158 LODimensionUnits_ArchitecturalInches,
159 LODimensionUnits_EngineeringFeet,
160 LODimensionUnits_DecimalInches,
161 LODimensionUnits_DecimalFeet,
162 LODimensionUnits_DecimalMillimeters,
163 LODimensionUnits_DecimalCentimeters,
164 LODimensionUnits_DecimalMeters,
165 LODimensionUnits_DecimalPoints,
166
167 // Angular dimension units
168 LODimensionUnits_Degrees,
169 LODimensionUnits_Radians,
170
171 LONumDimensionUnits
172 } LODimensionUnits;
173
174
175
180 typedef enum {
181 LOArrowType_None = 0,
182 LOArrowType_FilledTriangle,
183 LOArrowType_OpenTriangle,
184 LOArrowType_FilledSkinnyTriangle,
185 LOArrowType_OpenSkinnyTriangle,
186 LOArrowType_OpenArrow90,
187 LOArrowType_OpenArrow120,
188 LOArrowType_FilledCircle,
189 LOArrowType_OpenCircle,
190 LOArrowType_FilledSquare,
191 LOArrowType_OpenSquare,
192 LOArrowType_FilledDiamond,
193 LOArrowType_OpenDiamond,
194 LOArrowType_Star,
195 LOArrowType_T,
196 LOArrowType_SlashRight,
197 LOArrowType_SlashLeft,
198 LOArrowType_Underrun,
199 LOArrowType_Overrun,
200 LONumArrowTypes
201 } LOArrowType;
202
208 typedef enum {
209 LOSubEntityType_LabelLeaderLine = 0,
210 LOSubEntityType_LabelText,
211 LOSubEntityType_DimensionStartExtensionLine,
212 LOSubEntityType_DimensionEndExtensionLine,
213 LOSubEntityType_DimensionDimensionLine,
214 LOSubEntityType_DimensionLeaderLine,
215 LOSubEntityType_DimensionText,
216 LONumSubEntityTypes
217 } LOSubEntityType;
218
219 #ifdef __cplusplus
220 extern "C" {
221 #endif // __cplusplus
222
231 LO_RESULT LOStyleCreate(LOStyleRef* style);
232
241 LO_RESULT LOStyleRelease(LOStyleRef* style);
242
252 LO_RESULT LOStyleCopy(LOStyleRef src_style, LOStyleRef dst_style);
253
265 LO_RESULT LOStyleGetStroked(LOStyleRef style, bool* is_stroked);
266
275 LO_RESULT LOStyleSetStroked(LOStyleRef style, bool is_stroked);
276
288 LO_RESULT LOStyleGetStrokeWidth(LOStyleRef style, double* stroke_width);
289
299 LO_RESULT LOStyleSetStrokeWidth(LOStyleRef style, double stroke_width);
300
312 LO_RESULT LOStyleGetStrokeColor(LOStyleRef style, SUColor* stroke_color);
313
322 LO_RESULT LOStyleSetStrokeColor(LOStyleRef style, SUColor stroke_color);
323
335 LO_RESULT LOStyleGetStrokeJoinStyle(LOStyleRef style, LOStrokeJoinStyle* join_type);
336
346 LO_RESULT LOStyleSetStrokeJoinStyle(LOStyleRef style, LOStrokeJoinStyle join_type);
347
359 LO_RESULT LOStyleGetStrokeCapStyle(LOStyleRef style, LOStrokeCapStyle* cap_type);
360
370 LO_RESULT LOStyleSetStrokeCapStyle(LOStyleRef style, LOStrokeCapStyle cap_type);
371
383 LO_RESULT LOStyleGetStrokePattern(LOStyleRef style, LOStrokePattern* stroke_pattern);
384
394 LO_RESULT LOStyleSetStrokePattern(LOStyleRef style, LOStrokePattern stroke_pattern);
395
407 LO_RESULT LOStyleGetStrokePatternScale(LOStyleRef style, double* pattern_scale);
408
419 LO_RESULT LOStyleSetStrokePatternScale(LOStyleRef style, double pattern_scale);
420
432 LO_RESULT LOStyleGetSolidFilled(LOStyleRef style, bool* solid_filled);
433
442 LO_RESULT LOStyleSetSolidFilled(LOStyleRef style, bool solid_filled);
443
455 LO_RESULT LOStyleGetSolidFillColor(LOStyleRef style, SUColor* fill_color);
456
465 LO_RESULT LOStyleSetSolidFillColor(LOStyleRef style, SUColor fill_color);
466
478 LO_RESULT LOStyleGetPatternFilled(LOStyleRef style, bool* pattern_filled);
479
488 LO_RESULT LOStyleSetPatternFilled(LOStyleRef style, bool pattern_filled);
489
504 LO_RESULT LOStyleGetPatternFillImagePath(LOStyleRef style, SUStringRef* image_path);
505
517 LO_RESULT LOStyleSetPatternFillImagePath(LOStyleRef style, const char* image_path);
518
530 LO_RESULT LOStyleGetPatternFillRotation(LOStyleRef style, double* rotation);
531
541 LO_RESULT LOStyleSetPatternFillRotation(LOStyleRef style, double rotation);
542
554 LO_RESULT LOStyleGetPatternFillScale(LOStyleRef style, double* scale);
555
567 LO_RESULT LOStyleSetPatternFillScale(LOStyleRef style, double scale);
568
580 LO_RESULT LOStyleGetPatternFillOrigin(LOStyleRef style, LOPoint2D* origin);
581
591 LO_RESULT LOStyleSetPatternFillOrigin(LOStyleRef style, const LOPoint2D* origin);
592
605 LO_RESULT LOStyleGetTextFontFamily(LOStyleRef style, SUStringRef* family);
606
616 LO_RESULT LOStyleSetTextFontFamily(LOStyleRef style, const char* family);
617
629 LO_RESULT LOStyleGetTextBold(LOStyleRef style, bool* is_bold);
630
639 LO_RESULT LOStyleSetTextBold(LOStyleRef style, bool is_bold);
640
652 LO_RESULT LOStyleGetTextItalic(LOStyleRef style, bool* is_italic);
653
662 LO_RESULT LOStyleSetTextItalic(LOStyleRef style, bool is_italic);
663
675 LO_RESULT LOStyleGetFontSize(LOStyleRef style, double* size_in_points);
676
687 LO_RESULT LOStyleSetFontSize(LOStyleRef style, double size_in_points);
688
700 LO_RESULT LOStyleGetTextColor(LOStyleRef style, SUColor* color);
701
710 LO_RESULT LOStyleSetTextColor(LOStyleRef style, SUColor color);
711
723 LO_RESULT LOStyleGetTextUnderline(LOStyleRef style, LOTextUnderline* underline_type);
724
734 LO_RESULT LOStyleSetTextUnderline(LOStyleRef style, LOTextUnderline underline_type);
735
748 LO_RESULT LOStyleGetTextStrikeThrough(LOStyleRef style, LOTextStrikeThrough* strikethrough_type);
749
760 LO_RESULT LOStyleSetTextStrikeThrough(LOStyleRef style, LOTextStrikeThrough strikethrough_type);
761
774 LO_RESULT LOStyleGetTextElevation(LOStyleRef style, LOTextElevation* elevation_type);
775
785 LO_RESULT LOStyleSetTextElevation(LOStyleRef style, LOTextElevation elevation_type);
786
798 LO_RESULT LOStyleGetTextAlignment(LOStyleRef style, LOTextAlignment* alignment_type);
799
809 LO_RESULT LOStyleSetTextAlignment(LOStyleRef style, LOTextAlignment alignment_type);
810
822 LO_RESULT LOStyleGetTextAnchor(LOStyleRef style, LOTextAnchor* anchor_type);
823
833 LO_RESULT LOStyleSetTextAnchor(LOStyleRef style, LOTextAnchor anchor_type);
834
846 LO_RESULT LOStyleGetDimensionRotationAlignment(
847 LOStyleRef style, LODimensionRotationAlignment* alignment);
848
858 LO_RESULT LOStyleSetDimensionRotationAlignment(
859 LOStyleRef style, LODimensionRotationAlignment alignment);
860
872 LO_RESULT LOStyleGetDimensionVerticalAlignment(
873 LOStyleRef style, LODimensionVerticalAlignment* alignment);
874
886 LO_RESULT LOStyleSetDimensionVerticalAlignment(
887 LOStyleRef style, LODimensionVerticalAlignment alignment);
888
903 LO_RESULT LOStyleGetDimensionUnits(LOStyleRef style, LODimensionUnits* units, double* precision);
904
921 LO_RESULT LOStyleSetDimensionUnits(LOStyleRef style, LODimensionUnits units, double precision);
922
934 LO_RESULT LOStyleGetSuppressDimensionUnits(LOStyleRef style, bool* is_suppressed);
935
944 LO_RESULT LOStyleSetSuppressDimensionUnits(LOStyleRef style, bool is_suppressed);
945
946
947
948
949
959 LO_RESULT LOStrokePatternGetMaximumNumberOfWidths(size_t* num_widths);
960
978 LO_RESULT LOStrokePatternGetWidths(
979 LOStrokePattern stroke_pattern, size_t len, double widths[], size_t* num_widths);
980
991 LO_RESULT LOStyleGetStartArrowType(LOStyleRef style, LOArrowType* type);
992
1002 LO_RESULT LOStyleSetStartArrowType(LOStyleRef style, LOArrowType type);
1003
1014 LO_RESULT LOStyleGetStartArrowSize(LOStyleRef style, double* size);
1015
1025 LO_RESULT LOStyleSetStartArrowSize(LOStyleRef style, double size);
1026
1037 LO_RESULT LOStyleGetEndArrowType(LOStyleRef style, LOArrowType* type);
1038
1048 LO_RESULT LOStyleSetEndArrowType(LOStyleRef style, LOArrowType type);
1049
1060 LO_RESULT LOStyleGetEndArrowSize(LOStyleRef style, double* size);
1061
1071 LO_RESULT LOStyleSetEndArrowSize(LOStyleRef style, double size);
1072
1082 LO_RESULT LOStyleIsArrowTypeFilled(LOArrowType type, bool* filled);
1083
1096 LO_RESULT LOStyleSetSubEntityStyle(LOStyleRef style, LOSubEntityType type, LOStyleRef sub_style);
1097
1111 LO_RESULT LOStyleGetSubEntityStyle(LOStyleRef style, LOSubEntityType type, LOStyleRef* sub_style);
1112
1113 #ifdef __cplusplus
1114 } // end extern "C"
1115 #endif // __cplusplus
1116 #endif // LAYOUT_MODEL_STYLE_H_