|
From: <ma...@us...> - 2011-01-30 15:47:09
|
Revision: 273
http://openautomation.svn.sourceforge.net/openautomation/?rev=273&view=rev
Author: mayerch
Date: 2011-01-30 15:47:02 +0000 (Sun, 30 Jan 2011)
Log Message:
-----------
Added new stub block (an integral) and extended the drawing mechanism for that
Modified Paths:
--------------
PyWireGate/trunk/logic_editor/backendCommunication.js
PyWireGate/trunk/logic_editor/gle/gle.block.js
Modified: PyWireGate/trunk/logic_editor/backendCommunication.js
===================================================================
--- PyWireGate/trunk/logic_editor/backendCommunication.js 2011-01-30 15:19:36 UTC (rev 272)
+++ PyWireGate/trunk/logic_editor/backendCommunication.js 2011-01-30 15:47:02 UTC (rev 273)
@@ -93,7 +93,7 @@
'color': [0.0, 0.0, 0.0],
'background': [1.0, 1.0, 1.0],
'mask': [
- { 'type': 'move', 'x': 0.999, 'y': 0.5 }, // just to show what's possible
+ { 'type': 'move', 'x': 0.999, 'y': 0.5 }, // it must allways start with a move!
{ 'type': 'line', 'x': 0 , 'y': 0.999 },
{ 'type': 'line', 'x': 0 , 'y': 0 },
{ 'type': 'close' }
@@ -192,6 +192,49 @@
'default': '|++'
}
]
+ },
+ 'integral': {
+ 'width': 75,
+ 'height': 75,
+ 'rotation': 0,
+ 'flip': false,
+ 'color': [0.0, 0.0, 0.0],
+ 'background': [1.0, 1.0, 1.0],
+ 'mask': [
+ { 'type': 'move', 'x': 0 , 'y': 0 }, // it must allways start with a move!
+ { 'type': 'line', 'x': 0 , 'y': 0.999 },
+ { 'type': 'line', 'x': 0.999, 'y': 0.999 },
+ { 'type': 'line', 'x': 0.999, 'y': 0 },
+ { 'type': 'close' },
+ { 'type': 'new', 'fill': 'none' },
+ { 'type': 'move', 'x': 0.55 , 'y': 0.1 },
+ { 'type': 'arc' , 'x': 0.50 , 'y': 0.1 ,
+ 'rx': 0.025, 'ry': 0.025, 'xRotate':0, 'large':true, 'clockwise': false,
+ 'relative': false
+ },
+ { 'type': 'line', 'x': 0.5 , 'y': 0.9 },
+ { 'type': 'arc' , 'x': 0.45 , 'y': 0.9 ,
+ 'rx': 0.025, 'ry': 0.025, 'xRotate':0, 'large':true, 'clockwise': true,
+ 'relative': false
+ }
+ ],
+ 'maskOptions': {
+ 'showLabel': false
+ },
+ 'inPorts': [
+ {
+ 'name': 'in',
+ 'type': 'event'
+ }
+ ],
+ 'outPorts': [
+ {
+ 'name': 'out',
+ 'type': 'event'
+ }
+ ],
+ 'parameters': [
+ ]
}
}
};
Modified: PyWireGate/trunk/logic_editor/gle/gle.block.js
===================================================================
--- PyWireGate/trunk/logic_editor/gle/gle.block.js 2011-01-30 15:19:36 UTC (rev 272)
+++ PyWireGate/trunk/logic_editor/gle/gle.block.js 2011-01-30 15:47:02 UTC (rev 273)
@@ -109,6 +109,12 @@
case 'close':
path.close();
break;
+
+ case 'new': // start a new path
+ canvas.path( body, path, style );
+ if( obj.fill !== undefined ) style.fill = obj.fill;
+ path = canvas.createPath();
+ break;
}
}
canvas.path( body, path, style );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|