lcgamboa / picsimlab

PICsimLab - Programmable IC Simulator Laboratory
GNU General Public License v2.0
442 stars 85 forks source link

custom svg rendering issue #89

Closed fariouche closed 10 months ago

fariouche commented 11 months ago

Hello,

I want to add a new board, the m5stack core2. I've designed the svg with inskape, and created the map with gimp. The resulting files are attached. My issue is that the bottom part of the svg is not rendered properly, and the map file does not map properly the middle screen too...

I'm starting to understand how it works, and I have made some changes to add support for psram and 16MB of flash. I have an other issue, but it will be on an other ticket.

Thanks! M5stackCore2

fariouche commented 11 months ago

The map file, I can't upload it so I embed it here:

<map name="map">
<!-- #$-:Image map file created by GIMP Image Map plug-in -->
<!-- #$-:GIMP Image Map plug-in by Maurits Rijk -->
<!-- #$-:Please do not edit lines starting with "#$" -->
<!-- #$VERSION:2.3 -->
<!-- #$AUTHOR:fariouche -->
<area shape="circle" coords="16,100,10" href="I_SW_PWR" />
<area shape="circle" coords="324,408,13" href="I_SW_RST" />
<area shape="circle" coords="280,407,12" href="O_LD_GREEN" />
<area shape="rect" coords="8,210,26,258" href="B_USB_PORT" />
<area shape="rect" coords="63,97,357,319" href="B_DISPLAY" />
</map>
lcgamboa commented 11 months ago

Hi @fariouche ,

your map file lacks the first line with the size of the picture. This size is used by PICSimLab.

<img src="[picsimlab7] (overwritten)" width="425" height="425" border="0" usemap="#map" />

<map name="map">
<!-- #$-:Image map file created by GIMP Image Map plug-in -->
<!-- #$-:GIMP Image Map plug-in by Maurits Rijk -->
<!-- #$-:Please do not edit lines starting with "#$" -->
<!-- #$VERSION:2.3 -->
<!-- #$AUTHOR:fariouche  -->
<area shape="circle" coords="18,102,8" href="I_SW_PWR" />
<area shape="circle" coords="324,407,11" href="I_SW_RST" />
<area shape="circle" coords="280,408,10" href="O_LD_GREEN" />
<area shape="rect" coords="11,211,26,256" href="B_USB_PORT" />
<area shape="rect" coords="62,99,359,320" href="B_DISPLAY" />
</map>
fariouche commented 11 months ago

Strange, it is what gimp outputed ... I followed your doc. Maybe I missed something? Or the svg is also wrong and missing the size too?

lcgamboa commented 11 months ago

Your SVG it's ok. Add the line: <img src="[picsimlab7] (overwritten)" width="425" height="425" border="0" usemap="#map" /> to your map file to make it work. mstack

fariouche commented 10 months ago

The svg is missing the bottom part (a led and the reset button) The same kind of button to the left(USB c and power button) are fine. thanks for the map, I will try

fbenamrouche commented 10 months ago

Just had a look at my map file and discovered that I already have the line... I missed it when I copied it here... Anyway, I've found that the map size didn't match the svg size for some reason. FIxed that and it now works, thanks!

fariouche commented 10 months ago

I can continue now thanks