Debian Codegraph @

src/h/ST_polygon_t.java

raw symbols SCIP
1 /* ========================================================================
2 * PlantUML : a free UML diagram generator
3 * ========================================================================
4 *
5 * Project Info: http://plantuml.com
6 *
7 * If you like this project or if you find it useful, you can support us at:
8 *
9 * http://plantuml.com/patreon (only 1$ per month!)
10 * http://plantuml.com/paypal
11 *
12 * This file is part of Smetana.
13 * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
14 *
15 * (C) Copyright 2009-2020, Arnaud Roques
16 *
17 * This translation is distributed under the same Licence as the original C program:
18 *
19 *************************************************************************
20 * Copyright (c) 2011 AT&T Intellectual Property
21 * All rights reserved. This program and the accompanying materials
22 * are made available under the terms of the Eclipse Public License v1.0
23 * which accompanies this distribution, and is available at
24 * http://www.eclipse.org/legal/epl-v10.html
25 *
26 * Contributors: See CVS logs. Details at http://www.graphviz.org/
27 *************************************************************************
28 *
29 * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
30 * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
31 *
32 * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
33 * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
34 *
35 * You may obtain a copy of the License at
36 *
37 * http://www.eclipse.org/legal/epl-v10.html
38 *
39 * Unless required by applicable law or agreed to in writing, software
40 * distributed under the License is distributed on an "AS IS" BASIS,
41 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
42 * See the License for the specific language governing permissions and
43 * limitations under the License.
44 *
45 */
46 package h;
47
48 import smetana.core.HardcodedStruct;
49 import smetana.core.UnsupportedStructAndPtr;
50 import smetana.core.amiga.StarStruct;
51
52 public class ST_polygon_t extends UnsupportedStructAndPtr implements HardcodedStruct {
53
54 public int regular;
55 public int peripheries;
56 public int sides;
57 public double orientation;
58 public double distortion;
59 public double skew;
60 public int option;
61 public ST_pointf.Array vertices;
62
63 // "pointf *vertices",
64
65 public ST_polygon_t() {
66 this(null);
67 }
68
69 public ST_polygon_t(StarStruct parent) {
70 }
71
72
73
74 @Override
75 public void setInt(String fieldName, int data) {
76 if (fieldName.equals("regular")) {
77 this.regular = data;
78 return;
79 }
80 if (fieldName.equals("peripheries")) {
81 this.peripheries = data;
82 return;
83 }
84 if (fieldName.equals("sides")) {
85 this.sides = data;
86 return;
87 }
88 super.setInt(fieldName, data);
89 }
90
91 @Override
92 public void setDouble(String fieldName, double data) {
93 if (fieldName.equals("orientation")) {
94 this.orientation = data;
95 return;
96 }
97 if (fieldName.equals("distortion")) {
98 this.distortion = data;
99 return;
100 }
101 if (fieldName.equals("skew")) {
102 this.skew = data;
103 return;
104 }
105 super.setDouble(fieldName, data);
106 }
107
108
109 // public static List<String> DEFINITION = Arrays.asList(
110 // "typedef struct polygon_t",
111 // "{",
112 // "int regular",
113 // "int peripheries",
114 // "int sides",
115 // "double orientation",
116 // "double distortion",
117 // "double skew",
118 // "int option",
119 // "pointf *vertices",
120 // "}",
121 // "polygon_t");
122 }
123
124 // typedef struct polygon_t { /* mutable shape information for a node */
125 // int regular; /* true for symmetric shapes */
126 // int peripheries; /* number of periphery lines */
127 // int sides; /* number of sides */
128 // double orientation; /* orientation of shape (+ve degrees) */
129 // double distortion; /* distortion factor - as in trapezium */
130 // double skew; /* skew factor - as in parallelogram */
131 // int option; /* ROUNDED, DIAGONAL corners, etc. */
132 // pointf *vertices; /* array of vertex points */
133 // } polygon_t;