Lines Matching +full:v +full:- +full:gen

2  * $Id: mxElectrical.js,v 1.0 2016/10/25 17:05:39 mate Exp $
3 * Copyright (c) 2006-2016, JGraph Ltd
44 c.ellipse(w * 0.5 - size / 2, 0, size, size);
111 c.moveTo(w - x1, 0);
112 c.lineTo(w - x1, h - y1);
113 c.lineTo(w, h - y1);
115 c.lineTo(0, h - y1);
116 c.lineTo(x1, h - y1);
129 //Two-Line Bus Elbow
178 c.moveTo(0, h - hn);
179 c.lineTo(w - wn, h - hn);
180 c.lineTo(w - wn, 0);
194 return new mxPoint(bounds.x + bounds.width / 4, bounds.y + bounds.height - notch);
197 this.state.style['notch'] = Math.round(0.2 * Math.max(0, bounds.width - pt.y + bounds.y)) / 0.2;
205 //Three-Line Bus Elbow
254 c.moveTo(0, h - hn);
255 c.lineTo(w - wn, h - hn);
256 c.lineTo(w - wn, 0);
260 c.moveTo(0, h - hn / 2);
261 c.lineTo(w - wn / 2, h - hn / 2);
262 c.lineTo(w - wn / 2, 0);
276 return new mxPoint(bounds.x + bounds.width / 4, bounds.y + bounds.height - notch);
279 this.state.style['notch'] = Math.round(0.2 * Math.max(0, bounds.width - pt.y + bounds.y)) / 0.2;
287 //Four-Line Bus Elbow
336 c.moveTo(0, h - hn);
337 c.lineTo(w - wn, h - hn);
338 c.lineTo(w - wn, 0);
342 c.moveTo(0, h - hn / 3);
343 c.lineTo(w - wn / 3, h - hn / 3);
344 c.lineTo(w - wn / 3, 0);
348 c.moveTo(0, h - hn * 2 / 3);
349 c.lineTo(w - wn * 2 / 3, h - hn * 2 / 3);
350 c.lineTo(w - wn * 2 / 3, 0);
364 return new mxPoint(bounds.x + bounds.width / 4, bounds.y + bounds.height - notch);
367 this.state.style['notch'] = Math.round(0.2 * Math.max(0, bounds.width - pt.y + bounds.y)) / 0.2;
374 //Four-Line Bus Elbow
423 c.moveTo(0, h - hn);
424 c.lineTo(w - wn, h - hn);
425 c.lineTo(w - wn, 0);
429 c.moveTo(0, h - hn / 7);
430 c.lineTo(w - wn / 7, h - hn / 7);
431 c.lineTo(w - wn / 7, 0);
435 c.moveTo(0, h - hn * 2 / 7);
436 c.lineTo(w - wn * 2 / 7, h - hn * 2 / 7);
437 c.lineTo(w - wn * 2 / 7, 0);
441 c.moveTo(0, h - hn * 3 / 7);
442 c.lineTo(w - wn * 3 / 7, h - hn * 3 / 7);
443 c.lineTo(w - wn * 3 / 7, 0);
447 c.moveTo(0, h - hn * 4 / 7);
448 c.lineTo(w - wn * 4 / 7, h - hn * 4 / 7);
449 c.lineTo(w - wn * 4 / 7, 0);
453 c.moveTo(0, h - hn * 5 / 7);
454 c.lineTo(w - wn * 5 / 7, h - hn * 5 / 7);
455 c.lineTo(w - wn * 5 / 7, 0);
459 c.moveTo(0, h - hn * 6 / 7);
460 c.lineTo(w - wn * 6 / 7, h - hn * 6 / 7);
461 c.lineTo(w - wn * 6 / 7, 0);
476 return new mxPoint(bounds.x + bounds.width / 4, bounds.y + bounds.height - notch);
479 this.state.style['notch'] = Math.round(0.2 * Math.max(0, bounds.width - pt.y + bounds.y)) / 0.2;
602 c.ellipse(w * 0.8, h * 0.5 - negSize * 0.5, negSize, negSize);
683 c.ellipse(w * 0.8, h * 0.5 - negSize * 0.5, negSize, negSize);
696 //Dual In-Line IC
733 {name: 'pinLabelType', dispName: 'Pin Label Type', type: 'enum', defVal:'gen',
735 {val:'gen', dispName:'Generated'},
753 var pinLabelType = mxUtils.getValue(this.style, 'pinLabelType', 'gen');
760 c.rect(10, 0, w - 20, h);
764 c.rect(0, 10, w, h - 20);
796 c.moveTo(w - 10, currH);
808 if (pinLabelType == 'gen')
812 else if (currPinNum - 1 < labelNames.length)
814 …c.text(20, currH, 0, 0, labelNames[currPinNum - 1].toString(), mxConstants.ALIGN_LEFT, mxConstants…
819 var pc2 = 2 * pinsOne - pinCount + 1;
823 var pc2 = pinsOne - pinCount + 1;
826 if (pinLabelType == 'gen')
828 …c.text(w - 20, currH, 0, 0, pc2.toString(), mxConstants.ALIGN_RIGHT, mxConstants.ALIGN_MIDDLE, 0, …
830 else if (pc2 - 1 < labelNames.length)
832 …c.text(w - 20, currH, 0, 0, labelNames[pc2 - 1].toString(), mxConstants.ALIGN_RIGHT, mxConstants.A…
845 c.moveTo(currH, h - 10);
850 var currPinNum = pinsOne - pinCount + 1;
854 var currPinNum = 2 * pinsOne - pinCount + 1;
857 if (pinLabelType == 'gen')
861 else if (currPinNum - 1 < labelNames.length)
863 …c.text(currH, 20, 0, 0, labelNames[currPinNum - 1].toString(), mxConstants.ALIGN_CENTER, mxConstan…
875 if (pinLabelType == 'gen')
877 …c.text(currH, h - 20, 0, 0, pc2.toString(), mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0,…
879 else if (pc2 - 1 < labelNames.length)
881 …c.text(currH, h - 20, 0, 0, labelNames[pc2 - 1].toString(), mxConstants.ALIGN_CENTER, mxConstants.…
902 c.rect(0, currH - pinSpacing * 0.25, 10, pinSpacing * 0.5);
906 c.rect(w - 10, currH - pinSpacing * 0.25, 10, pinSpacing * 0.5);
918 if (pinLabelType == 'gen')
922 else if (currPinNum - 1 < labelNames.length)
924 …c.text(5, currH + 1, 0, 0, labelNames[currPinNum - 1].toString(), mxConstants.ALIGN_CENTER, mxCons…
929 var pc2 = 2 * pinsOne - pinCount + 1;
933 var pc2 = pinsOne - pinCount + 1;
936 if (pinLabelType == 'gen')
938 …c.text(w - 5, currH + 1, 0, 0, pc2.toString(), mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE,…
940 else if (pc2 - 1 < labelNames.length)
942 …c.text(w - 5, currH + 1, 0, 0, labelNames[pc2 - 1].toString(), mxConstants.ALIGN_CENTER, mxConstan…
954 c.rect(currH - pinSpacing * 0.25, 0, pinSpacing * 0.5, 10);
958 c.rect(currH - pinSpacing * 0.25, h - 10, pinSpacing * 0.5, 10);
963 var currPinNum = pinsOne - pinCount + 1;
967 var currPinNum = 2 * pinsOne - pinCount + 1;
970 if (pinLabelType == 'gen')
974 else if (currPinNum - 1 < labelNames.length)
976 …c.text(currH, 5, 0, 0, labelNames[currPinNum - 1].toString(), mxConstants.ALIGN_CENTER, mxConstant…
988 if (pinLabelType == 'gen')
990 …c.text(currH, h - 5, 0, 0, pc2.toString(), mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0, …
992 else if (pc2 - 1 < labelNames.length)
994 …c.text(currH, h - 5, 0, 0, labelNames[pc2 - 1].toString(), mxConstants.ALIGN_CENTER, mxConstants.A…
1012 c.moveTo(w, h * 0.5 - 10);
1019 c.moveTo(w * 0.5 - 10, h);
1026 c.moveTo(0, h * 0.5 - 10);
1033 c.moveTo(w * 0.5 - 10, 0);
1115 {name: 'pinLabelType', dispName: 'Pin Label Type', type: 'enum', defVal:'gen',
1117 {val:'gen', dispName:'Generated'},
1135 c.lineTo(w - 15, 10);
1136 c.lineTo(w - 10, 15);
1137 c.lineTo(w - 10, h - 15);
1138 c.lineTo(w - 15, h - 10);
1139 c.lineTo(15, h - 10);
1140 c.lineTo(10, h - 15);
1147 var pinLabelType = mxUtils.getValue(this.style, 'pinLabelType', 'gen');
1162 var pinsVOne = parseInt((h - pinSpacing - 40) / pinSpacing) + 1;
1163 var pinsHOne = parseInt((w - pinSpacing - 40) / pinSpacing) + 1;
1165 while (currH <= h - pinSpacing * 0.5 - 20)
1169 c.moveTo(w - 10, currH);
1187 if (pinLabelType == 'gen')
1191 else if (currPinNum - 1 < labelNames.length)
1193 …c.text(20, currH, 0, 0, labelNames[currPinNum - 1].toString(), mxConstants.ALIGN_CENTER, mxConstan…
1199 var pc2 = pinsHOne + 2 * pinsVOne - pinCount + 1;
1202 var pc2 = 2 * pinsHOne + 2 * pinsVOne - pinCount + 1;
1205 var pc2 = pinsVOne - pinCount + 1;
1208 var pc2 = pinsHOne + pinsVOne - pinCount + 1;
1211 if (pinLabelType == 'gen')
1213 …c.text(w - 20, currH, 0, 0, pc2.toString(), mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE, 0,…
1215 else if (pc2 - 1 < labelNames.length)
1217 …c.text(w - 20, currH, 0, 0, labelNames[pc2 - 1].toString(), mxConstants.ALIGN_CENTER, mxConstants.…
1227 while (currH <= w - pinSpacing * 0.5 - 20)
1231 c.moveTo(currH, h - 10);
1249 if (pinLabelType == 'gen')
1251 …c.text(currH, h - 20, 0, 0, currPinNum.toString(), mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MID…
1253 else if (currPinNum - 1 < labelNames.length)
1255 …c.text(currH, h - 20, 0, 0, labelNames[currPinNum - 1].toString(), mxConstants.ALIGN_CENTER, mxCon…
1261 var pc2 = 2 * pinsHOne + 2 * pinsVOne - pinCount + 1;
1264 var pc2 = pinsHOne - pinCount + 1;
1267 var pc2 = pinsHOne + pinsVOne - pinCount + 1;
1270 var pc2 = 2 * pinsHOne + pinsVOne - pinCount + 1;
1273 if (pinLabelType == 'gen')
1277 else if (pc2 - 1 < labelNames.length)
1279 …c.text(currH, 20, 0, 0, labelNames[pc2 - 1].toString(), mxConstants.ALIGN_CENTER, mxConstants.ALIG…
1293 var pinsVOne = parseInt((h - pinSpacing - 40) / pinSpacing) + 1;
1294 var pinsHOne = parseInt((w - pinSpacing - 40) / pinSpacing) + 1;
1296 while (currH <= h - pinSpacing * 0.5 - 20)
1299 c.rect(0, currH - pinSpacing * 0.25, 10, pinSpacing * 0.5);
1303 c.rect(w - 10, currH - pinSpacing * 0.25, 10, pinSpacing * 0.5);
1321 if (pinLabelType == 'gen')
1325 else if (currPinNum - 1 < labelNames.length)
1327 …c.text(5, currH + 1, 0, 0, labelNames[currPinNum - 1].toString(), mxConstants.ALIGN_CENTER, mxCons…
1333 var pc2 = pinsHOne + 2 * pinsVOne - pinCount + 1;
1336 var pc2 = 2 * pinsHOne + 2 * pinsVOne - pinCount + 1;
1339 var pc2 = pinsVOne - pinCount + 1;
1342 var pc2 = pinsHOne + pinsVOne - pinCount + 1;
1345 if (pinLabelType == 'gen')
1347 …c.text(w - 5, currH + 1, 0, 0, pc2.toString(), mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDDLE,…
1349 else if (pc2 - 1 < labelNames.length)
1351 …c.text(w - 5, currH + 1, 0, 0, labelNames[pc2 - 1].toString(), mxConstants.ALIGN_CENTER, mxConstan…
1361 while (currH <= w - pinSpacing * 0.5 - 20)
1364 c.rect(currH - pinSpacing * 0.25, 0, pinSpacing * 0.5, 10);
1368 c.rect(currH - pinSpacing * 0.25, h - 10, pinSpacing * 0.5, 10);
1386 if (pinLabelType == 'gen')
1388 …c.text(currH, h - 4, 0, 0, currPinNum.toString(), mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MIDD…
1390 else if (currPinNum - 1 < labelNames.length)
1392 …c.text(currH, h - 4, 0, 0, labelNames[currPinNum - 1].toString(), mxConstants.ALIGN_CENTER, mxCons…
1398 var pc2 = 2 * pinsHOne + 2 * pinsVOne - pinCount + 1;
1401 var pc2 = pinsHOne - pinCount + 1;
1404 var pc2 = pinsHOne + pinsVOne - pinCount + 1;
1407 var pc2 = 2 * pinsHOne + pinsVOne - pinCount + 1;
1410 if (pinLabelType == 'gen')
1414 else if (pc2 - 1 < labelNames.length)
1416 …c.text(currH, 6, 0, 0, labelNames[pc2 - 1].toString(), mxConstants.ALIGN_CENTER, mxConstants.ALIGN…
1437 c.ellipse(w - 25, 15, 10, 10);
1440 c.ellipse(w - 25, h - 25, 10, 10);
1443 c.ellipse(15, h - 25, 10, 10);
1462 while (currH <= h - pinSpacing * 0.5 - 20)
1472 while (currH <= w - pinSpacing * 0.5 - 20)
1550 c.moveTo(w - 10, 0);
1552 c.lineTo(10, h * 0.9 - 10);
1553 c.lineTo(w - 10, h - 10);
1560 c.lineTo(w - 10, h * 0.1);
1561 c.lineTo(w - 10, h * 0.9 - 10);
1562 c.lineTo(10, h - 10);
1573 var spacing = (h - 16) / numInputs;
1578 var spacing = (h - 16) / numOutputs;
1587 c.moveTo(0, (h - 10) * 0.5);
1588 c.lineTo(10, (h - 10) * 0.5);
1603 c.moveTo(w - 10, (h - 10) * 0.5);
1604 c.lineTo(w, (h - 10) * 0.5);
1610 c.moveTo(w - 10, currH);
1612 …c.text(w - 14, currH + 1, 0, 0, '' + i.toString(), mxConstants.ALIGN_CENTER, mxConstants.ALIGN_MID…
1617 var spacing = (w - 20) / selectorPins;
1624 c.moveTo(currW, h - 10 - (currW - 10) / (w - 20) * h * 0.1);
1628 c.moveTo(currW, h - 10 - (w - currW - 10) / (w - 20) * h * 0.1);
1633 …c.text(currW + 5, h -4, 0, 0, 'S' + (selectorPins - i - 1).toString(), mxConstants.ALIGN_CENTER, m…
1645 var pinRange = (h - 16) / h;
1667 constr.push(new mxConnectionConstraint(new mxPoint(0, 0.5 * (h - 10) / h), false, 0, 0));
1680 constr.push(new mxConnectionConstraint(new mxPoint(1, 0.5), false, null, 0, -5));
1691 var spacing = (w - 20) / (w * selectorPins);
1740 var bNum = Math.floor((w - 20) / bw);
1741 var startX = (w - bNum * bw) * 0.5;
1748 c.moveTo(w - startX - bw * 0.2, h * 0.5);
1770 c.moveTo(currX - bw * 0.2, h * 0.5);
1827 c.moveTo(w * 0.5 - ss, h * 0.05 + i);
1829 c.moveTo(w * 0.5, h * 0.05 - ss + i);
1831 c.moveTo(w * 0.5 - ss, h * 0.95 - i);
1832 c.lineTo(w * 0.5 + ss, h * 0.95 - i);
2079 c.moveTo(w * 0.5 - ss, h * 0.05 + i);
2081 c.moveTo(w * 0.5, h * 0.05 - ss + i);
2083 c.moveTo(w * 0.5 - ss, h * 0.95 - i);
2084 c.lineTo(w * 0.5 + ss, h * 0.95 - i);