computerscare-vcv-modules

computerscare modules for VCV Rack
Log | Files | Refs

commit fa2fdccba235045e9e23317dc259c08ed3186fad
parent 37e5c9b415d3ac30cb3cf5d7c8b825e37a20ef0c
Author: Adam M <aemalone@gmail.com>
Date:   Sat,  9 Nov 2019 10:11:59 -0600

Add custom blank panel svg

Diffstat:
Ares/ComputerscareCustomBlankPanel.svg | 280+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/ComputerscareBlank.cpp | 95++++++++++++++++++++++++++++++++++++++-----------------------------------------
2 files changed, 326 insertions(+), 49 deletions(-)

diff --git a/res/ComputerscareCustomBlankPanel.svg b/res/ComputerscareCustomBlankPanel.svg @@ -0,0 +1,280 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="120" + height="380" + viewBox="0 0 31.75 100.54167" + version="1.1" + id="svg8" + inkscape:version="0.92.2 5c3e80d, 2017-08-06" + sodipodi:docname="ComputerscareCustomBlankPanel.svg" + style="enable-background:new"> + <defs + id="defs2" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="22.627418" + inkscape:cx="103.92905" + inkscape:cy="380.51735" + inkscape:document-units="mm" + inkscape:current-layer="g1669" + showgrid="false" + units="px" + inkscape:snap-bbox="true" + inkscape:snap-page="true" + inkscape:bbox-nodes="true" + inkscape:snap-bbox-edge-midpoints="true" + inkscape:window-width="1440" + inkscape:window-height="856" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:snap-global="false" + showguides="false" + inkscape:lockguides="false" /> + <metadata + id="metadata5"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-196.45832)" + style="display:none"> + <path + style="opacity:1;vector-effect:none;fill:#f0f0f0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.48607069;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" + d="M 0,196.45831 H 23.8125 V 296.99999 H 0 Z" + id="rect817" + inkscape:connector-curvature="0" /> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="8.2147436" + y="295.57718" + id="text1490" + transform="rotate(1.4468834)"><tspan + sodipodi:role="line" + id="tspan1488" + x="8.2147436" + y="295.57718" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332">computerscare</tspan></text> + <text + transform="rotate(-5.9989835)" + id="text1494" + y="288.0314" + x="-28.710276" + style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + xml:space="preserve"><tspan + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332" + y="288.0314" + x="-28.710276" + id="tspan1492" + sodipodi:role="line">trg</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="20.711658" + y="288.87244" + id="text1498" + transform="rotate(1.9714728)"><tspan + sodipodi:role="line" + id="tspan1496" + x="20.711658" + y="288.87244" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332">in</tspan></text> + <text + transform="rotate(0.49746114)" + id="text1521" + y="289.16214" + x="20.314623" + style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + xml:space="preserve"><tspan + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.17499995px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332" + y="289.16214" + x="20.314623" + id="tspan1519" + sodipodi:role="line">clr</tspan></text> + <text + transform="matrix(1.0139335,-0.02825079,0.06854811,0.98434808,0,0)" + id="text1645" + y="204.61243" + x="-10.296249" + style="font-style:normal;font-weight:normal;font-size:10.74719143px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26867977" + xml:space="preserve"><tspan + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:5.01535606px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26867977" + y="204.61243" + x="-10.296249" + id="tspan1643" + sodipodi:role="line">debug</tspan></text> + </g> + <g + inkscape:groupmode="layer" + id="layer3" + inkscape:label="bg" /> + <g + style="display:inline" + transform="translate(0,-196.45832)" + id="g1669" + inkscape:groupmode="layer" + inkscape:label="Layer 1 copy"> + <path + inkscape:connector-curvature="0" + id="path1647" + d="M 0,196.45832 H 31.75 V 296.99999 H 0 Z" + style="opacity:1;vector-effect:none;fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.4062123;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> + <g + aria-label="computerscare" + transform="matrix(1.1664995,-0.0322966,0.25814602,2.2890491,-83.115495,-385.16453)" + style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + id="text1651"> + <path + d="m 9.6121776,294.31823 -0.046432,0.34525 q -0.098037,-0.0705 -0.2034326,-0.0966 -0.1037239,-0.0283 -0.2162515,-0.0117 -0.2516319,0.0362 -0.4215572,0.28501 -0.1696684,0.24682 -0.2250109,0.65834 -0.055336,0.41147 0.053052,0.6203 0.1086577,0.20682 0.3602789,0.17065 0.1124589,-0.0161 0.2277443,-0.0739 0.1169862,-0.0601 0.2382454,-0.16223 l -0.045891,0.34123 q -0.1179719,0.0879 -0.23948,0.14064 -0.1201222,0.0527 -0.2508492,0.0715 -0.3556258,0.051 -0.5221666,-0.23793 -0.1665281,-0.28904 -0.09364,-0.83101 0.073968,-0.55002 0.3272057,-0.89547 0.2546406,-0.34565 0.6229339,-0.39859 0.1194695,-0.0171 0.2284159,0.003 0.1092703,0.0178 0.2066499,0.0727 z" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.31938398" + id="path1701" + inkscape:connector-curvature="0" /> + <path + d="m 10.651666,294.3381 q -0.208055,0.03 -0.360246,0.28013 -0.151936,0.24822 -0.206193,0.65168 -0.05426,0.40347 0.03391,0.61913 0.08985,0.21346 0.299292,0.18337 0.206629,-0.0297 0.358843,-0.27993 0.152204,-0.25023 0.206193,-0.65169 0.05372,-0.39944 -0.03586,-0.61493 -0.0893,-0.21748 -0.295944,-0.18776 z m 0.04211,-0.31313 q 0.337357,-0.0484 0.487835,0.23694 0.150465,0.28548 0.07596,0.83948 -0.07424,0.55202 -0.3092,0.89483 -0.234692,0.34082 -0.572058,0.38931 -0.338782,0.0487 -0.4892435,-0.23674 -0.1487901,-0.28767 -0.074554,-0.83968 0.074508,-0.55401 0.3077955,-0.89463 0.234692,-0.34081 0.573465,-0.38951 z" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.31938398" + id="path1703" + inkscape:connector-curvature="0" /> + <path + d="m 12.930128,294.22577 q 0.110716,-0.25116 0.250404,-0.37104 0.139682,-0.11986 0.318722,-0.12062 0.241011,-7.2e-4 0.356271,0.24732 0.115388,0.24626 0.08678,0.70336 l -0.0856,1.36731 -0.254786,7e-4 0.08483,-1.35519 q 0.02039,-0.32563 -0.04823,-0.48311 -0.06863,-0.15744 -0.229759,-0.15681 -0.19694,7.3e-4 -0.323272,0.19335 -0.126334,0.19262 -0.147097,0.52434 l -0.08018,1.28034 -0.254786,7.1e-4 0.08483,-1.35519 q 0.02051,-0.32766 -0.04824,-0.48311 -0.06863,-0.15744 -0.232514,-0.1568 -0.194184,7.3e-4 -0.320644,0.19537 -0.126334,0.19261 -0.146971,0.52231 l -0.08017,1.28032 -0.254781,7e-4 0.141788,-2.26537 0.254785,-7e-4 -0.02203,0.35193 q 0.09981,-0.20866 0.2272,-0.30826 0.127392,-0.0995 0.294034,-0.10019 0.168019,-6.7e-4 0.277234,0.12422 0.110597,0.12483 0.152117,0.36337 z" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.32041013" + id="path1705" + inkscape:connector-curvature="0" /> + <path + d="m 14.742929,294.81667 v 0.81855 h -0.254937 v -2.13044 h 0.254937 v 0.23426 q 0.07993,-0.1378 0.201194,-0.20395 0.122645,-0.0675 0.292144,-0.0675 0.28112,0 0.45613,0.22324 0.176389,0.22324 0.176389,0.58705 0,0.3638 -0.176389,0.58704 -0.17501,0.22324 -0.45613,0.22324 -0.169499,0 -0.292144,-0.0661 -0.121268,-0.0675 -0.201194,-0.20533 z m 0.862652,-0.53881 q 0,-0.27975 -0.115755,-0.43822 -0.114377,-0.15985 -0.315571,-0.15985 -0.201193,0 -0.316949,0.15985 -0.114377,0.15847 -0.114377,0.43822 0,0.27974 0.114377,0.43959 0.115756,0.15847 0.316949,0.15847 0.201194,0 0.315571,-0.15847 0.115755,-0.15985 0.115755,-0.43959 z" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332" + id="path1707" + inkscape:connector-curvature="0" /> + <path + d="m 16.276561,294.97975 -1.52e-4,-0.94031 0.251931,-0.0648 1.5e-4,0.9306 q 3.6e-5,0.22051 0.08495,0.30972 0.08491,0.0878 0.254686,0.0444 0.204008,-0.052 0.321737,-0.21413 0.119098,-0.16225 0.119061,-0.38971 l -1.43e-4,-0.88065 0.251931,-0.0648 2.51e-4,1.55331 -0.25193,0.0648 -3.9e-5,-0.23855 q -0.09172,0.16493 -0.213559,0.26548 -0.120476,0.0987 -0.280672,0.13983 -0.264253,0.0678 -0.401197,-0.0637 -0.136946,-0.13139 -0.136998,-0.45174 z" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332" + id="path1709" + inkscape:connector-curvature="0" /> + <path + d="m 18.344702,293.59556 v 0.43822 h 0.522277 v 0.19706 h -0.522277 v 0.83784 q 0,0.18879 0.05099,0.24254 0.05237,0.0537 0.21084,0.0537 h 0.260449 v 0.21222 H 18.60653 q -0.293522,0 -0.405144,-0.10887 -0.111621,-0.11024 -0.111621,-0.39963 V 294.2308 H 17.90373 v -0.19706 h 0.186035 v -0.43822 z" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332" + id="path1711" + inkscape:connector-curvature="0" /> + <path + d="m 20.508346,294.20141 2.1e-5,0.12482 -1.158332,0.29657 q 0.01648,0.25929 0.156153,0.36223 0.141049,0.1012 0.391609,0.037 0.145134,-0.0376 0.280676,-0.10793 0.136913,-0.0711 0.271081,-0.17758 l 4e-5,0.24133 q -0.135541,0.093 -0.277931,0.15998 -0.14239,0.0669 -0.288893,0.10441 -0.366941,0.094 -0.581938,-0.0673 -0.213628,-0.16169 -0.213688,-0.53061 -6.1e-5,-0.38138 0.202543,-0.65655 0.203972,-0.2769 0.549007,-0.36523 0.309435,-0.0789 0.488832,0.0774 0.180765,0.15485 0.18082,0.50156 z m -0.251942,-0.0103 q -0.0028,-0.2087 -0.116435,-0.30445 -0.112293,-0.0961 -0.298502,-0.0484 -0.210854,0.0537 -0.338169,0.20723 -0.125945,0.15291 -0.145079,0.37694 z" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332" + id="path1713" + inkscape:connector-curvature="0" /> + <path + d="m 21.832517,294.2708 q -0.04272,-0.0248 -0.09371,-0.0358 -0.04961,-0.0124 -0.110243,-0.0124 -0.214974,0 -0.330729,0.14056 -0.114377,0.13918 -0.114377,0.40101 v 0.81304 h -0.254937 v -1.5434 h 0.254937 v 0.23977 q 0.07993,-0.14056 0.208084,-0.20808 0.128157,-0.0689 0.311436,-0.0689 0.02618,0 0.05788,0.004 0.03169,0.003 0.07028,0.01 z" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332" + id="path1715" + inkscape:connector-curvature="0" /> + <path + d="m 23.185447,294.16269 -0.03488,0.23723 q -0.09833,-0.0702 -0.208837,-0.11429 -0.110508,-0.0442 -0.233212,-0.0622 -0.186783,-0.0275 -0.289279,0.016 -0.101136,0.0437 -0.117973,0.15816 -0.01283,0.0873 0.04655,0.14753 0.05959,0.0589 0.254751,0.13358 l 0.08309,0.0317 q 0.258799,0.0966 0.355164,0.21797 0.09793,0.12025 0.07046,0.30705 -0.03127,0.21268 -0.218575,0.31189 -0.185938,0.0994 -0.480428,0.0561 -0.122703,-0.018 -0.252707,-0.0622 -0.128844,-0.0426 -0.269062,-0.11204 l 0.03809,-0.25904 q 0.128445,0.0927 0.258001,0.14937 0.129765,0.0553 0.262013,0.0747 0.17724,0.0261 0.281492,-0.0199 0.104454,-0.0473 0.120693,-0.15775 0.01504,-0.10226 -0.04648,-0.16702 -0.06015,-0.0645 -0.285871,-0.14928 l -0.08424,-0.0333 q -0.225922,-0.0833 -0.314703,-0.19949 -0.08858,-0.11748 -0.06252,-0.29473 0.03167,-0.21541 0.201614,-0.31021 0.169938,-0.0948 0.450794,-0.0535 0.139065,0.0204 0.258757,0.059 0.119693,0.0385 0.217301,0.0946 z" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332" + id="path1717" + inkscape:connector-curvature="0" /> + <path + d="m 24.74878,294.2652 c -0.08645,0.15984 -0.310959,-0.0317 -0.546114,0.002 -0.163883,0.0136 -0.286821,0.0763 -0.368812,0.1882 -0.08207,0.11097 -0.115323,0.2603 -0.09977,0.44799 0.01555,0.18768 0.07297,0.32995 0.172262,0.42682 0.09921,0.096 0.230762,0.13713 0.394645,0.12355 0.07324,-0.006 0.144777,-0.0216 0.2146,-0.0468 0.07066,-0.0261 0.140065,-0.0618 0.208213,-0.10716 l 0.01935,0.23346 c -0.06777,0.0388 -0.138962,0.0696 -0.213589,0.0923 -0.07371,0.0227 -0.153138,0.0376 -0.238284,0.0446 -0.231635,0.0192 -0.421693,-0.0383 -0.570174,-0.17261 -0.14848,-0.13426 -0.232962,-0.32499 -0.253446,-0.57219 -0.02079,-0.25087 0.03153,-0.45386 0.15695,-0.60898 0.126338,-0.1552 0.309444,-0.24274 0.549319,-0.26262 0.07782,-0.007 0.154496,-0.005 0.230021,0.006 0.07545,0.009 0.411602,0.13108 0.483843,0.15738 z" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332" + id="path1719" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccccccccccccccccc" /> + <path + d="m 26.113426,294.68322 c -0.261734,0.0182 -0.450246,0.0563 -0.565535,0.11456 -0.115298,0.0582 -0.190229,0.14913 -0.224795,0.27262 -0.0276,0.0984 -0.01197,0.17418 0.04686,0.22722 0.06028,0.0519 0.155555,0.0733 0.285831,0.0644 0.179589,-0.0125 0.338553,-0.0767 0.476895,-0.1926 0.139808,-0.11703 0.235018,-0.26595 0.285633,-0.44673 l 0.01724,-0.0617 z m 0.678189,-0.15926 -0.269518,0.96266 -0.323927,0.0223 0.07169,-0.2561 c -0.102636,0.10756 -0.216005,0.18978 -0.340106,0.24665 -0.12382,0.0558 -0.265548,0.0893 -0.425184,0.10037 -0.201898,0.014 -0.349202,-0.0231 -0.441906,-0.11119 -0.09127,-0.0892 -0.114125,-0.21517 -0.06856,-0.37788 0.05314,-0.18982 0.167151,-0.33805 0.342036,-0.44471 0.176059,-0.10674 0.411389,-0.17033 0.705993,-0.19075 l 0.454243,-0.0315 0.0075,-0.027 c 0.03571,-0.12755 0.01397,-0.22256 -0.06522,-0.28503 -0.07773,-0.0636 -0.205216,-0.0892 -0.382445,-0.0769 -0.112673,0.008 -0.225657,0.027 -0.338945,0.0575 -0.113268,0.0305 -0.200296,0.0144 -0.311833,0.0674 l 0.04631,-0.19821 c 0.129506,-0.0473 0.252682,-0.0844 0.369528,-0.11124 0.117118,-0.0278 0.228509,-0.0454 0.334169,-0.0527 0.285227,-0.0198 0.480543,0.0287 0.585945,0.14553 0.105418,0.11679 0.122134,0.30374 0.05015,0.56085 z" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.30964333" + id="path1721" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccccccccccccccccccccccccccccc" /> + <path + d="m 28.702745,294.10223 q -0.04765,-0.0359 -0.114148,-0.0521 -0.06379,-0.0182 -0.149723,-0.0183 -0.304614,-6.2e-4 -0.541819,0.20246 -0.234523,0.20105 -0.370837,0.57993 l -0.423324,1.17649 -0.361236,-7.4e-4 0.803473,-2.23334 0.361237,7.5e-4 -0.124848,0.34694 q 0.186434,-0.20316 0.403183,-0.30051 0.217505,-0.0995 0.47719,-0.0989 0.0371,8e-5 0.07992,0.006 0.04318,0.005 0.09438,0.0146 z" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.37900135" + id="path1723" + inkscape:connector-curvature="0" /> + <path + d="m 30.820388,295.13981 -0.07372,0.20619 -1.910262,0.16186 c -0.08525,0.29021 -0.133798,0.34955 -0.03038,0.50233 0.105622,0.15133 0.300371,0.2269 0.584185,0.22694 0.164399,1e-5 0.330436,-0.0197 0.498211,-0.0594 0.169326,-0.0398 0.606289,-0.17378 0.786715,-0.25324 l -0.14267,0.39869 c -0.176518,0.0642 -0.613564,0.1876 -0.786874,0.22116 -0.173304,0.0337 -0.342948,0.0503 -0.508866,0.0503 -0.415643,-7e-5 -0.702568,-0.11921 -0.860826,-0.35758 -0.156681,-0.23832 -0.16234,-0.56064 -0.01697,-0.96695 0.150388,-0.42005 0.384191,-0.75304 0.701736,-0.99894 0.31962,-0.24741 0.674847,-0.37109 1.065676,-0.37103 0.350509,5e-5 0.587429,0.11168 0.710832,0.33463 0.125474,0.22153 0.119897,0.52322 -0.01673,0.90509 z m -0.383806,-0.12372 c 0.07931,-0.23064 0.07932,-0.41472 -2.46e-4,-0.5522 -0.07797,-0.13752 -0.222443,-0.20625 -0.433362,-0.2063 -0.238843,-3e-5 -0.4542,0.0665 -0.645941,0.19927 -0.190236,0.13285 -0.140342,0.29637 -0.24842,0.5377 z" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:2.82222223px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.44328952" + id="path1725" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccscccsscscscccccsccc" /> + </g> + <g + id="g9547" + transform="matrix(1.4791541,-0.46829904,0,1.8447907,-15.399609,200.34726)"> + <g + style="display:inline" + inkscape:label="Layer 1" + id="layer4" /> + <path + id="rect5872" + d="m 11.987289,9.3234482 7.365462,-0.1230699 0.626062,4.1188307 h -7.991524 z" + style="opacity:1;fill:#0f0f00;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" /> + <path + id="rect5874" + d="m 14.667374,10.662096 h 3.995763 v 1.331921 h -3.995763 z" + style="opacity:1;fill:#ffffff;fill-opacity:0.98571424;stroke:#000000;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:connector-curvature="0" /> + <path + id="rect5878" + d="m -29.323654,9.3234482 h 7.989551 v 3.9957608 h -7.989551 z" + style="opacity:1;fill:#0c0c00;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + transform="scale(-1,1)" + inkscape:connector-curvature="0" /> + <path + id="rect5880" + d="m 26.64423,10.662096 -3.171232,0.209056 v 1.331921 l 3.752575,-0.09734 z" + style="opacity:1;fill:#ffffff;fill-opacity:0.98571424;stroke:#000000;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" /> + <path + id="rect5882" + d="m 19.995058,14.667374 h 1.331921 v 3.995762 h -1.331921 z" + style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:connector-curvature="0" /> + <path + id="rect5884" + d="m 20.888507,16.531899 2.579094,0.1482 v 2.019931 l -2.489657,-0.08964 z" + style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" /> + <path + id="rect5886" + d="m 11.954803,20.011301 h 2.696328 v 2.663842 h -2.696328 z" + style="opacity:1;fill:#000200;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:connector-curvature="0" /> + <path + id="rect5888" + d="m 27.970341,20.011301 2.24914,-0.113518 0.447187,2.77736 h -2.696327 z" + style="opacity:1;fill:#000200;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" /> + <path + id="rect5890" + d="m 14.651131,20.011301 h 13.351695 v 1.33192 H 14.651131 Z" + style="opacity:1;fill:#000200;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + inkscape:connector-curvature="0" /> + </g> + </g> +</svg> diff --git a/src/ComputerscareBlank.cpp b/src/ComputerscareBlank.cpp @@ -161,40 +161,40 @@ struct PNGDisplay : TransparentWidget { void draw(const DrawArgs &args) override { if (module && module->loadedJSON) { - if (path != module->path) { - img = nvgCreateImage(args.vg, module->path.c_str(), 0); - nvgImageSize(args.vg, img, &imgWidth, &imgHeight); - imgRatio = ((float)imgWidth / (float)imgHeight); - path = module->path; - } + if (path != module->path) { + img = nvgCreateImage(args.vg, module->path.c_str(), 0); + nvgImageSize(args.vg, img, &imgWidth, &imgHeight); + imgRatio = ((float)imgWidth / (float)imgHeight); + path = module->path; + } + + /*if (module->imageFitEnum != lastEnum) { + lastEnum = module->imageFitEnum; + module->xOffset = 0; + module->yOffset = 0; + module->zoom = 1; + }*/ + if (!path.empty()) { + nvgBeginPath(args.vg); + NVGpaint imgPaint; + //if (module->width>0 && module->height>0) + nvgScale(args.vg, module->zoom, module->zoom); + if (module->imageFitEnum == 0) { + imgPaint = nvgImagePattern(args.vg, module->xOffset, module->yOffset, module->width, module->height, 0, img, 1.0f); - /*if (module->imageFitEnum != lastEnum) { - lastEnum = module->imageFitEnum; - module->xOffset = 0; - module->yOffset = 0; - module->zoom = 1; - }*/ - if (!path.empty()) { - nvgBeginPath(args.vg); - NVGpaint imgPaint; - //if (module->width>0 && module->height>0) - nvgScale(args.vg, module->zoom, module->zoom); - if (module->imageFitEnum == 0) { - imgPaint = nvgImagePattern(args.vg, module->xOffset, module->yOffset, module->width, module->height, 0, img, 1.0f); - - } - else if (module->imageFitEnum == 1) { // fit width - //nvgScale(args.vg, width/module->width, height/module->height); - imgPaint = nvgImagePattern(args.vg, module->xOffset, module->yOffset, module->width, module->width / imgRatio, 0, img, 1.0f); - } - else if (module->imageFitEnum == 2) { - imgPaint = nvgImagePattern(args.vg, module->xOffset, module->yOffset, module->height * imgRatio, module->height, 0, img, 1.0f); - } - nvgRect(args.vg, 0, 0, module->width, module->height); - nvgFillPaint(args.vg, imgPaint); - nvgFill(args.vg); - nvgClosePath(args.vg); } + else if (module->imageFitEnum == 1) { // fit width + //nvgScale(args.vg, width/module->width, height/module->height); + imgPaint = nvgImagePattern(args.vg, module->xOffset, module->yOffset, module->width, module->width / imgRatio, 0, img, 1.0f); + } + else if (module->imageFitEnum == 2) { + imgPaint = nvgImagePattern(args.vg, module->xOffset, module->yOffset, module->height * imgRatio, module->height, 0, img, 1.0f); + } + nvgRect(args.vg, 0, 0, module->width, module->height); + nvgFillPaint(args.vg, imgPaint); + nvgFill(args.vg); + nvgClosePath(args.vg); + } } } void onHoverKey(const event::HoverKey& e) override; @@ -248,7 +248,6 @@ struct ComputerscareBlankWidget : ModuleWidget { setModule(module); if (module) { this->blankModule = module; - DEBUG("width:%f", module->width); box.size = Vec(module->width, module->height); } else { box.size = Vec(8 * 15, 380); @@ -256,7 +255,7 @@ struct ComputerscareBlankWidget : ModuleWidget { { ComputerscareSVGPanel *panel = new ComputerscareSVGPanel(); panel->box.size = box.size; - panel->setBackground(APP->window->loadSvg(asset::plugin(pluginInstance, "res/ComputerscareKnolyPobsPanel.svg"))); + panel->setBackground(APP->window->loadSvg(asset::plugin(pluginInstance, "res/ComputerscareCustomBlankPanel.svg"))); this->panel = panel; addChild(panel); } @@ -320,26 +319,24 @@ struct ComputerscareBlankWidget : ModuleWidget { }; void ComputerscareBlankWidget::step() { if (blankModule) { - //if (!blankModule->loading) { - if (!blankModule->loadedJSON) { - DEBUG("we aint loaded the json man:%f", blankModule->width); - box.size.x = blankModule->width; - panel->box.size.x = blankModule->width; - pngDisplay->box.size.x = blankModule->width; - rightHandle->box.pos.x = blankModule->width - rightHandle->box.size.x; - blankModule->loadedJSON = true; - } - else if (box.size.x != blankModule->width) { - DEBUG("widget step width:%f", blankModule->width); + if (!blankModule->loadedJSON) { + box.size.x = blankModule->width; + panel->box.size.x = blankModule->width; + panel->box.pos.x = blankModule->width / 2 - 60.f; + pngDisplay->box.size.x = blankModule->width; + rightHandle->box.pos.x = blankModule->width - rightHandle->box.size.x; + blankModule->loadedJSON = true; + } + else { + if (box.size.x != blankModule->width) { blankModule->width = box.size.x; - - panel->box.size = box.size; + panel->box.pos.x = box.size.x / 2 - panel->box.size.x / 2; pngDisplay->box.size.x = box.size.x; rightHandle->box.pos.x = box.size.x - rightHandle->box.size.x; } - ModuleWidget::step(); } - //} + ModuleWidget::step(); + } }