Debian Codegraph @

src/gen/lib/common/postproc__c.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 gen.lib.common;
47 import static gen.lib.cgraph.attr__c.agattr;
48 import static gen.lib.cgraph.edge__c.agfstout;
49 import static gen.lib.cgraph.edge__c.aghead;
50 import static gen.lib.cgraph.edge__c.agnxtout;
51 import static gen.lib.cgraph.edge__c.agtail;
52 import static gen.lib.cgraph.graph__c.agnnodes;
53 import static gen.lib.cgraph.id__c.agnameof;
54 import static gen.lib.cgraph.node__c.agfstnode;
55 import static gen.lib.cgraph.node__c.agnxtnode;
56 import static gen.lib.cgraph.obj__c.agroot;
57 import static gen.lib.common.geom__c.ccwrotatepf;
58 import static gen.lib.common.splines__c.edgeMidpoint;
59 import static gen.lib.common.splines__c.getsplinepoints;
60 import static gen.lib.common.utils__c.late_bool;
61 import static gen.lib.common.utils__c.updateBB;
62 import static gen.lib.label.xlabels__c.placeLabels;
63 import static smetana.core.JUtils.NEQ;
64 import static smetana.core.JUtilsDebug.ENTERING;
65 import static smetana.core.JUtilsDebug.LEAVING;
66 import static smetana.core.Macro.AGRAPH;
67 import static smetana.core.Macro.ED_edge_type;
68 import static smetana.core.Macro.ED_head_label;
69 import static smetana.core.Macro.ED_label;
70 import static smetana.core.Macro.ED_spl;
71 import static smetana.core.Macro.ED_tail_label;
72 import static smetana.core.Macro.ED_xlabel;
73 import static smetana.core.Macro.GD_bb;
74 import static smetana.core.Macro.GD_border;
75 import static smetana.core.Macro.GD_clust;
76 import static smetana.core.Macro.GD_flags;
77 import static smetana.core.Macro.GD_flip;
78 import static smetana.core.Macro.GD_has_labels;
79 import static smetana.core.Macro.GD_label;
80 import static smetana.core.Macro.GD_label_pos;
81 import static smetana.core.Macro.GD_n_cluster;
82 import static smetana.core.Macro.GD_rankdir;
83 import static smetana.core.Macro.INT_MAX;
84 import static smetana.core.Macro.MAX;
85 import static smetana.core.Macro.MIN;
86 import static smetana.core.Macro.N;
87 import static smetana.core.Macro.ND_coord;
88 import static smetana.core.Macro.ND_height;
89 import static smetana.core.Macro.ND_width;
90 import static smetana.core.Macro.ND_xlabel;
91 import static smetana.core.Macro.NOTI;
92 import static smetana.core.Macro.UNSUPPORTED;
93 import h.ST_Agedge_s;
94 import h.ST_Agnode_s;
95 import h.ST_Agraph_s;
96 import h.ST_Agsym_s;
97 import h.ST_bezier;
98 import h.ST_boxf;
99 import h.ST_cinfo_t;
100 import h.ST_label_params_t;
101 import h.ST_object_t;
102 import h.ST_pointf;
103 import h.ST_splines;
104 import h.ST_textlabel_t;
105 import h.ST_xlabel_t;
106 import smetana.core.CString;
107 import smetana.core.Memory;
108 import smetana.core.Z;
109
110 public class postproc__c {
111 //1 2digov3edok6d5srhgtlmrycs
112 // extern lt_symlist_t lt_preloaded_symbols[]
113
114
115 //1 baedz5i9est5csw3epz3cv7z
116 // typedef Ppoly_t Ppolyline_t
117
118
119 //1 9k44uhd5foylaeoekf3llonjq
120 // extern Dtmethod_t* Dtset
121
122
123 //1 1ahfywsmzcpcig2oxm7pt9ihj
124 // extern Dtmethod_t* Dtbag
125
126
127 //1 anhghfj3k7dmkudy2n7rvt31v
128 // extern Dtmethod_t* Dtoset
129
130
131 //1 5l6oj1ux946zjwvir94ykejbc
132 // extern Dtmethod_t* Dtobag
133
134
135 //1 2wtf222ak6cui8cfjnw6w377z
136 // extern Dtmethod_t* Dtlist
137
138
139 //1 d1s1s6ibtcsmst88e3057u9r7
140 // extern Dtmethod_t* Dtstack
141
142
143 //1 axa7mflo824p6fspjn1rdk0mt
144 // extern Dtmethod_t* Dtqueue
145
146
147 //1 ega812utobm4xx9oa9w9ayij6
148 // extern Dtmethod_t* Dtdeque
149
150
151 //1 cyfr996ur43045jv1tjbelzmj
152 // extern Dtmethod_t* Dtorder
153
154
155 //1 wlofoiftbjgrrabzb2brkycg
156 // extern Dtmethod_t* Dttree
157
158
159 //1 12bds94t7voj7ulwpcvgf6agr
160 // extern Dtmethod_t* Dthash
161
162
163 //1 9lqknzty480cy7zsubmabkk8h
164 // extern Dtmethod_t _Dttree
165
166
167 //1 bvn6zkbcp8vjdhkccqo1xrkrb
168 // extern Dtmethod_t _Dthash
169
170
171 //1 9lidhtd6nsmmv3e7vjv9e10gw
172 // extern Dtmethod_t _Dtlist
173
174
175 //1 34ujfamjxo7xn89u90oh2k6f8
176 // extern Dtmethod_t _Dtqueue
177
178
179 //1 3jy4aceckzkdv950h89p4wjc8
180 // extern Dtmethod_t _Dtstack
181
182
183 //1 8dfqgf3u1v830qzcjqh9o8ha7
184 // extern Agmemdisc_t AgMemDisc
185
186
187 //1 18k2oh2t6llfsdc5x0wlcnby8
188 // extern Agiddisc_t AgIdDisc
189
190
191 //1 a4r7hi80gdxtsv4hdoqpyiivn
192 // extern Agiodisc_t AgIoDisc
193
194
195 //1 bnzt5syjb7mgeru19114vd6xx
196 // extern Agdisc_t AgDefaultDisc
197
198
199 //1 35y2gbegsdjilegaribes00mg
200 // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected
201
202
203 //1 c2rygslq6bcuka3awmvy2b3ow
204 // typedef Agsubnode_t Agnoderef_t
205
206
207 //1 xam6yv0dcsx57dtg44igpbzn
208 // typedef Dtlink_t Agedgeref_t
209
210
211 //1 nye6dsi1twkbddwo9iffca1j
212 // extern char *Version
213
214
215 //1 65mu6k7h7lb7bx14jpiw7iyxr
216 // extern char **Files
217
218
219 //1 2rpjdzsdyrvomf00zcs3u3dyn
220 // extern const char **Lib
221
222
223 //1 6d2f111lntd2rsdt4gswh5909
224 // extern char *CmdName
225
226
227 //1 a0ltq04fpeg83soa05a2fkwb2
228 // extern char *specificFlags
229
230
231 //1 1uv30qeqq2jh6uznlr4dziv0y
232 // extern char *specificItems
233
234
235 //1 7i4hkvngxe3x7lmg5h6b3t9g3
236 // extern char *Gvfilepath
237
238
239 //1 9jp96pa73kseya3w6sulxzok6
240 // extern char *Gvimagepath
241
242
243 //1 40ylumfu7mrvawwf4v2asvtwk
244 // extern unsigned char Verbose
245
246
247 //1 93st8awjy1z0h07n28qycbaka
248 // extern unsigned char Reduce
249
250
251 //1 f2vs67ts992erf8onwfglurzp
252 // extern int MemTest
253
254
255 //1 c6f8whijgjwwagjigmxlwz3gb
256 // extern char *HTTPServerEnVar
257
258
259 //1 cp4hzj7p87m7arw776d3bt7aj
260 // extern char *Output_file_name
261
262
263 //1 a3rqagofsgraie6mx0krzkgsy
264 // extern int graphviz_errors
265
266
267 //1 5up05203r4kxvjn1m4njcgq5x
268 // extern int Nop
269
270
271 //1 umig46cco431x14b3kosde2t
272 // extern double PSinputscale
273
274
275 //1 52bj6v8fqz39khasobljfukk9
276 // extern int Syntax_errors
277
278
279 //1 9ekf2ina8fsjj6y6i0an6somj
280 // extern int Show_cnt
281
282
283 //1 38di5qi3nkxkq65onyvconk3r
284 // extern char** Show_boxes
285
286
287 //1 6ri6iu712m8mpc7t2670etpcw
288 // extern int CL_type
289
290
291 //1 bomxiw3gy0cgd1ydqtek7fpxr
292 // extern unsigned char Concentrate
293
294
295 //1 cqy3gqgcq8empdrbnrhn84058
296 // extern double Epsilon
297
298
299 //1 64slegfoouqeg0rmbyjrm8wgr
300 // extern int MaxIter
301
302
303 //1 88wdinpnmfs4mab4aw62yb0bg
304 // extern int Ndim
305
306
307 //1 8bbad3ogcelqnnvo5br5s05gq
308 // extern int State
309
310
311 //1 17rnd8q45zclfn68qqst2vxxn
312 // extern int EdgeLabelsDone
313
314
315 //1 ymx1z4s8cznjifl2d9f9m8jr
316 // extern double Initial_dist
317
318
319 //1 a33bgl0c3uqb3trx419qulj1x
320 // extern double Damping
321
322
323 //1 d9lvrpjg1r0ojv40pod1xwk8n
324 // extern int Y_invert
325
326
327 //1 71efkfs77q5tq9ex6y0f4kanh
328 // extern int GvExitOnUsage
329
330
331 //1 4xy2dkdkv0acs2ue9eca8hh2e
332 // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin
333
334
335 //1 9js5gxgzr74eakgtfhnbws3t9
336 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle
337
338
339 //1 anqllp9sj7wo45w6bm11j8trn
340 // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth
341
342
343 //1 bh0z9puipqw7gymjd5h5b8s6i
344 // extern struct fdpParms_s* fdp_parms
345
346
347
348
349 //3 ciez0pfggxdljedzsbklq49f0
350 // static inline point pointof(int x, int y)
351 public static Object pointof(Object... arg) {
352 UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y)
353 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
354 UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r;
355 UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x;
356 UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y;
357 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
358 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
359
360 throw new UnsupportedOperationException();
361 }
362
363
364
365
366 //3 c1s4k85p1cdfn176o3uryeros
367 // static inline pointf pointfof(double x, double y)
368 public static ST_pointf pointfof(double x, double y) {
369 // WARNING!! STRUCT
370 return pointfof_w_(x, y).copy();
371 }
372 private static ST_pointf pointfof_w_(double x, double y) {
373 ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
374 try {
375 final ST_pointf r = new ST_pointf();
376 r.setDouble("x", x);
377 r.setDouble("y", y);
378 return r;
379 } finally {
380 LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof");
381 }
382 }
383
384
385
386
387 //3 7cufnfitrh935ew093mw0i4b7
388 // static inline box boxof(int llx, int lly, int urx, int ury)
389 public static Object boxof(Object... arg) {
390 UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury)
391 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
392 UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b;
393 UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly;
394 UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury;
395 UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b;
396 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
397
398 throw new UnsupportedOperationException();
399 }
400
401
402
403
404
405
406
407 //3 1n5xl70wxuabyf97mclvilsm6
408 // static inline point add_point(point p, point q)
409 public static Object add_point(Object... arg) {
410 UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q)
411 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
412 UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r;
413 UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x;
414 UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y;
415 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
416 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
417
418 throw new UnsupportedOperationException();
419 }
420
421
422
423
424 //3 arrsbik9b5tnfcbzsm8gr2chx
425 // static inline pointf add_pointf(pointf p, pointf q)
426 public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
427 // WARNING!! STRUCT
428 return add_pointf_w_(p.copy(), q.copy()).copy();
429 }
430 private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
431 ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
432 try {
433 final ST_pointf r = new ST_pointf();
434 r.setDouble("x", p.x + q.x);
435 r.setDouble("y", p.y + q.y);
436 return r;
437 } finally {
438 LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
439 }
440 }
441
442
443
444
445 //3 ai2dprak5y6obdsflguh5qbd7
446 // static inline point sub_point(point p, point q)
447 public static Object sub_point(Object... arg) {
448 UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q)
449 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
450 UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r;
451 UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x;
452 UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y;
453 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
454 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
455
456 throw new UnsupportedOperationException();
457 }
458
459
460
461
462 //3 16f6pyogcv3j7n2p0n8giqqgh
463 // static inline pointf sub_pointf(pointf p, pointf q)
464 public static Object sub_pointf(Object... arg) {
465 UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q)
466 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
467 UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r;
468 UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x;
469 UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y;
470 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
471 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
472
473 throw new UnsupportedOperationException();
474 }
475
476
477
478
479 //3 9k50jgrhc4f9824vf8ony74rw
480 // static inline point mid_point(point p, point q)
481 public static Object mid_point(Object... arg) {
482 UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q)
483 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
484 UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r;
485 UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2;
486 UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2;
487 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
488 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
489
490 throw new UnsupportedOperationException();
491 }
492
493
494
495
496 //3 59c4f7im0ftyowhnzzq2v9o1x
497 // static inline pointf mid_pointf(pointf p, pointf q)
498 public static Object mid_pointf(Object... arg) {
499 UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q)
500 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
501 UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r;
502 UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.;
503 UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.;
504 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
505 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
506
507 throw new UnsupportedOperationException();
508 }
509
510
511
512
513 //3 5r18p38gisvcx3zsvbb9saixx
514 // static inline pointf interpolate_pointf(double t, pointf p, pointf q)
515 public static Object interpolate_pointf(Object... arg) {
516 UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q)
517 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
518 UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r;
519 UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x);
520 UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y);
521 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
522 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
523
524 throw new UnsupportedOperationException();
525 }
526
527
528
529
530 //3 bxzrv2ghq04qk5cbyy68s4mol
531 // static inline point exch_xy(point p)
532 public static Object exch_xy(Object... arg) {
533 UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p)
534 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
535 UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r;
536 UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y;
537 UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x;
538 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
539 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
540
541 throw new UnsupportedOperationException();
542 }
543
544
545
546
547 //3 9lt3e03tac6h6sydljrcws8fd
548 // static inline pointf exch_xyf(pointf p)
549 public static Object exch_xyf(Object... arg) {
550 UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p)
551 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
552 UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r;
553 UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y;
554 UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x;
555 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
556 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
557
558 throw new UnsupportedOperationException();
559 }
560
561
562
563
564 //3 8l9qhieokthntzdorlu5zn29b
565 // static inline box box_bb(box b0, box b1)
566 public static Object box_bb(Object... arg) {
567 UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1)
568 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
569 UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b;
570 UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x);
571 UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y);
572 UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x);
573 UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y);
574 UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b;
575 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
576
577 throw new UnsupportedOperationException();
578 }
579
580
581
582
583 //3 clws9h3bbjm0lw3hexf8nl4c4
584 // static inline boxf boxf_bb(boxf b0, boxf b1)
585 public static Object boxf_bb(Object... arg) {
586 UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1)
587 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
588 UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b;
589 UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x);
590 UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y);
591 UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x);
592 UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y);
593 UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b;
594 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
595
596 throw new UnsupportedOperationException();
597 }
598
599
600
601
602 //3 bit6ycxo1iqd2al92y8gkzlvb
603 // static inline box box_intersect(box b0, box b1)
604 public static Object box_intersect(Object... arg) {
605 UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1)
606 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
607 UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b;
608 UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x);
609 UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y);
610 UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x);
611 UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y);
612 UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b;
613 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
614
615 throw new UnsupportedOperationException();
616 }
617
618
619
620
621 //3 8gfybie7k6pgb3o1a6llgpwng
622 // static inline boxf boxf_intersect(boxf b0, boxf b1)
623 public static Object boxf_intersect(Object... arg) {
624 UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1)
625 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
626 UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b;
627 UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x);
628 UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y);
629 UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x);
630 UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y);
631 UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b;
632 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
633
634 throw new UnsupportedOperationException();
635 }
636
637
638
639
640 //3 7z8j2quq65govaaejrz7b4cvb
641 // static inline int box_overlap(box b0, box b1)
642 public static Object box_overlap(Object... arg) {
643 UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1)
644 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
645 UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1);
646 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
647
648 throw new UnsupportedOperationException();
649 }
650
651
652
653
654 //3 4z0suuut2acsay5m8mg9dqjdu
655 // static inline int boxf_overlap(boxf b0, boxf b1)
656 public static Object boxf_overlap(Object... arg) {
657 UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1)
658 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
659 UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1);
660 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
661
662 throw new UnsupportedOperationException();
663 }
664
665
666
667
668 //3 dd34swz5rmdgu3a2np2a4h1dy
669 // static inline int box_contains(box b0, box b1)
670 public static Object box_contains(Object... arg) {
671 UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1)
672 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
673 UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1);
674 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
675
676 throw new UnsupportedOperationException();
677 }
678
679
680
681
682 //3 8laj1bspbu2i1cjd9upr7xt32
683 // static inline int boxf_contains(boxf b0, boxf b1)
684 public static Object boxf_contains(Object... arg) {
685 UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1)
686 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
687 UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1);
688 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
689
690 throw new UnsupportedOperationException();
691 }
692
693
694
695
696 //3 4wf5swkz24xx51ja2dynbycu1
697 // static inline pointf perp (pointf p)
698 public static Object perp(Object... arg) {
699 UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p)
700 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
701 UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r;
702 UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y;
703 UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x;
704 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
705 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
706
707 throw new UnsupportedOperationException();
708 }
709
710
711
712
713 //3 6dtlpzv4mvgzb9o0b252yweuv
714 // static inline pointf scale (double c, pointf p)
715 public static Object scale(Object... arg) {
716 UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p)
717 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
718 UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r;
719 UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x;
720 UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y;
721 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
722 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
723
724 throw new UnsupportedOperationException();
725 }
726
727
728 //1 1b0s7t28jl5ftrxccb8fsopp4
729 // static int Rankdir
730 //private static int Rankdir;
731
732 //1 3oo1lt5jtd6kuqjr6qqlnkutt
733 // static boolean Flip
734 //private static boolean Flip;
735
736 //1 ejooa1m5uoq0ue852wtuerpy
737 // static pointf Offset
738 //private final static ST_pointf Offset = new ST_pointf();
739
740
741
742 //3 dajapw16wus3rwimkrk5ihi2b
743 // static pointf map_point(pointf p)
744 public static ST_pointf map_point(final ST_pointf p) {
745 // WARNING!! STRUCT
746 return map_point_w_(p.copy()).copy();
747 }
748 private static ST_pointf map_point_w_(final ST_pointf p) {
749 ENTERING("dajapw16wus3rwimkrk5ihi2b","map_point");
750 try {
751 p.___(ccwrotatepf(p, Z.z().Rankdir * 90));
752 p.setDouble("x", p.x - Z.z().Offset.x);
753 p.setDouble("y", p.y - Z.z().Offset.y);
754 return p;
755 } finally {
756 LEAVING("dajapw16wus3rwimkrk5ihi2b","map_point");
757 }
758 }
759
760
761
762
763 //3 bvq3vvonvotn47mfe5zsvchie
764 // static void map_edge(edge_t * e)
765 public static void map_edge(ST_Agedge_s e) {
766 ENTERING("bvq3vvonvotn47mfe5zsvchie","map_edge");
767 try {
768 int j, k;
769 final ST_bezier bz = new ST_bezier();
770 if (ED_spl(e) == null) {
771 if ((Z.z().Concentrate == false) && (ED_edge_type(e) != 6))
772 System.err.println("lost %s %s edge\n"+ agnameof(agtail(e))+
773 agnameof(aghead(e)));
774 return;
775 }
776 for (j = 0; j < ED_spl(e).size; j++) {
777 bz.___(ED_spl(e).list.plus(j).getStruct());
778 for (k = 0; k < bz.size; k++) {
779 bz.list.get(k).setStruct(map_point((ST_pointf) bz.list.get(k).getStruct()));
780 }
781 if (bz.sflag!=0)
782 UNSUPPORTED("7894dgzvk2um2w1a5ph2r0bcc"); // ED_spl(e)->list[j].sp = map_point(ED_spl(e)->list[j].sp);
783 if (bz.eflag!=0) {
784 ED_spl(e).list.get(j).ep.___(map_point((ST_pointf) ED_spl(e).list.get(j).ep));
785 }
786 }
787 if (ED_label(e)!=null)
788 ED_label(e).pos.___(map_point((ST_pointf) ED_label(e).pos));
789 if (ED_xlabel(e)!=null)
790 UNSUPPORTED("al3tnq9zjjqeq1ll7qdxyu3ja"); // ED_xlabel(e)->pos = map_point(ED_xlabel(e)->pos);
791 /* vladimir */
792 if (ED_head_label(e)!=null)
793 ED_head_label(e).setStruct("pos", map_point((ST_pointf) ED_head_label(e).pos));
794 if (ED_tail_label(e)!=null)
795 ED_tail_label(e).setStruct("pos", map_point((ST_pointf) ED_tail_label(e).pos));
796 } finally {
797 LEAVING("bvq3vvonvotn47mfe5zsvchie","map_edge");
798 }
799 }
800
801
802
803
804 //3 a3hf82rxsojxbunj6p8a6bkse
805 // void translate_bb(graph_t * g, int rankdir)
806 public static void translate_bb(ST_Agraph_s g, int rankdir) {
807 ENTERING("a3hf82rxsojxbunj6p8a6bkse","translate_bb");
808 try {
809 int c;
810 final ST_boxf bb = new ST_boxf(), new_bb = new ST_boxf();
811 bb.___(GD_bb(g));
812 if (rankdir == 1 || rankdir == 2) {
813 UNSUPPORTED("d4wrtj0h7lkb0e0vernd9czq9"); // new_bb.LL = map_point(pointfof(bb.LL.x, bb.UR.y));
814 UNSUPPORTED("crysiae5zxc69cj3v2ygfs8xn"); // new_bb.UR = map_point(pointfof(bb.UR.x, bb.LL.y));
815 } else {
816 new_bb.LL.___(map_point(pointfof(bb.LL.x, bb.LL.y)));
817 new_bb.UR.___(map_point(pointfof(bb.UR.x, bb.UR.y)));
818 }
819 GD_bb(g).___(new_bb);
820 if (GD_label(g)!=null) {
821 GD_label(g).setStruct("pos", map_point((ST_pointf) GD_label(g).pos));
822 }
823 for (c = 1; c <= GD_n_cluster(g); c++)
824 translate_bb((ST_Agraph_s) GD_clust(g).get(c).getPtr(), rankdir);
825 } finally {
826 LEAVING("a3hf82rxsojxbunj6p8a6bkse","translate_bb");
827 }
828 }
829
830
831
832
833 //3 h4i5qxnd7hlrew919abswd13
834 // static void translate_drawing(graph_t * g)
835 public static void translate_drawing(ST_Agraph_s g) {
836 ENTERING("h4i5qxnd7hlrew919abswd13","translate_drawing");
837 try {
838 ST_Agnode_s v;
839 ST_Agedge_s e;
840 boolean shift = (Z.z().Offset.x!=0.0 || Z.z().Offset.y!=0.0);
841 if (N(shift) && N(Z.z().Rankdir))
842 return;
843 for (v = agfstnode(g); v!=null; v = agnxtnode(g, v)) {
844 if (Z.z().Rankdir!=0)
845 UNSUPPORTED("e0j848r4j1j7sojfht5gwikvi"); // gv_nodesize(v, 0);
846 ND_coord(v).___(map_point(ND_coord(v)));
847 if (ND_xlabel(v)!=null)
848 UNSUPPORTED("3fy0l7w2v24hzrvlpstpknwl7"); // ND_xlabel(v)->pos = map_point(ND_xlabel(v)->pos);
849 if (Z.z().State == 1)
850 for (e = agfstout(g, v); e!=null; e = agnxtout(g, e))
851 map_edge(e);
852 }
853 translate_bb(g, GD_rankdir(g));
854 } finally {
855 LEAVING("h4i5qxnd7hlrew919abswd13","translate_drawing");
856 }
857 }
858
859
860
861
862 //3 52s5qfdn5zxeyuodfq8tgxwaa
863 // static void place_root_label(graph_t * g, pointf d)
864 public static Object place_root_label(Object... arg) {
865 UNSUPPORTED("8m0j9ogp2h20aphxjuxn7copg"); // static void place_root_label(graph_t * g, pointf d)
866 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
867 UNSUPPORTED("2bghyit203pd6xw2ihhenzyn8"); // pointf p;
868 UNSUPPORTED("2gqofhemdqlul2pxjvuyly8gr"); // if (GD_label_pos(g) & 4) {
869 UNSUPPORTED("5y20n2wgxe7hnzxnkg9144bhl"); // p.x = GD_bb(g).UR.x - d.x / 2;
870 UNSUPPORTED("2892hrfudeikl7o70w4nofhny"); // } else if (GD_label_pos(g) & 2) {
871 UNSUPPORTED("2wafl9f5ytdr13m270aknhkub"); // p.x = GD_bb(g).LL.x + d.x / 2;
872 UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else {
873 UNSUPPORTED("aktxwmc3uefegw0cs334i9dw8"); // p.x = (GD_bb(g).LL.x + GD_bb(g).UR.x) / 2;
874 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
875 UNSUPPORTED("dpev8t1rdycpdnwjscmowsvaf"); // if (GD_label_pos(g) & 1) {
876 UNSUPPORTED("1d6n5uhjoy1y3mfj3ddrdt6rc"); // p.y = GD_bb(g).UR.y - d.y / 2;
877 UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); // } else {
878 UNSUPPORTED("d6z40q4ju0vq45te2z2prcsua"); // p.y = GD_bb(g).LL.y + d.y / 2;
879 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
880 UNSUPPORTED("dgs75zvkk4komxfg61cia1t82"); // GD_label(g)->pos = p;
881 UNSUPPORTED("8dkewv20cdne73egfv2tn37lb"); // GD_label(g)->set = NOT(0);
882 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
883
884 throw new UnsupportedOperationException();
885 }
886
887
888
889
890 //3 2i713kmewjct2igf3lwm80462
891 // static pointf centerPt (xlabel_t* xlp)
892 public static ST_pointf centerPt(ST_xlabel_t.Array xlp) {
893 ENTERING("2i713kmewjct2igf3lwm80462","centerPt");
894 try {
895 final ST_pointf p = new ST_pointf();
896 p.___(xlp.getStruct().pos);
897 p.setDouble("x", p.x + xlp.getStruct().sz.x/2);
898 p.setDouble("y", p.y + xlp.getStruct().sz.y/2);
899 return p;
900 } finally {
901 LEAVING("2i713kmewjct2igf3lwm80462","centerPt");
902 }
903 }
904
905
906
907
908 //3 2ozwtuocg4cz5ghqemmche3vt
909 // static int printData (object_t* objs, int n_objs, xlabel_t* lbls, int n_lbls, label_params_t* params)
910 public static Object printData(Object... arg) {
911 UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int
912 UNSUPPORTED("ckiu0galpa1852h3cty8ba6r7"); // printData (object_t* objs, int n_objs, xlabel_t* lbls, int n_lbls,
913 UNSUPPORTED("dzs60ka6anviw625w47fdcq2z"); // label_params_t* params) {
914 UNSUPPORTED("327a0i7b6rqjqj8wdl0h29mnc"); // int i;
915 UNSUPPORTED("2v2z0ng0lije7nd5xnnwpvhsk"); // xlabel_t* xp;
916 UNSUPPORTED("8b4vu28i0jzto8xj8y5xidmfi"); // fprintf (stderr, "%d objs %d xlabels force=%d bb=(%.02f,%.02f) (%.02f,%.02f)\n",
917 UNSUPPORTED("4brfvoc74eb0wrjbv0jim84br"); // n_objs, n_lbls, params->force, params->bb.LL.x, params->bb.LL.y,
918 UNSUPPORTED("bg9iybxqjpzhrq7ake4qd022a"); // params->bb.UR.x, params->bb.UR.y);
919 UNSUPPORTED("cqr6z8w761iogdatyx6tujxrj"); // if (Verbose < 2) return 0;
920 UNSUPPORTED("3k661zowi8f52at88thx4gq3c"); // fprintf(stderr, "objects\n");
921 UNSUPPORTED("a0du2scf7lcyviw12x1mpntj5"); // for (i = 0; i < n_objs; i++) {
922 UNSUPPORTED("7ljpm4lk7dhgz8jneyiurqcqj"); // xp = objs->lbl;
923 UNSUPPORTED("6synbitl0b8qre39c8hfx9ji7"); // fprintf (stderr, " [%d] (%.02f,%.02f) (%.02f,%.02f) %p \"%s\"\n",
924 UNSUPPORTED("5fncs0x8f05ep5nr4lds4lyfi"); // i, objs->pos.x,objs->pos.y,objs->sz.x,objs->sz.y, objs->lbl,
925 UNSUPPORTED("csy4r7zdyqrnbp3yvfpm66w59"); // (xp?((textlabel_t*)(xp->lbl))->text:""));
926 UNSUPPORTED("bd3gftycfqozopsoe1ptqueov"); // objs++;
927 UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // }
928 UNSUPPORTED("2kq3xkqpgi5kr4141ab3bukkd"); // fprintf(stderr, "xlabels\n");
929 UNSUPPORTED("9dzxzlqrz9th6wohjjvd93rtd"); // for (i = 0; i < n_lbls; i++) {
930 UNSUPPORTED("6e093u52b50denwzlx0m7a36a"); // fprintf (stderr, " [%d] %p set %d (%.02f,%.02f) (%.02f,%.02f) %s\n",
931 UNSUPPORTED("bb908gbwccyotc72hfeopef2e"); // i, lbls, lbls->set, lbls->pos.x,lbls->pos.y, lbls->sz.x,lbls->sz.y, ((textlabel_t*)lbls->lbl)->text);
932 UNSUPPORTED("30hn2ulrrh2sxlt3rd89e1nja"); // lbls++;
933 UNSUPPORTED("7ijd6pszsxnoopppf6xwo8wdl"); // }
934 UNSUPPORTED("bid671dovx1rdiquw5vm3fttj"); // return 0;
935 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
936
937 throw new UnsupportedOperationException();
938 }
939
940
941
942
943 //3 95pnpuiq4khinrz2bqkci9nfg
944 // static pointf edgeTailpoint (Agedge_t* e)
945 public static ST_pointf edgeTailpoint(ST_Agedge_s e) {
946 ENTERING("95pnpuiq4khinrz2bqkci9nfg","edgeTailpoint");
947 try {
948 return edgeTailpoint_(e).copy();
949 } finally {
950 LEAVING("95pnpuiq4khinrz2bqkci9nfg","edgeTailpoint");
951 }
952 }
953 private static ST_pointf edgeTailpoint_(ST_Agedge_s e) {
954 ST_splines spl;
955 ST_bezier bez;
956 spl = getsplinepoints(e);
957 if (spl == null) {
958 UNSUPPORTED("9wdrv4uc4c7ssn0qpmxgz5eu1"); // pointf p;
959 UNSUPPORTED("ezy0ey6dn5uqp6peuorn615x6"); // p.x = p.y = 0;
960 UNSUPPORTED("68kasxgknec72r19lohbk6n3q"); // return p;
961 }
962 bez = spl.list.get(0);
963 // bez = &spl->list[0];
964 if (bez.sflag!=0) {
965 return (ST_pointf) bez.sp;
966 } else {
967 return (ST_pointf) (bez.getPtr()).list.get(0);
968 // return bez->list[0];
969 }
970
971 }
972
973
974
975
976 //3 av67wf2xi70ncgl90j1ttrjjs
977 // static pointf edgeHeadpoint (Agedge_t* e)
978 public static ST_pointf edgeHeadpoint(ST_Agedge_s e) {
979 ENTERING("av67wf2xi70ncgl90j1ttrjjs","edgeHeadpoint");
980 try {
981 return edgeHeadpoint_(e).copy();
982 } finally {
983 LEAVING("av67wf2xi70ncgl90j1ttrjjs","edgeHeadpoint");
984 }
985 }
986 private static ST_pointf edgeHeadpoint_(ST_Agedge_s e) {
987 ST_splines spl;
988 ST_bezier bez;
989 spl = getsplinepoints(e);
990 if (spl == null) {
991 UNSUPPORTED("9wdrv4uc4c7ssn0qpmxgz5eu1"); // pointf p;
992 UNSUPPORTED("ezy0ey6dn5uqp6peuorn615x6"); // p.x = p.y = 0;
993 UNSUPPORTED("68kasxgknec72r19lohbk6n3q"); // return p;
994 }
995 bez = spl.list.plus(spl.size - 1).getPtr();
996 // bez = &spl->list[spl->size - 1];
997 if (bez.eflag!=0) {
998 return (ST_pointf) bez.ep;
999 } else {
1000 return (ST_pointf) ((ST_bezier)bez.getPtr()).list.plus(bez.size - 1).getStruct();
1001 // return bez->list[bez->size - 1];
1002 }
1003 }
1004
1005
1006
1007
1008 //3 1ca6fh8ns5bgzfzcz8al4eh4k
1009 // static boxf adjustBB (object_t* objp, boxf bb)
1010 public static ST_boxf adjustBB(ST_object_t.Array objp, ST_boxf bb) {
1011 ENTERING("1ca6fh8ns5bgzfzcz8al4eh4k","adjustBB");
1012 try {
1013 return adjustBB_(objp, bb.copy()).copy();
1014 } finally {
1015 LEAVING("1ca6fh8ns5bgzfzcz8al4eh4k","adjustBB");
1016 }
1017 }
1018 private static ST_boxf adjustBB_(ST_object_t.Array objp, ST_boxf bb) {
1019 final ST_pointf ur = new ST_pointf();
1020 /* Adjust bounding box */
1021 bb.LL.setDouble("x", MIN(bb.LL.x, objp.getStruct().pos.x));
1022 bb.LL.setDouble("y", MIN(bb.LL.y, objp.getStruct().pos.y));
1023 ur.setDouble("x", objp.getStruct().pos.x + objp.getStruct().sz.x);
1024 ur.setDouble("y", objp.getStruct().pos.y + objp.getStruct().sz.y);
1025 bb.UR.setDouble("x", MAX(bb.UR.x, ur.x));
1026 bb.UR.setDouble("y", MAX(bb.UR.y, ur.y));
1027 return bb;
1028 }
1029
1030
1031
1032
1033 //3 3mefe722uemyoa0czmkkw6hjb
1034 // static void addXLabel (textlabel_t* lp, object_t* objp, xlabel_t* xlp, int initObj, pointf pos)
1035 public static void addXLabel(ST_textlabel_t lp, ST_object_t.Array objp, ST_xlabel_t.Array xlp, int initObj, ST_pointf pos) {
1036 ENTERING("3mefe722uemyoa0czmkkw6hjb","addXLabel");
1037 try {
1038 addXLabel_(lp, objp, xlp, initObj, pos.copy());
1039 } finally {
1040 LEAVING("3mefe722uemyoa0czmkkw6hjb","addXLabel");
1041 }
1042 }
1043 private static void addXLabel_(ST_textlabel_t lp, ST_object_t.Array objp, ST_xlabel_t.Array xlp, int initObj, ST_pointf pos) {
1044 if (initObj!=0) {
1045 objp.getStruct().sz.setDouble("x", 0);
1046 objp.getStruct().sz.setDouble("y", 0);
1047 objp.setStruct("pos", pos);
1048 }
1049 if (Z.z().Flip) {
1050 UNSUPPORTED("99tzt7erbvtfsbo0jbdz0lc8m"); // xlp->sz.x = lp->dimen.y;
1051 UNSUPPORTED("6v5t3ysaisj27bwc0r9zg3rpd"); // xlp->sz.y = lp->dimen.x;
1052 }
1053 else {
1054 xlp.get(0).sz.___(lp.dimen);
1055 }
1056 xlp.get(0).lbl = lp;
1057 xlp.get(0).set = 0;
1058 objp.setPtr("lbl", xlp);
1059 }
1060
1061
1062
1063
1064 //3 dwxd5kvlanbcxqfuncjg0ea54
1065 // static boxf addLabelObj (textlabel_t* lp, object_t* objp, boxf bb)
1066 public static ST_boxf addLabelObj(ST_textlabel_t lp, ST_object_t.Array objp, final ST_boxf bb) {
1067 // WARNING!! STRUCT
1068 return addLabelObj_(lp, objp, bb.copy()).copy();
1069 }
1070 private static ST_boxf addLabelObj_(ST_textlabel_t lp, ST_object_t.Array objp, final ST_boxf bb) {
1071 ENTERING("dwxd5kvlanbcxqfuncjg0ea54","addLabelObj");
1072 try {
1073 if (Z.z().Flip) {
1074 UNSUPPORTED("6z2yrwq81gtsk3q9c5pofow1x"); // objp->sz.x = lp->dimen.y;
1075 UNSUPPORTED("8xsm9kavrekjrsydqe1wh1pu"); // objp->sz.y = lp->dimen.x;
1076 }
1077 else {
1078 objp.getStruct().sz.setDouble("x", lp.dimen.x);
1079 objp.getStruct().sz.setDouble("y", lp.dimen.y);
1080 }
1081 objp.setStruct("pos", lp.pos);
1082 objp.getStruct().pos.setDouble("x", objp.getStruct().pos.x - (objp.getStruct().sz.x / 2.0 ));
1083 objp.getStruct().pos.setDouble("y", objp.getStruct().pos.y - (objp.getStruct().sz.y / 2.0 ));
1084 return adjustBB(objp, bb);
1085 } finally {
1086 LEAVING("dwxd5kvlanbcxqfuncjg0ea54","addLabelObj");
1087 }
1088 }
1089
1090
1091
1092
1093 //3 b8tjygxnwny5qoiir1mha1d62
1094 // static boxf addNodeObj (node_t* np, object_t* objp, boxf bb)
1095 public static ST_boxf addNodeObj(ST_Agnode_s np, ST_object_t.Array objp, final ST_boxf bb) {
1096 // WARNING!! STRUCT
1097 return addNodeObj_(np, objp, bb.copy()).copy();
1098 }
1099 public static ST_boxf addNodeObj_(ST_Agnode_s np, ST_object_t.Array objp, final ST_boxf bb) {
1100 ENTERING("b8tjygxnwny5qoiir1mha1d62","map_point");
1101 try {
1102 if (Z.z().Flip) {
1103 UNSUPPORTED("1ri5uimcd1z58iix8tp528l1m"); // objp->sz.x = ((ND_height(np))*(double)72);
1104 UNSUPPORTED("6r5gwwhz3sjxrssh8yo3v5c3v"); // objp->sz.y = ((ND_width(np))*(double)72);
1105 }
1106 else {
1107 objp.getStruct().sz.setDouble("x", ((ND_width(np))*(double)72));
1108 objp.getStruct().sz.setDouble("y", ((ND_height(np))*(double)72));
1109 }
1110 objp.setPtr("pos", ND_coord(np));
1111 objp.getStruct().pos.setDouble("x", objp.getStruct().pos.x - objp.getStruct().sz.x / 2.0);
1112 objp.getStruct().pos.setDouble("y", objp.getStruct().pos.y - objp.getStruct().sz.y / 2.0);
1113 return adjustBB(objp, bb);
1114 } finally {
1115 LEAVING("dajapw16wus3rwimkrk5ihi2b","map_point");
1116 }
1117 }
1118
1119
1120
1121
1122 //3 6kx3lin2ig9o2otk2bqzdvd4t
1123 // static cinfo_t addClusterObj (Agraph_t* g, cinfo_t info)
1124 public static ST_cinfo_t addClusterObj(ST_Agraph_s g, ST_cinfo_t info) {
1125 ENTERING("6kx3lin2ig9o2otk2bqzdvd4t","addClusterObj");
1126 try {
1127 return addClusterObj_(g, info.copy()).copy();
1128 } finally {
1129 LEAVING("6kx3lin2ig9o2otk2bqzdvd4t","addClusterObj");
1130 }
1131 }
1132 private static ST_cinfo_t addClusterObj_(ST_Agraph_s g, ST_cinfo_t info) {
1133 int c;
1134 for (c = 1; c <= GD_n_cluster(g); c++)
1135 info.___(addClusterObj ((ST_Agraph_s)GD_clust(g).get(c).castTo(ST_Agraph_s.class), info));
1136 if (NEQ(g, agroot(g)) && (GD_label(g)!=null) && GD_label(g).set!=0) {
1137 ST_object_t.Array objp = info.objp;
1138 info.setStruct("bb", addLabelObj (GD_label(g), objp, (ST_boxf) info.bb));
1139 info.objp = info.objp.plus(1);
1140 //UNSUPPORTED("dcgq2zlh4t0m1gno12t6h7ouy"); // object_t* objp = info.objp;
1141 //UNSUPPORTED("ddz79zm5235krd6smukq1gza0"); // info.bb = addLabelObj (GD_label(g), objp, info.bb);
1142 //UNSUPPORTED("be25qc3x3muxo4l87ji01t3kd"); // info.objp++;
1143 }
1144 return info;
1145 }
1146
1147
1148
1149
1150 //3 2tdbzvdtkwxp75kj0iufsynm5
1151 // static int countClusterLabels (Agraph_t* g)
1152 public static int countClusterLabels(ST_Agraph_s g) {
1153 ENTERING("2tdbzvdtkwxp75kj0iufsynm5","countClusterLabels");
1154 try {
1155 int c, i = 0;
1156 if (NEQ(g, agroot(g)) && GD_label(g)!=null && GD_label(g).set!=0)
1157 i++;
1158 for (c = 1; c <= GD_n_cluster(g); c++)
1159 i += countClusterLabels((ST_Agraph_s) GD_clust(g).plus(c).castTo(ST_Agraph_s.class));
1160 return i;
1161 } finally {
1162 LEAVING("2tdbzvdtkwxp75kj0iufsynm5","countClusterLabels");
1163 }
1164
1165 }
1166
1167
1168
1169
1170 //3 d4215jd9wukfn6t0iknwzjcof
1171 // static void addXLabels(Agraph_t * gp)
1172 public static void addXLabels(ST_Agraph_s gp) {
1173 ENTERING("d4215jd9wukfn6t0iknwzjcof","addXLabels");
1174 try {
1175 ST_Agnode_s np;
1176 ST_Agedge_s ep;
1177 int cnt, i, n_objs, n_lbls;
1178 int n_nlbls = 0; /* # of unset node xlabels */
1179 int n_elbls = 0; /* # of unset edge labels or xlabels */
1180 int n_set_lbls = 0; /* # of set xlabels and edge labels */
1181 int n_clbls = 0; /* # of set cluster labels */
1182 final ST_boxf bb = new ST_boxf();
1183 final ST_pointf ur = new ST_pointf();
1184 ST_textlabel_t lp;
1185 final ST_label_params_t params = new ST_label_params_t();
1186 ST_object_t.Array objs;
1187 ST_xlabel_t.Array lbls;
1188 ST_object_t.Array objp;
1189 ST_xlabel_t.Array xlp;
1190 ST_Agsym_s force;
1191 int et = (GD_flags(gp) & (7 << 1));
1192 if (N(GD_has_labels(gp) & (1 << 4)) &&
1193 N(GD_has_labels(gp) & (1 << 5)) &&
1194 N(GD_has_labels(gp) & (1 << 2)) &&
1195 N(GD_has_labels(gp) & (1 << 1)) &&
1196 (N(GD_has_labels(gp) & (1 << 0)) || Z.z().EdgeLabelsDone!=0))
1197 return;
1198 for (np = agfstnode(gp); np!=null; np = agnxtnode(gp, np)) {
1199 if (ND_xlabel(np)!=null) {
1200 UNSUPPORTED("6oje33bnpp4jv5mclsrrhl005"); // if (ND_xlabel(np)->set)
1201 UNSUPPORTED("cfkrw6t4lrs7dfgx86sgrz26"); // n_set_lbls++;
1202 UNSUPPORTED("5c97f6vfxny0zz35l2bu4maox"); // else
1203 UNSUPPORTED("26eewzzknvqt2nbcrqds5fmti"); // n_nlbls++;
1204 }
1205 for (ep = agfstout(gp, np); ep!=null; ep = agnxtout(gp, ep)) {
1206 if (ED_xlabel(ep)!=null) {
1207 UNSUPPORTED("appkettxihy2o612jk6fahbnh"); // if (ED_xlabel(ep)->set)
1208 UNSUPPORTED("8k2rclvg6eaoph9r2pz4620xq"); // n_set_lbls++;
1209 UNSUPPORTED("14y6caappoxe17mogr979qf75"); // else if (((et != (0 << 1)) && (ED_spl(ep) != NULL)))
1210 UNSUPPORTED("q3t8uxncrxc4n8rtuabtzxya"); // n_elbls++;
1211 }
1212 if (ED_head_label(ep)!=null) {
1213 if (ED_head_label(ep).set!=0)
1214 n_set_lbls++;
1215 else if (((et != (0 << 1)) && (ED_spl(ep) != null)))
1216 n_elbls++;
1217 }
1218 if (ED_tail_label(ep)!=null) {
1219 if (ED_tail_label(ep).set!=0)
1220 n_set_lbls++;
1221 else if (((et != (0 << 1)) && (ED_spl(ep) != null)))
1222 n_elbls++;
1223 }
1224 if (ED_label(ep)!=null) {
1225 if (ED_label(ep).set!=0)
1226 n_set_lbls++;
1227 else if (((et != (0 << 1)) && (ED_spl(ep) != null)))
1228 n_elbls++;
1229 }
1230 }
1231 }
1232 if ((GD_has_labels(gp) & (1 << 3))!=0)
1233 n_clbls = countClusterLabels (gp);
1234 /* A label for each unpositioned external label */
1235 n_lbls = n_nlbls + n_elbls;
1236 if (n_lbls == 0) return;
1237 /* An object for each node, each positioned external label, any cluster label,
1238 * and all unset edge labels and xlabels.
1239 */
1240 n_objs = agnnodes(gp) + n_set_lbls + n_clbls + n_elbls;
1241 objs = new ST_object_t.Array(n_objs);
1242 objp = objs;
1243 lbls = new ST_xlabel_t.Array(n_lbls);
1244 xlp = lbls;
1245 bb.setStruct("LL", pointfof(INT_MAX, INT_MAX));
1246 bb.setStruct("UR", pointfof(-INT_MAX, -INT_MAX));
1247 for (np = agfstnode(gp); np!=null; np = agnxtnode(gp, np)) {
1248 bb.___(addNodeObj (np, objp, bb));
1249 lp = ND_xlabel(np);
1250 if (lp != null) {
1251 UNSUPPORTED("d5pjy3dwui27jfdz550cy0cln"); // if (lp->set) {
1252 UNSUPPORTED("cls7z8l7wi371a4wrec0viqil"); // objp++;
1253 UNSUPPORTED("3zy3jhlqyioeyh9mlrspjjgc6"); // bb = addLabelObj (lp, objp, bb);
1254 UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // }
1255 UNSUPPORTED("6q044im7742qhglc4553noina"); // else {
1256 UNSUPPORTED("2msn58w2dse7pbq2esv7awk4r"); // addXLabel (lp, objp, xlp, 0, ur);
1257 UNSUPPORTED("1zpq9rd3nn9kjrmun8ivs9zx5"); // xlp++;
1258 UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // }
1259 }
1260 objp = objp.plus(1);
1261 for (ep = agfstout(gp, np); ep!=null; ep = agnxtout(gp, ep)) {
1262 lp = ED_label(ep);
1263 if (lp != null) {
1264 if (lp.set!=0) {
1265 bb.___(addLabelObj (lp, objp, bb));
1266 }
1267 else if (((et != (0 << 1)) && (ED_spl(ep) != null))) {
1268 addXLabel (lp, objp, xlp, 1, edgeMidpoint(gp, ep));
1269 xlp = xlp.plus(1);
1270 }
1271 else {
1272 UNSUPPORTED("3ia66n3hqrwmh3hybkoh6f8wa"); // agerr(AGWARN, "no position for edge with label %s",
1273 UNSUPPORTED("9npeksy1st7v005znerttzzzv"); // ED_label(ep)->text);
1274 UNSUPPORTED("2yi9az7ibt7j9bwztjilyo0v2"); // continue;
1275 }
1276 objp = objp.plus(1);
1277 }
1278 lp = ED_tail_label(ep);
1279 if (lp != null) {
1280 if (lp.set!=0) {
1281 UNSUPPORTED("7rwrlod7lkgin3rnnzy3iw2rw"); // bb = addLabelObj (lp, objp, bb);
1282 }
1283 else if (((et != (0 << 1)) && (ED_spl(ep) != null))) {
1284 addXLabel (lp, objp, xlp, 1, edgeTailpoint(ep));
1285 xlp = xlp.plus(1);
1286 }
1287 else {
1288 UNSUPPORTED("5ixexxcbcix5hrfl43td7pj4s"); // agerr(AGWARN, "no position for edge with tail label %s",
1289 UNSUPPORTED("cf9qaysecgkvv4165la4uu6cb"); // ED_tail_label(ep)->text);
1290 UNSUPPORTED("2yi9az7ibt7j9bwztjilyo0v2"); // continue;
1291 }
1292 objp = objp.plus(1);
1293 }
1294 lp = ED_head_label(ep);
1295 if (lp != null) {
1296 if (lp.set!=0) {
1297 UNSUPPORTED("7rwrlod7lkgin3rnnzy3iw2rw"); // bb = addLabelObj (lp, objp, bb);
1298 }
1299 else if (((et != (0 << 1)) && (ED_spl(ep) != null))) {
1300 addXLabel (lp, objp, xlp, 1, edgeHeadpoint(ep));
1301 xlp = xlp.plus(1);
1302 }
1303 else {
1304 UNSUPPORTED("8nrkavpg9ifts9yylhfijn9rp"); // agerr(AGWARN, "no position for edge with head label %s",
1305 UNSUPPORTED("a5omwtwd411hsfrc37d8t6m8b"); // ED_head_label(ep)->text);
1306 UNSUPPORTED("2yi9az7ibt7j9bwztjilyo0v2"); // continue;
1307 }
1308 objp = objp.plus(1);
1309 }
1310 lp = ED_xlabel(ep);
1311 if (lp != null) {
1312 UNSUPPORTED("5dapykbxjvnhw0dpi7jfpcazk"); // if (lp->set) {
1313 UNSUPPORTED("7rwrlod7lkgin3rnnzy3iw2rw"); // bb = addLabelObj (lp, objp, bb);
1314 UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // }
1315 UNSUPPORTED("dfnmpe0hri6ksye0gnxssi4zz"); // else if (((et != (0 << 1)) && (ED_spl(ep) != NULL))) {
1316 UNSUPPORTED("9ffmrymv8cg4h4b3ea97t9qbp"); // addXLabel (lp, objp, xlp, 1, edgeMidpoint(gp, ep));
1317 UNSUPPORTED("808184nt3k6cxj5dsg27yvpvg"); // xlp++;
1318 UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // }
1319 UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else {
1320 UNSUPPORTED("dbskad3xgu5oqqhwl1cr9f88g"); // agerr(AGWARN, "no position for edge with xlabel %s",
1321 UNSUPPORTED("dtpynjioyrbt2xfca2o46eb0j"); // ED_xlabel(ep)->text);
1322 UNSUPPORTED("2yi9az7ibt7j9bwztjilyo0v2"); // continue;
1323 UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // }
1324 UNSUPPORTED("cls7z8l7wi371a4wrec0viqil"); // objp++;
1325 }
1326 }
1327 }
1328 if (n_clbls!=0) {
1329 final ST_cinfo_t info = new ST_cinfo_t();
1330 info.setStruct("bb", bb);
1331 info.objp = objp;
1332 info.___(addClusterObj (gp, info));
1333 bb.___(info.bb);
1334 }
1335 force = (agattr(gp,AGRAPH,new CString("forcelabels"),null));
1336 params.force = late_bool(gp, force, 1);
1337 params.setStruct("bb", bb);
1338 placeLabels(objs, n_objs, lbls, n_lbls, params);
1339 // if (Verbose)
1340 // printData(objs, n_objs, lbls, n_lbls, &params);
1341 xlp = lbls;
1342 cnt = 0;
1343 for (i = 0; i < n_lbls; i++) {
1344 if (xlp.get(0).set!=0) {
1345 cnt++;
1346 lp = xlp.getStruct().lbl;
1347 lp.setInt("set", 1);
1348 lp.setStruct("pos", centerPt(xlp));
1349 updateBB (gp, lp);
1350 }
1351 xlp = xlp.plus(1);
1352 }
1353 // if (Verbose)
1354 // fprintf (stderr, "%d out of %d labels positioned.\n", cnt, n_lbls);
1355 if (cnt != n_lbls)
1356 UNSUPPORTED("9hqu9h8q1a2xl4ty48ct0fdyp"); // agerr(AGWARN, "%d out of %d exterior labels positioned.\n", cnt, n_lbls);
1357 Memory.free(objs);
1358 Memory.free(lbls);
1359 } finally {
1360 LEAVING("d4215jd9wukfn6t0iknwzjcof","addXLabels");
1361 }
1362 }
1363
1364
1365
1366
1367 //3 8fc0zxg8y7hec3n4evx3jw6cq
1368 // void gv_postprocess(Agraph_t * g, int allowTranslation)
1369 public static void gv_postprocess(ST_Agraph_s g, int allowTranslation) {
1370 ENTERING("8fc0zxg8y7hec3n4evx3jw6cq","gv_postprocess");
1371 try {
1372 double diff;
1373 final ST_pointf dimen = new ST_pointf();
1374 Z.z().Rankdir = GD_rankdir(g);
1375 Z.z().Flip = GD_flip(g)!=0;
1376 /* Handle cluster labels */
1377 if (Z.z().Flip)
1378 UNSUPPORTED("4hxky2sp978rmy6018sfmts6m"); // place_flip_graph_label(g);
1379 else
1380 place_graph_label(g);
1381 /* Everything has been placed except the root graph label, if any.
1382 * The graph positions have not yet been rotated back if necessary.
1383 */
1384 addXLabels(g);
1385 /* Add space for graph label if necessary */
1386 if (GD_label(g)!=null && N(GD_label(g).set)) {
1387 UNSUPPORTED("crj0py2wme4b5l8apvbxqcmqa"); // dimen = GD_label(g)->dimen;
1388 UNSUPPORTED("22jhn709g4c5wh0gb6v40rh19"); // {((dimen).x += 4*4); ((dimen).y += 2*4);};
1389 UNSUPPORTED("9k69y89jybam5elefg45va3ey"); // if (Flip) {
1390 UNSUPPORTED("andsvpqa42ef9h5dkn3uyv6tj"); // if (GD_label_pos(g) & 1) {
1391 UNSUPPORTED("65ggem18g4zgz2yx552vi2n4v"); // GD_bb(g).UR.x += dimen.y;
1392 UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else {
1393 UNSUPPORTED("9dm14vohn1tuwqrwprpdywylr"); // GD_bb(g).LL.x -= dimen.y;
1394 UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // }
1395 UNSUPPORTED("94nnj9ien92542qanqtyo8qzq"); // if (dimen.x > (GD_bb(g).UR.y - GD_bb(g).LL.y)) {
1396 UNSUPPORTED("awekuk9gokwsbb49j41hvhqt4"); // diff = dimen.x - (GD_bb(g).UR.y - GD_bb(g).LL.y);
1397 UNSUPPORTED("5856jxlve8fb2pennnazjjkij"); // diff = diff / 2.;
1398 UNSUPPORTED("3t8m6fustsc50cpggxiadcjax"); // GD_bb(g).LL.y -= diff;
1399 UNSUPPORTED("7c25kl7mn9jd5x5x2uflcql86"); // GD_bb(g).UR.y += diff;
1400 UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // }
1401 UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else {
1402 UNSUPPORTED("andsvpqa42ef9h5dkn3uyv6tj"); // if (GD_label_pos(g) & 1) {
1403 UNSUPPORTED("7x8evhhttjy9mwgcpfpb3l7lm"); // if (Rankdir == 0)
1404 UNSUPPORTED("45a42yl5qj83sj5mzdd6k6wcj"); // GD_bb(g).UR.y += dimen.y;
1405 UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else
1406 UNSUPPORTED("6i55hrio04eg5ilg5i01jw8vv"); // GD_bb(g).LL.y -= dimen.y;
1407 UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); // } else {
1408 UNSUPPORTED("7x8evhhttjy9mwgcpfpb3l7lm"); // if (Rankdir == 0)
1409 UNSUPPORTED("6i55hrio04eg5ilg5i01jw8vv"); // GD_bb(g).LL.y -= dimen.y;
1410 UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else
1411 UNSUPPORTED("45a42yl5qj83sj5mzdd6k6wcj"); // GD_bb(g).UR.y += dimen.y;
1412 UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // }
1413 UNSUPPORTED("p1mrpzvl0adzwcw3lialn8v3"); // if (dimen.x > (GD_bb(g).UR.x - GD_bb(g).LL.x)) {
1414 UNSUPPORTED("3ie0x59qavcqpnvy7kci31lgc"); // diff = dimen.x - (GD_bb(g).UR.x - GD_bb(g).LL.x);
1415 UNSUPPORTED("5856jxlve8fb2pennnazjjkij"); // diff = diff / 2.;
1416 UNSUPPORTED("anqdsrkl2qs1pqbuivrdz6fnt"); // GD_bb(g).LL.x -= diff;
1417 UNSUPPORTED("c0ah0pvnkczqdg5jt0u955wns"); // GD_bb(g).UR.x += diff;
1418 UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // }
1419 UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
1420 }
1421 if (allowTranslation!=0) {
1422 switch (Z.z().Rankdir) {
1423 case 0:
1424 Z.z().Offset.___(GD_bb(g).LL);
1425 break;
1426 case 1:
1427 UNSUPPORTED("5t3j9lrc86kd5ouaqgzvz3qcm"); // Offset = pointfof(-GD_bb(g).UR.y, GD_bb(g).LL.x);
1428 break;
1429 case 2:
1430 UNSUPPORTED("96ajwnh79ja9g57xmut6dmh9d"); // Offset = pointfof(GD_bb(g).LL.x, -GD_bb(g).UR.y);
1431 break;
1432 case 3:
1433 UNSUPPORTED("3xtu7zkpqq7nsx9oe68oi6ebt"); // Offset = pointfof(GD_bb(g).LL.y, GD_bb(g).LL.x);
1434 break;
1435 }
1436 translate_drawing(g);
1437 }
1438 if (GD_label(g)!=null && N(GD_label(g).set))
1439 UNSUPPORTED("6dds0zsvqw48u510zcy954fh1"); // place_root_label(g, dimen);
1440 if (Z.z().Show_boxes!=null) {
1441 UNSUPPORTED("8c7x8di5w36ib05qan9z4sl9"); // char buf[BUFSIZ];
1442 UNSUPPORTED("83qqprhiseoxlwtwi991aag0c"); // if (Flip)
1443 UNSUPPORTED("86tova7pv19alt02nlk0d17oj"); // sprintf(buf, "/pathbox {\n /X exch neg %.5g sub def\n /Y exch %.5g sub def\n /x exch neg %.5g sub def\n /y exch %.5g sub def\n newpath x y moveto\n X y lineto\n X Y lineto\n x Y lineto\n closepath stroke\n} def\n", Offset.x, Offset.y, Offset.x, Offset.y);
1444 UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else
1445 UNSUPPORTED("79tu9xkxv4v48uko4cxz7v04t"); // sprintf(buf, "/pathbox {\n /Y exch %.5g sub def\n /X exch %.5g sub def\n /y exch %.5g sub def\n /x exch %.5g sub def\n newpath x y moveto\n X y lineto\n X Y lineto\n x Y lineto\n closepath stroke\n } def\n/dbgstart { gsave %.5g %.5g translate } def\n/arrowlength 10 def\n/arrowwidth arrowlength 2 div def\n/arrowhead {\n gsave\n rotate\n currentpoint\n newpath\n moveto\n arrowlength arrowwidth 2 div rlineto\n 0 arrowwidth neg rlineto\n closepath fill\n grestore\n} bind def\n/makearrow {\n currentpoint exch pop sub exch currentpoint pop sub atan\n arrowhead\n} bind def\n/point { newpath 2 0 360 arc fill} def/makevec {\n /Y exch def\n /X exch def\n /y exch def\n /x exch def\n newpath x y moveto\n X Y lineto stroke\n X Y moveto\n x y makearrow\n} def\n", Offset.y, Offset.x, Offset.y, Offset.x,
1446 UNSUPPORTED("aow79vde4xjqtwexymr5ocjl6"); // -Offset.x, -Offset.y);
1447 UNSUPPORTED("6g3g36v7l0tyfootyy8mzv3t8"); // Show_boxes[0] = strdup(buf);
1448 }
1449 } finally {
1450 LEAVING("8fc0zxg8y7hec3n4evx3jw6cq","gv_postprocess");
1451 }
1452 }
1453
1454
1455
1456
1457 //3 3qbbvlnq1b06ylgr0yj2slbhm
1458 // void dotneato_postprocess(Agraph_t * g)
1459 public static void dotneato_postprocess(ST_Agraph_s g) {
1460 ENTERING("3qbbvlnq1b06ylgr0yj2slbhm","dotneato_postprocess");
1461 try {
1462 gv_postprocess(g, 1);
1463 } finally {
1464 LEAVING("3qbbvlnq1b06ylgr0yj2slbhm","dotneato_postprocess");
1465 }
1466 }
1467
1468
1469
1470
1471 //3 ehe7n8wkl4thn86tisjzdotpq
1472 // static void place_flip_graph_label(graph_t * g)
1473 public static Object place_flip_graph_label(Object... arg) {
1474 UNSUPPORTED("3zsjtcmcfxhkmaagi0on4dy20"); // static void place_flip_graph_label(graph_t * g)
1475 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
1476 UNSUPPORTED("53xzwretgdbd0atozc0w6hagb"); // int c;
1477 UNSUPPORTED("1wiyv8zjadpaaw6l7rs3o7g1w"); // pointf p, d;
1478 UNSUPPORTED("3aye33sd5gwxvun5g9nvgb2py"); // if ((g != agroot(g)) && (GD_label(g)) && !GD_label(g)->set) {
1479 UNSUPPORTED("bb9kbz7bijh4xjt97fdn2q90k"); // if (GD_label_pos(g) & 1) {
1480 UNSUPPORTED("9fqnrxwwa66oa8qe31y1gf37u"); // d = GD_border(g)[1];
1481 UNSUPPORTED("cgv3bcg9c274cdwxi1y0sja3p"); // p.x = GD_bb(g).UR.x - d.x / 2;
1482 UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else {
1483 UNSUPPORTED("16roor3488xb2g2wr6oh8dqpx"); // d = GD_border(g)[3];
1484 UNSUPPORTED("7ictv9eqmjvxjii5lqlyw8nu"); // p.x = GD_bb(g).LL.x + d.x / 2;
1485 UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
1486 UNSUPPORTED("2qpji9cqj2p2czgcug3wvnqpl"); // if (GD_label_pos(g) & 4) {
1487 UNSUPPORTED("2xa4n9ca16xpf1kahaycmkl4r"); // p.y = GD_bb(g).LL.y + d.y / 2;
1488 UNSUPPORTED("blrmgi2c43f98h1nso1k757hi"); // } else if (GD_label_pos(g) & 2) {
1489 UNSUPPORTED("a7anlx7s8s2pqd73q59ep0kpf"); // p.y = GD_bb(g).UR.y - d.y / 2;
1490 UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else {
1491 UNSUPPORTED("378pj84d79yuezjebpqcchyut"); // p.y = (GD_bb(g).LL.y + GD_bb(g).UR.y) / 2;
1492 UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
1493 UNSUPPORTED("ptjqgn3loi94u957cup0fi1"); // GD_label(g)->pos = p;
1494 UNSUPPORTED("5ezl5j9dxa3ewoj8hxw72wn4n"); // GD_label(g)->set = NOT(0);
1495 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
1496 UNSUPPORTED("7z5fb6iyowsosn1hiz7opeoc6"); // for (c = 1; c <= GD_n_cluster(g); c++)
1497 UNSUPPORTED("d388zyk4c9le0jg4fcfx0b2"); // place_flip_graph_label(GD_clust(g)[c]);
1498 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
1499
1500 throw new UnsupportedOperationException();
1501 }
1502
1503
1504
1505
1506 //3 72zw1alhd5vd0g6mhum507rvx
1507 // void place_graph_label(graph_t * g)
1508 public static void place_graph_label(ST_Agraph_s g) {
1509 ENTERING("72zw1alhd5vd0g6mhum507rvx","place_graph_label");
1510 try {
1511 int c;
1512 final ST_pointf p = new ST_pointf(), d = new ST_pointf();
1513 if (NEQ(g, agroot(g)) && (GD_label(g)!=null) && N(GD_label(g).set)) {
1514 if ((GD_label_pos(g) & 1)!=0) {
1515 d.___(GD_border(g)[2].getStruct());
1516 p.setDouble("y", GD_bb(g).UR.y - d.y / 2);
1517 } else {
1518 UNSUPPORTED("1w38no4welthbwa0i10hei16b"); // d = GD_border(g)[0];
1519 UNSUPPORTED("2xa4n9ca16xpf1kahaycmkl4r"); // p.y = GD_bb(g).LL.y + d.y / 2;
1520 }
1521 if ((GD_label_pos(g) & 4)!=0) {
1522 UNSUPPORTED("cgv3bcg9c274cdwxi1y0sja3p"); // p.x = GD_bb(g).UR.x - d.x / 2;
1523 } else if ((GD_label_pos(g) & 2)!=0) {
1524 UNSUPPORTED("7ictv9eqmjvxjii5lqlyw8nu"); // p.x = GD_bb(g).LL.x + d.x / 2;
1525 } else {
1526 p.setDouble("x", (GD_bb(g).LL.x + GD_bb(g).UR.x) / 2);
1527 }
1528 GD_label(g).setStruct("pos", p);
1529 GD_label(g).set= NOTI(false);
1530 }
1531 for (c = 1; c <= GD_n_cluster(g); c++)
1532 place_graph_label((ST_Agraph_s) GD_clust(g).get(c).getPtr());
1533 } finally {
1534 LEAVING("72zw1alhd5vd0g6mhum507rvx","place_graph_label");
1535 }
1536 }
1537
1538
1539 }