| 1 |
#!/usr/bin/env python |
|---|
| 2 |
##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 3 |
##~ License |
|---|
| 4 |
##~ |
|---|
| 5 |
##- The RuneBlade Foundation library is intended to ease some |
|---|
| 6 |
##- aspects of writing intricate Jabber, XML, and User Interface (wxPython, etc.) |
|---|
| 7 |
##- applications, while providing the flexibility to modularly change the |
|---|
| 8 |
##- architecture. Enjoy. |
|---|
| 9 |
##~ |
|---|
| 10 |
##~ Copyright (C) 2002 TechGame Networks, LLC. |
|---|
| 11 |
##~ |
|---|
| 12 |
##~ This library is free software; you can redistribute it and/or |
|---|
| 13 |
##~ modify it under the terms of the BSD style License as found in the |
|---|
| 14 |
##~ LICENSE file included with this distribution. |
|---|
| 15 |
##~ |
|---|
| 16 |
##~ TechGame Networks, LLC can be reached at: |
|---|
| 17 |
##~ 3578 E. Hartsel Drive #211 |
|---|
| 18 |
##~ Colorado Springs, Colorado, USA, 80920 |
|---|
| 19 |
##~ |
|---|
| 20 |
##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 21 |
|
|---|
| 22 |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 23 |
#~ Imports |
|---|
| 24 |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 25 |
|
|---|
| 26 |
from DOTSkinObject import DOTSkinObject |
|---|
| 27 |
|
|---|
| 28 |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 29 |
#~ Class Initialization |
|---|
| 30 |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 31 |
|
|---|
| 32 |
class node_settings(DOTSkinObject): |
|---|
| 33 |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 34 |
#~ Constants / Variables / Etc. |
|---|
| 35 |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 36 |
|
|---|
| 37 |
default_settings = DOTSkinObject.default_settings.copy() |
|---|
| 38 |
default_settings.update({ |
|---|
| 39 |
# bottomlabel auxiliary label for nodes of shape M* |
|---|
| 40 |
# color black node shape color |
|---|
| 41 |
# comment any string (format-dependent) |
|---|
| 42 |
# distortion 0.0 node distortion for shape=polygon |
|---|
| 43 |
# fillcolor lightgrey/black node fill color |
|---|
| 44 |
# fixedsize false label text has no affect on node size |
|---|
| 45 |
# fontcolor black type face color |
|---|
| 46 |
# fontname Times-Roman font family |
|---|
| 47 |
# fontsize 14 point size of label |
|---|
| 48 |
# group name of nodes group |
|---|
| 49 |
# height .5 height in inches |
|---|
| 50 |
# label node name any string |
|---|
| 51 |
# layer overlay range all, id or id:id |
|---|
| 52 |
# orientation 0.0 node rotation angle |
|---|
| 53 |
# peripheries shape-dependent number of node boundaries |
|---|
| 54 |
# regular false force polygon to be regular |
|---|
| 55 |
# shape ellipse node shape; see Section 2.1 and Appendix E |
|---|
| 56 |
# shapefile external EPSF or SVG custom shape file |
|---|
| 57 |
# sides 4 number of sides for shape=polygon |
|---|
| 58 |
# skew 0.0 skewing of node for shape=polygon |
|---|
| 59 |
# style graphics options, e.g. bold, dotted, filled; cf. Section 2.3 |
|---|
| 60 |
# toplabel auxiliary label for nodes of shape M* |
|---|
| 61 |
# URL URL associated with node (format-dependent) |
|---|
| 62 |
# width .75 width in inches |
|---|
| 63 |
# z 0.0 z coordinate for VRML output |
|---|
| 64 |
}) |
|---|
| 65 |
|
|---|
| 66 |
_DOTRelatedAttributes = { |
|---|
| 67 |
'bottomlabel':1, 'color':1, 'comment':1, 'distortion':1, 'fillcolor':1, 'fixedsize':1, 'fontcolor':1, 'fontname':1, |
|---|
| 68 |
'fontsize':1, 'group':1, 'height':1, 'label':1, 'layer':1, 'orientation':1, 'peripheries':1, 'regular':1, 'shape':1, |
|---|
| 69 |
'shapefile':1, 'sides':1, 'skew':1, 'style':1, 'filled':1, 'toplabel':1, 'URL':1, 'width':1, 'z':1, } |
|---|
| 70 |
|
|---|
| 71 |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 72 |
#~ Public |
|---|
| 73 |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|---|
| 74 |
|
|---|
| 75 |
def _toDOT(self, joinstr='\n', close=1): |
|---|
| 76 |
return 'node [%s]%s' % (self._OutputDOTSettings(), close and ';' or '') |
|---|
| 77 |
|
|---|