equal
deleted
inserted
replaced
32 from graphics.ToolTipProducer import ToolTipProducer |
32 from graphics.ToolTipProducer import ToolTipProducer |
33 from graphics.DebugDataConsumer import DebugDataConsumer |
33 from graphics.DebugDataConsumer import DebugDataConsumer |
34 |
34 |
35 # ------------------------------------------------------------------------------- |
35 # ------------------------------------------------------------------------------- |
36 # Common constants |
36 # Common constants |
|
37 # |
|
38 # Definition of constants for dimensions of graphic elements |
37 # ------------------------------------------------------------------------------- |
39 # ------------------------------------------------------------------------------- |
38 |
|
39 """ |
|
40 Definition of constants for dimensions of graphic elements |
|
41 """ |
|
42 |
40 |
43 # FBD and SFC constants |
41 # FBD and SFC constants |
44 MIN_MOVE = 5 # Minimum move before starting a element dragging |
42 MIN_MOVE = 5 # Minimum move before starting a element dragging |
45 CONNECTOR_SIZE = 8 # Size of connectors |
43 CONNECTOR_SIZE = 8 # Size of connectors |
46 BLOCK_LINE_SIZE = 20 # Minimum size of each line in a block |
44 BLOCK_LINE_SIZE = 20 # Minimum size of each line in a block |
126 if constraint == 1 and xround < fraction: |
124 if constraint == 1 and xround < fraction: |
127 xround += 1 |
125 xround += 1 |
128 return int(xround * n) |
126 return int(xround * n) |
129 |
127 |
130 |
128 |
131 """ |
129 # ------------------------------------------------------------------------------- |
132 Basic vector operations for calculate wire points |
130 # Basic vector operations for calculate wire points |
133 """ |
131 # ------------------------------------------------------------------------------- |
134 |
|
135 |
132 |
136 def vector(p1, p2, normal=True): |
133 def vector(p1, p2, normal=True): |
137 """ |
134 """ |
138 Create a vector from two points and define if vector must be normal |
135 Create a vector from two points and define if vector must be normal |
139 """ |
136 """ |