File: LayoutPropertySpecific.sip

package info (click to toggle)
tulip 4.8.0dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 179,264 kB
  • ctags: 64,517
  • sloc: cpp: 600,444; ansic: 36,311; makefile: 22,136; python: 1,304; sh: 946; yacc: 522; xml: 337; pascal: 157; php: 66; lex: 55
file content (677 lines) | stat: -rw-r--r-- 25,954 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
/**
 *
 * This file is part of Tulip (www.tulip-software.org)
 *
 * Authors: David Auber and the Tulip development Team
 * from LaBRI, University of Bordeaux 1 and Inria Bordeaux - Sud Ouest
 *
 * Tulip is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License
 * as published by the Free Software Foundation, either version 3
 * of the License, or (at your option) any later version.
 *
 * Tulip is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 *
 */

        tlp::Coord getMax(tlp::Graph *subgraph=NULL);
%Docstring
tlp.LayoutProperty.getMax([subgraph = None])

Returns the maximum coordinate in that layout property,
i.e. the top-right corner of the graph drawing bounding box.

:param subgraph: a sub-graph can be given in parameter, in that case return the maximum coordinate of the sub-graph layout.
:type subgraph: :class:`tlp.Graph`
:rtype: :class:`tlp.Coord` 
:throws: an exception if the provided sub-graph is not a descendant of the graph attached to the property
%End	

%MethodCode
    if (a0) {
        if (!sipCpp->getGraph()->isDescendantGraph(a0) && a0 != sipCpp->getGraph()) {
            sipIsErr = 1;
            std::ostringstream oss;
            oss << "Error : <graph " << a0->getName() << " (id " << a0->getId() << ")>";
            oss << "is not a descendant of <graph " << sipCpp->getGraph()->getName() << " (id " << sipCpp->getGraph()->getId() << ")>";
            PyErr_SetString(PyExc_Exception, oss.str().c_str());
        }
    }
    if (sipIsErr == 0) {
        sipRes = new tlp::Coord(sipCpp->getMax(a0));
    }
%End
	
//===========================================================================================	
	
        tlp::Coord getMin(tlp::Graph *subgraph=NULL);
%Docstring
tlp.LayoutProperty.getMin([subgraph = None])

Returns the minimum coordinate in that layout property,
i.e. the bottom-left corner of the graph drawing bounding box.

:param subgraph: a sub-graph can be given in parameter, in that case return the minimum coordinate of the sub-graph layout.
:type subgraph: :class:`tlp.Graph`
:rtype: :class:`tlp.Coord` 
:throws: an exception if the provided sub-graph is not a descendant of the graph attached to the property
%End

%MethodCode
    if (a0) {
        if (!sipCpp->getGraph()->isDescendantGraph(a0) && a0 != sipCpp->getGraph()) {
            sipIsErr = 1;
            std::ostringstream oss;
            oss << "Error : <graph " << a0->getName() << " (id " << a0->getId() << ")>";
            oss << "is not a descendant of <graph " << sipCpp->getGraph()->getName() << " (id " << sipCpp->getGraph()->getId() << ")>";
            PyErr_SetString(PyExc_Exception, oss.str().c_str());
        }
    }
    if (sipIsErr == 0) {
        sipRes = new tlp::Coord(sipCpp->getMin(a0));
    }
%End

//===========================================================================================

        void translate(const tlp::Vec3f &move, tlp::Graph *subgraph=NULL);
%Docstring
tlp.LayoutProperty.translate(move[, subgraph = None])

Translates the current layout according to a movement vector.

:param move: a movement vector
:type move: :class:`tlp.Vec3f`
:param subgraph: a sub-graph can be given in parameter, in that case translates the layout of the nodes belonging to that sub-graph.
:type subgraph: :class:`tlp.Graph`
:throws: an exception if the provided sub-graph is not a descendant of the graph attached to the property
%End 

%MethodCode
    if (a1) {
        if (!sipCpp->getGraph()->isDescendantGraph(a1) && a1 != sipCpp->getGraph()) {
            sipIsErr = 1;
            std::ostringstream oss;
            oss << "Error : <graph " << a1->getName() << " (id " << a1->getId() << ")>";
            oss << "is not a descendant of <graph " << sipCpp->getGraph()->getName() << " (id " << sipCpp->getGraph()->getId() << ")>";
            PyErr_SetString(PyExc_Exception, oss.str().c_str());
        }
    }
    if (sipIsErr == 0) {
        sipCpp->translate(*a0, a1);
    }
%End
 
 //===========================================================================================
 
        void translate(const tlp::Vec3f &move, tlp::Iterator<tlp::node> *itNodes, tlp::Iterator<tlp::edge> *itEdges);
%Docstring
tlp.LayoutProperty.translate(move, itNodes, itEdges)

Translates the layout of a set of nodes and edges provided through iterators according to a movement vector.

:param move: a movement vector
:type move: :class:`tlp.Vec3f`
:param itNodes: an iterator on graph nodes
:type itNodes: :class:`tlp.IteratorNode`
:param itEdges: an iterator on graph edges
:type itEdges: :class:`tlp.IteratorEdge`
%End


	
//===========================================================================================	
	
        void scale(const tlp::Vec3f &scaleFactors, tlp::Graph *subgraph=NULL);
%Docstring
tlp.LayoutProperty.scale(scaleFactors[, subgraph = None])

Scales the layout according to a vector of scale factors (sx, sy, sz).

:param move: a vector of scale factors
:type move: :class:`tlp.Vec3f`
:param subgraph: a sub-graph can be given in parameter, in that case scales the layout of the nodes belonging to that sub-graph.
:type subgraph: :class:`tlp.Graph`
:throws: an exception if the provided sub-graph is not a descendant of the graph attached to the property
%End 

%MethodCode
    if (a1) {
        if (!sipCpp->getGraph()->isDescendantGraph(a1) && a1 != sipCpp->getGraph()) {
            sipIsErr = 1;
            std::ostringstream oss;
            oss << "Error : <graph " << a1->getName() << " (id " << a1->getId() << ")>";
            oss << "is not a descendant of <graph " << sipCpp->getGraph()->getName() << " (id " << sipCpp->getGraph()->getId() << ")>";
            PyErr_SetString(PyExc_Exception, oss.str().c_str());
        }
    }
    if (sipIsErr == 0) {
        sipCpp->scale(*a0, a1);
    }
%End

	
//===========================================================================================	
	
        void scale(const tlp::Vec3f &scaleFactors, tlp::Iterator<tlp::node> *itNodes, tlp::Iterator<tlp::edge> *itEdges);
%Docstring
tlp.LayoutProperty.scale(scaleFactors, itNodes, itEdges)

Scales the layout of the nodes and edges provided through iterators according to a vector of scale factors (sx, sy, sz).

:param move: a vector of scale factors
:type move: :class:`tlp.Vec3f`
:param itNodes: an iterator on graph nodes
:type itNodes: :class:`tlp.IteratorNode`
:param itEdges: an iterator on graph edges
:type itEdges: :class:`tlp.IteratorEdge`
%End

//===========================================================================================

        void rotateX(const double &alpha, tlp::Graph *subgraph=NULL);
%Docstring
tlp.LayoutProperty.rotateX(alpha[, subgraph = None])

.. versionadded:: 3.7

Rotates the layout around the X-axis according to an angle in degrees.

:param alpha: an angle in degrees
:type alpha: float
:param subgraph: a sub-graph can be given in parameter, in that case rotates the layout of the nodes belonging to that sub-graph.
:type subgraph: :class:`tlp.Graph`
:throws: an exception if the provided sub-graph is not a descendant of the graph attached to the property
%End

%MethodCode
    if (a1) {
        if (!sipCpp->getGraph()->isDescendantGraph(a1) && a1 != sipCpp->getGraph()) {
            sipIsErr = 1;
            std::ostringstream oss;
            oss << "Error : <graph " << a1->getName() << " (id " << a1->getId() << ")>";
            oss << "is not a descendant of <graph " << sipCpp->getGraph()->getName() << " (id " << sipCpp->getGraph()->getId() << ")>";
            PyErr_SetString(PyExc_Exception, oss.str().c_str());
        }
    }
    if (sipIsErr == 0) {
        sipCpp->rotateX(a0, a1);
    }
%End


//===========================================================================================

        void rotateY(const double &alpha, tlp::Graph *subgraph=NULL);
%Docstring
tlp.LayoutProperty.rotateY(alpha[, subgraph = None])

.. versionadded:: 3.7

Rotates the layout around the Y-axis according to an angle in degrees.

:param alpha: an angle in degrees
:type alpha: float
:param subgraph: a sub-graph can be given in parameter, in that case rotates the layout of the nodes belonging to that sub-graph.
:type subgraph: :class:`tlp.Graph`
:throws: an exception if the provided sub-graph is not a descendant of the graph attached to the property
%End

%MethodCode
    if (a1) {
        if (!sipCpp->getGraph()->isDescendantGraph(a1) && a1 != sipCpp->getGraph()) {
            sipIsErr = 1;
            std::ostringstream oss;
            oss << "Error : <graph " << a1->getName() << " (id " << a1->getId() << ")>";
            oss << "is not a descendant of <graph " << sipCpp->getGraph()->getName() << " (id " << sipCpp->getGraph()->getId() << ")>";
            PyErr_SetString(PyExc_Exception, oss.str().c_str());
        }
    }
    if (sipIsErr == 0) {
        sipCpp->rotateY(a0, a1);
    }
%End

//===========================================================================================
  
        void rotateZ(const double &alpha, tlp::Graph *subgraph=NULL);
%Docstring
tlp.LayoutProperty.rotateZ(alpha[, subgraph = None])

Rotates the layout around the Z-axis according to an angle in degrees.

:param alpha: an angle in degrees
:type alpha: float
:param subgraph: a sub-graph can be given in parameter, in that case rotates the layout of the nodes belonging to that sub-graph.
:type subgraph: :class:`tlp.Graph`
:throws: an exception if the provided sub-graph is not a descendant of the graph attached to the property
%End 

%MethodCode
    if (a1) {
        if (!sipCpp->getGraph()->isDescendantGraph(a1) && a1 != sipCpp->getGraph()) {
            sipIsErr = 1;
            std::ostringstream oss;
            oss << "Error : <graph " << a1->getName() << " (id " << a1->getId() << ")>";
            oss << "is not a descendant of <graph " << sipCpp->getGraph()->getName() << " (id " << sipCpp->getGraph()->getId() << ")>";
            PyErr_SetString(PyExc_Exception, oss.str().c_str());
        }
    }
    if (sipIsErr == 0) {
        sipCpp->rotateZ(a0, a1);
    }
%End

//===========================================================================================

        void rotateX(const double &alpha, tlp::Iterator<tlp::node> *itNodes, tlp::Iterator<tlp::edge> *itEdges);
%Docstring
tlp.LayoutProperty.rotateX(alpha, itNodes, itEdges)

Rotates the layout around the X-axis of the nodes and edges provided through iterators according to an angle in degrees. 

:param alpha: an angle in degrees
:type alpha: float
:param itNodes: an iterator on graph nodes
:type itNodes: :class:`tlp.IteratorNode`
:param itEdges: an iterator on graph edges
:type itEdges: :class:`tlp.IteratorEdge`
%End
	
//===========================================================================================	
	
        void rotateY(const double &alpha, tlp::Iterator<tlp::node> *itNodes, tlp::Iterator<tlp::edge> *itEdges);
%Docstring
tlp.LayoutProperty.rotateY(alpha, itNodes, itEdges)

Rotates the layout around the Y-axis of the nodes and edges provided through iterators according to an angle in degrees. 

:param alpha: an angle in degrees
:type alpha: float
:param itNodes: an iterator on graph nodes
:type itNodes: :class:`tlp.IteratorNode`
:param itEdges: an iterator on graph edges
:type itEdges: :class:`tlp.IteratorEdge`
%End
	
//===========================================================================================	
	
        void rotateZ(const double &alpha, tlp::Iterator<tlp::node> *itNodes, tlp::Iterator<tlp::edge> *itEdges);
%Docstring
tlp.LayoutProperty.rotateZ(alpha, itNodes, itEdges)

Rotates the layout around the Z-axis of the nodes and edges provided through iterators according to an angle in degrees. 

:param alpha: an angle in degrees
:type alpha: float
:param itNodes: an iterator on graph nodes
:type itNodes: :class:`tlp.IteratorNode`
:param itEdges: an iterator on graph edges
:type itEdges: :class:`tlp.IteratorEdge`
%End	
	
//===========================================================================================	
	
     void center(tlp::Graph *subgraph=NULL);
%Docstring
tlp.LayoutProperty.center([subgraph = None])

Centers the layout, meaning translating it in order that the center of its bounding box is (0,0,0)

:param subgraph: a sub-graph can be given in parameter, in that case only centers the layout of that sub-graph.
:type subgraph: :class:`tlp.Graph`
:throws: an exception if the provided sub-graph is not a descendant of the graph attached to the property
%End

%MethodCode
    if (a0) {
        if (!sipCpp->getGraph()->isDescendantGraph(a0) && a0 != sipCpp->getGraph()) {
            sipIsErr = 1;
            std::ostringstream oss;
            oss << "Error : <graph " << a0->getName() << " (id " << a0->getId() << ")>";
            oss << "is not a descendant of <graph " << sipCpp->getGraph()->getName() << " (id " << sipCpp->getGraph()->getId() << ")>";
            PyErr_SetString(PyExc_Exception, oss.str().c_str());
        }
    }
    if (sipIsErr == 0) {
        sipCpp->center(a0);
    }
%End

//===========================================================================================

     void center(const tlp::Vec3f &newCenter, tlp::Graph *subgraph=NULL);
%Docstring
tlp.LayoutProperty.center(newCenter[, subgraph = None])

.. versionadded:: 3.7

Centers the layout to newCenter, meaning translating it in order that
the center of its bounding box is equal to newCenter.

:param newCenter: the new center of the layout
:type newCenter: :class:`tlp.Vec3f`
:param subgraph: a sub-graph can be given in parameter, in that case only centers the layout of that sub-graph.
:type subgraph: :class:`tlp.Graph`
:throws: an exception if the provided sub-graph is not a descendant of the graph attached to the property
%End

%MethodCode
    if (a1) {
        if (!sipCpp->getGraph()->isDescendantGraph(a1) && a1 != sipCpp->getGraph()) {
            sipIsErr = 1;
            std::ostringstream oss;
            oss << "Error : <graph " << a1->getName() << " (id " << a1->getId() << ")>";
            oss << "is not a descendant of <graph " << sipCpp->getGraph()->getName() << " (id " << sipCpp->getGraph()->getId() << ")>";
            PyErr_SetString(PyExc_Exception, oss.str().c_str());
        }
    }
    if (sipIsErr == 0) {
        sipCpp->center(*a0, a1);
    }
%End

//===========================================================================================	
	
        void normalize(tlp::Graph *subgraph=NULL);
%Docstring
tlp.LayoutProperty.normalize([subgraph = None])

Normalizes the layout, meaning dividing each nodes and edges coordinate by the maximum magnitude of the whole coordinates set

:param subgraph: a sub-graph can be given in parameter, in that case only normalizes the layout of that sub-graph.
:type subgraph: :class:`tlp.Graph`
:throws: an exception if the provided sub-graph is not a descendant of the graph attached to the property
%End

%MethodCode
    if (a0) {
        if (!sipCpp->getGraph()->isDescendantGraph(a0) && a0 != sipCpp->getGraph()) {
            sipIsErr = 1;
            std::ostringstream oss;
            oss << "Error : <graph " << a0->getName() << " (id " << a0->getId() << ")>";
            oss << "is not a descendant of <graph " << sipCpp->getGraph()->getName() << " (id " << sipCpp->getGraph()->getId() << ")>";
            PyErr_SetString(PyExc_Exception, oss.str().c_str());
        }
    }
    if (sipIsErr == 0) {
        sipCpp->normalize(a0);
    }
%End
	
//===========================================================================================	
	
	void perfectAspectRatio();
%Docstring
tlp.LayoutProperty.perfectAspectRatio()

Scales the layout in order to approach an aspect ratio (width / height) of 1.0 . 
%End  
  
//=========================================================================================== 
  
        double edgeLength(const tlp::edge e);
%Docstring
tlp.LayoutProperty.edgeLength(edge)

Returns the length of an edge, the bends are taken into account.
Thus, it measures the length of a polyline.

:param edge: an existing edge
:type edge: :class:`tlp.edge`
:rtype: float
:throws: an exception if the edge does not belong to the graph attached to the property

.. warning:: This function only measures the length of the polyline between bends, when using curves like Bezier etc... the result will not be the length of the curve.
%End

%MethodCode
        if (sipCpp->getGraph()->isElement(*a0)) {
		sipRes = sipCpp->edgeLength(*a0);
	} else {
		sipIsErr = throwInvalidEdgeException(sipCpp->getGraph(), *a0);
	}
%End

//===========================================================================================

  double averageEdgeLength(const tlp::Graph *subgraph=NULL);
%Docstring
tlp.LayoutProperty.averageEdgeLength([subgraph=None])

.. versionadded:: 3.7

Returns the average edge length of the layout, the bends are taken into account.

:param subgraph: a sub-graph can be given in parameter, in that case only computes the average edge length for that sub-graph.
:type subgraph: :class:`tlp.Graph`
:rtype: float
:throws: an exception if the provided sub-graph is not a descendant of the graph attached to the property
%End

%MethodCode
    if (a0) {
        if (!sipCpp->getGraph()->isDescendantGraph(a0) && a0 != sipCpp->getGraph()) {
            sipIsErr = 1;
            std::ostringstream oss;
            oss << "Error : <graph " << a0->getName() << " (id " << a0->getId() << ")>";
            oss << "is not a descendant of <graph " << sipCpp->getGraph()->getName() << " (id " << sipCpp->getGraph()->getId() << ")>";
            PyErr_SetString(PyExc_Exception, oss.str().c_str());
        }
    }

    if (sipIsErr == 0) {
        sipRes = sipCpp->averageEdgeLength(a0);
    }
%End

//===========================================================================================
  
        double averageAngularResolution(const tlp::Graph *subgraph=NULL);
%Docstring
tlp.LayoutProperty.averageAngularResolution([subgraph = None])

Returns the average angular resolution of the layout.
It is only defined for 2D drawing, meaning the third coordinate is omitted

:param subgraph: a sub-graph can be given in parameter, in that case computes the average angular resolution for the layout of the nodes belonging to that sub-graph.
:type subgraph: :class:`tlp.Graph`
:rtype: float
:throws: an exception if the provided sub-graph is not a descendant of the graph attached to the property
%End
  
%MethodCode
    if (a0) {
        if (!sipCpp->getGraph()->isDescendantGraph(a0) && a0 != sipCpp->getGraph()) {
            sipIsErr = 1;
            std::ostringstream oss;
            oss << "Error : <graph " << a0->getName() << " (id " << a0->getId() << ")>";
            oss << "is not a descendant of <graph " << sipCpp->getGraph()->getName() << " (id " << sipCpp->getGraph()->getId() << ")>";
            PyErr_SetString(PyExc_Exception, oss.str().c_str());
        }
    }

    if (sipIsErr == 0) {
        sipRes = sipCpp->averageAngularResolution(a0);
    }
%End

//===========================================================================================  
  
        double averageAngularResolution(const tlp::node n, const tlp::Graph *subgraph=NULL);
%Docstring
tlp.LayoutProperty.averageAngularResolution(node[, subgraph = None])

Returns the average angular resolution of a node.
It is only defined for 2D drawing, meaning the third coordinate is omitted

:param node: an existing node
:type node: :class:`tlp.node`
:param subgraph: a sub-graph can be given in parameter, in that case computes the average angular resolution of a node in that sub-graph.
:type subgraph: :class:`tlp.Graph`
:rtype: float
:throws: an exception if the node does not belong to the graph attached to the property or if the provided sub-graph is not a descendant of the graph attached to the property
%End 


%MethodCode
    if (a1) {
        if (!sipCpp->getGraph()->isDescendantGraph(a1) && a1 != sipCpp->getGraph()) {
            sipIsErr = 1;
            std::ostringstream oss;
            oss << "Error : <graph " << a1->getName() << " (id " << a1->getId() << ")>";
            oss << "is not a descendant of <graph " << sipCpp->getGraph()->getName() << " (id " << sipCpp->getGraph()->getId() << ")>";
            PyErr_SetString(PyExc_Exception, oss.str().c_str());
        }
    }
    if (sipIsErr == 0) {
	if (sipCpp->getGraph()->isElement(*a0)) {
		if (a1 && a1->isElement(*a0)) {
			sipRes = sipCpp->averageAngularResolution(*a0, a1);
		} else {
			if (!a1) {
				sipRes = sipCpp->averageAngularResolution(*a0);
			} else {
				sipIsErr = throwInvalidNodeException(const_cast<tlp::Graph*>(a1), *a0);
			}
		}
	} else {
		sipIsErr = throwInvalidNodeException(sipCpp->getGraph(), *a0);
        }
    }
%End
  
//===========================================================================================  
  
        std::vector<double> angularResolutions(const tlp::node n, const tlp::Graph *subgraph=NULL);
%Docstring
tlp.LayoutProperty.angularResolutions(node[, subgraph=None])

Returns a list of all angular resolution of a node.
It is only defined for 2D drawing, meaning the third coordinates is omitted

:param node: an existing node
:type node: :class:`tlp.node`
:param subgraph: a sub-graph can be given in parameter, in that case returns the list of angular resolution for the node in that sub-graph
:type subgraph: :class:`tlp.Graph`
:rtype: list of float
:throws: an exception if the node does not belong to the graph attached to the property or if the provided sub-graph is not a descendant of the graph attached to the property
%End

%MethodCode
    if (a1) {
        if (!sipCpp->getGraph()->isDescendantGraph(a1) && a1 != sipCpp->getGraph()) {
            sipIsErr = 1;
            std::ostringstream oss;
            oss << "Error : <graph " << a1->getName() << " (id " << a1->getId() << ")>";
            oss << "is not a descendant of <graph " << sipCpp->getGraph()->getName() << " (id " << sipCpp->getGraph()->getId() << ")>";
            PyErr_SetString(PyExc_Exception, oss.str().c_str());
        }
    }
    if (sipIsErr == 0) {
	if (sipCpp->getGraph()->isElement(*a0)) {
		if (a1 && a1->isElement(*a0)) {
			sipRes = new std::vector<double>(sipCpp->angularResolutions(*a0, a1));
		} else {
			if (!a1) {
				sipRes = new std::vector<double>(sipCpp->angularResolutions(*a0));
			} else {
				sipIsErr = throwInvalidNodeException(const_cast<tlp::Graph*>(a1), *a0);
			}
		}
	} else {
		sipIsErr = throwInvalidNodeException(sipCpp->getGraph(), *a0);
        }
    }
%End

//===========================================================================================

        void computeEmbedding(tlp::Graph *subgraph=NULL);
%Docstring
tlp.LayoutProperty.computeEmbedding([subgraph=None])

Fixes embedding of the graph according to the layout,
ie. sort edges around nodes according to their neighbors/bends position in the layout.
Only works in 2D, the third coordinate is not taken into account.

:param subgraph: a sub-graph can be given in parameter, in that case fixes embedding of that sub-graph
:type subgraph: :class:`tlp.Graph`
:throws: an exception if the provided sub-graph is not a descendant of the graph attached to the property
%End  

%MethodCode
    if (a0) {
        if (!sipCpp->getGraph()->isDescendantGraph(a0) && a0 != sipCpp->getGraph()) {
            sipIsErr = 1;
            std::ostringstream oss;
            oss << "Error : <graph " << a0->getName() << " (id " << a0->getId() << ")>";
            oss << "is not a descendant of <graph " << sipCpp->getGraph()->getName() << " (id " << sipCpp->getGraph()->getId() << ")>";
            PyErr_SetString(PyExc_Exception, oss.str().c_str());
        }
    }

    if (sipIsErr == 0) {
        sipCpp->computeEmbedding(a0);
    }
%End
  
 //===========================================================================================
  
        void computeEmbedding(const tlp::node n, tlp::Graph *subgraph=NULL);
%Docstring
tlp.LayoutProperty.computeEmbedding(node[, subgraph=None])

Fixes embedding of the node according to the layout,
ie. sort edges around the node according to their neighbors/bends position in the layout.
Only works in 2D, the third coordinate is not taken into account.

:param subgraph: a sub-graph can be given in parameter, in that case fixes embedding of the node in that sub-graph
:type subgraph: :class:`tlp.Graph`
:throws: an exception if the node does not belong to the graph attached to the property or if the provided sub-graph is not a descendant of the graph attached to the property
%End

%MethodCode

    if (a1) {
        if (!sipCpp->getGraph()->isDescendantGraph(a1) && a1 != sipCpp->getGraph()) {
            sipIsErr = 1;
            std::ostringstream oss;
            oss << "Error : <graph " << a1->getName() << " (id " << a1->getId() << ")>";
            oss << "is not a descendant of <graph " << sipCpp->getGraph()->getName() << " (id " << sipCpp->getGraph()->getId() << ")>";
            PyErr_SetString(PyExc_Exception, oss.str().c_str());
        }
    }
    if (sipIsErr == 0) {
	if (sipCpp->getGraph()->isElement(*a0)) {
		if (a1 && a1->isElement(*a0)) {
			sipCpp->computeEmbedding(*a0, a1);
		} else {
			if (!a1) {
				sipCpp->computeEmbedding(*a0);
			} else {
				sipIsErr = throwInvalidNodeException(const_cast<tlp::Graph*>(a1), *a0);
			}
		}
	} else {
		sipIsErr = throwInvalidNodeException(sipCpp->getGraph(), *a0);
	} 
    }
%End

 //===========================================================================================
  
//  	unsigned int crossingNumber() const;
//%Docstring
//tlp.LayoutProperty.crossingNumber()

//Returns the number of edges crossings in the layout.
//%End
  	

private:

  void treatEvent(const tlp::Event&);