mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-07-28 04:07:46 +00:00
pybricks.pupdevices.ColorLightMatrix: Fix render.
- Use isometric projection - Fix broken plug - Use correct background color While we are at it, add colors to show which 9 colors this device supports.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
0 Name: pupmotors
|
||||
0 Name: pupsensors.ldr
|
||||
0 Author: Pybricks {laurens@pybricks.com}
|
||||
0 !LICENSE MIT
|
||||
0 !LDCAD GROUP_DEF [topLevel=true] [LID=0] [GID=9FDP9pj0O55] [name=Group 1] [center=0 0 0]
|
||||
1 15 190 -290 750 -1 0 0 0 -1 0 0 0 1 47592c01.dat
|
||||
1 15 600 -280 180 1 0 0 0 1 0 0 0 1 37316.dat
|
||||
1 15 60 -272 160 -1 0 0 0 -1 0 0 0 1 37312c01.dat
|
||||
1 15 -400 -280 240 -1 0 0 0 -1 0 0 0 1 37308c01.dat
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
<?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:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
width="504"
|
||||
height="322"
|
||||
viewBox="0 0 504 322"
|
||||
sodipodi:docname="sensor_colorlightmatrix.svg"
|
||||
inkscape:version="0.92.3 (2405546, 2018-03-11)">
|
||||
<metadata
|
||||
id="metadata8">
|
||||
<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>
|
||||
<defs
|
||||
id="defs6">
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath846">
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 384.47481,408.57086 22.58181,23.6974 88.18587,13.9655 -36.98745,-79.56651 -97.14072,-16.49296 z"
|
||||
id="path848"
|
||||
inkscape:connector-curvature="0" />
|
||||
</clipPath>
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath874">
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:0.10000001;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 491.27259,265.371 c 1.71728,2.18035 5.94442,12.92235 5.94442,12.92235 l 40.68619,39.65737 -0.39629,25.87184 -22.19247,7.07325 -62.08608,-14.9528 10.83204,-57.24707 z"
|
||||
id="path876"
|
||||
inkscape:connector-curvature="0" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1853"
|
||||
inkscape:window-height="1145"
|
||||
id="namedview4"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.70710678"
|
||||
inkscape:cx="-39.716728"
|
||||
inkscape:cy="-44.222535"
|
||||
inkscape:window-x="67"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2"
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:snap-global="false" />
|
||||
<image
|
||||
sodipodi:absref="sensor_colorlightmatrix_main.png"
|
||||
xlink:href="sensor_colorlightmatrix_main.png"
|
||||
y="0"
|
||||
x="0"
|
||||
id="image10"
|
||||
preserveAspectRatio="none"
|
||||
height="322"
|
||||
width="504" />
|
||||
<rect
|
||||
style="fill:#e51a1a;fill-opacity:0.62566845;stroke:none;stroke-width:1.94267738;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
|
||||
id="rect31"
|
||||
width="45.163605"
|
||||
height="44.564522"
|
||||
x="390.70432"
|
||||
y="293.66827"
|
||||
transform="matrix(0.94626691,-0.32338666,0,1,0,0)" />
|
||||
<rect
|
||||
transform="matrix(0.94626691,-0.32338666,0,1,0,0)"
|
||||
y="338.23279"
|
||||
x="390.70432"
|
||||
height="43.275879"
|
||||
width="45.163605"
|
||||
id="rect838"
|
||||
style="fill:#e5701a;fill-opacity:0.62566845;stroke:none;stroke-width:1.94267738;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
|
||||
<rect
|
||||
style="fill:#e5bf1a;fill-opacity:0.62566845;stroke:none;stroke-width:1.94267738;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
|
||||
id="rect840"
|
||||
width="45.163605"
|
||||
height="38.992153"
|
||||
x="390.70432"
|
||||
y="381.46179"
|
||||
transform="matrix(0.94626691,-0.32338666,0,1,0,0.05126953)"
|
||||
clip-path="url(#clipPath846)" />
|
||||
<rect
|
||||
transform="matrix(0.94626691,-0.32338666,0,1,0,0)"
|
||||
y="293.66827"
|
||||
x="435.86792"
|
||||
height="44.564514"
|
||||
width="41.462769"
|
||||
id="rect856"
|
||||
style="fill:#00af05;fill-opacity:0.62566847;stroke:none;stroke-width:1.94267738;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
|
||||
<rect
|
||||
style="fill:#0044fb;fill-opacity:0.62566847;stroke:none;stroke-width:1.94267738;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
|
||||
id="rect858"
|
||||
width="40.347229"
|
||||
height="44.564514"
|
||||
x="477.33069"
|
||||
y="293.66827"
|
||||
transform="matrix(0.94626691,-0.32338666,0,1,0,0)"
|
||||
clip-path="url(#clipPath874)" />
|
||||
<rect
|
||||
style="fill:#5dffe2;fill-opacity:1;stroke:none;stroke-width:1.94267738;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
|
||||
id="rect860"
|
||||
width="41.462769"
|
||||
height="43.261936"
|
||||
x="435.86792"
|
||||
y="338.24722"
|
||||
transform="matrix(0.94626691,-0.32338666,0,1,0,0)" />
|
||||
<rect
|
||||
transform="matrix(0.94626691,-0.32338666,0,1,0,0)"
|
||||
y="338.24722"
|
||||
x="477.33069"
|
||||
height="43.261951"
|
||||
width="40.347229"
|
||||
id="rect862"
|
||||
style="fill:#941ae5;fill-opacity:0.62566847;stroke:none;stroke-width:1.94267738;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
|
||||
<rect
|
||||
transform="matrix(0.94626691,-0.32338666,0,1,0,0)"
|
||||
y="381.51306"
|
||||
x="435.86792"
|
||||
height="38.88504"
|
||||
width="41.489174"
|
||||
id="rect868"
|
||||
style="fill:#1acee5;fill-opacity:0.62566847;stroke:none;stroke-width:1.94267738;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
|
||||
<rect
|
||||
style="fill:#e51a9a;fill-opacity:0.62566847;stroke:none;stroke-width:1.94267738;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal"
|
||||
id="rect870"
|
||||
width="40.281181"
|
||||
height="38.928104"
|
||||
x="477.33069"
|
||||
y="381.51306"
|
||||
transform="matrix(0.94626691,-0.32338666,0,1,0,0)" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 58 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 89 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 67 KiB |
@@ -3,7 +3,7 @@
|
||||
Color Light Matrix
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. figure:: ../../main/images/color_light_matrix.png
|
||||
.. figure:: ../../main/images/sensor_colorlightmatrix_label.png
|
||||
:width: 35 %
|
||||
|
||||
.. autoclass:: pybricks.pupdevices.ColorLightMatrix
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
.. pybricks-classlink:: ColorLightMatrix
|
||||
|
||||
.. figure:: ../../main/images/color_light_matrix.png
|
||||
.. figure:: ../../main/images/sensor_colorlightmatrix_label.png
|
||||
:width: 35 %
|
||||
:target: colorlightmatrix.html
|
||||
|
||||
|
||||
Reference in New Issue
Block a user