<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 12/3/2021 6:29 AM, Hilaire Fernandes via Cuis-dev wrote:
<blockquote cite="mid:e7b16147-3c2a-6b50-9d6c-0a17bc848bb3@drgeo.eu"
type="cite">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<p><font size="+1">Hi Juan, <br>
</font></p>
<p><font size="+1">I just received a new set of SVG icons for
DrGeo. I am exploring how I should use it with DrGeo UI.
Should I import as SVG files or preconvert it as PNG files?</font></p>
<p><font size="+1">I attached a sample of the icon and it looks
like bellow. </font>The red background shows how the drawing
is centered.</p>
<img moz-do-not-send="false"
src="cid:part1.07040506.01050603@zoho.com" alt="" height="49"
width="46">
<p><font size="+1">For now I am exploring the former options with
your SVG package. </font>When I open it with Cuis, it looks
like its attributes in the SVG element are not honored:</p>
<pre><svg
xmlns:osb=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://www.openswatchbook.org/uri/2009/osb">"http://www.openswatchbook.org/uri/2009/osb"</a>
xmlns:dc=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://purl.org/dc/elements/1.1/">"http://purl.org/dc/elements/1.1/"</a>
xmlns:cc=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://creativecommons.org/ns#">"http://creativecommons.org/ns#"</a>
xmlns:rdf=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://www.w3.org/1999/02/22-rdf-syntax-ns#">"http://www.w3.org/1999/02/22-rdf-syntax-ns#"</a>
xmlns:svg=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://www.w3.org/2000/svg">"http://www.w3.org/2000/svg"</a>
xmlns=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://www.w3.org/2000/svg">"http://www.w3.org/2000/svg"</a>
xmlns:xlink=<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="http://www.w3.org/1999/xlink">"http://www.w3.org/1999/xlink"</a>
id="svg5"
version="1.1"
viewBox="0 0 12.506998 12.507"
height="47.27055"
width="47.270542"></pre>
<p>Indeed it looks very tiny in Cuis and when scaled up, the
bounding box is not square as it should be. It could be
problematic when doing the layout in GUI. I could help myself
using the center of the icons but it will be better for the
general interest these attributes be honored though. I may be
completely off as I am exploring the topic. So fell free to
correct me. <br>
</p>
<img moz-do-not-send="false"
src="cid:part2.02090704.07040909@zoho.com" alt="" height="152"
width="552">
<p>Thanks<br>
</p>
<p>Hilaire<br>
</p>
<pre class="moz-signature" cols="72">--
GNU Dr. Geo
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://drgeo.eu">http://drgeo.eu</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://blog.drgeo.eu">http://blog.drgeo.eu</a></pre>
</blockquote>
<br>
Hi Hilaire,<br>
<br>
Using PNG (as you know) means no scaling, handling renders at
different sizes by hand, etc. It is much better to stick to vector
graphics.<br>
<br>
The current SVG morphs may be a bit slow, as they hold the whole
structure of the SVG file in a tree of submorphs. For the window
control buttons, I made faster custom versions that also use less
memory. See for example #drawMenuIcon especially in
AbstractVectorCanvas. If you don't find performance to be a problem,
maybe using SVG is OK.<br>
<br>
WRT the the height and width attributes, yes, we'd honor them. I
won't be able to dig into that for the next few days, though. <br>
<br>
Thanks,<br>
<pre class="moz-signature" cols="72">--
Juan Vuletich
<a class="moz-txt-link-abbreviated" href="http://www.cuis-smalltalk.org">www.cuis-smalltalk.org</a>
<a class="moz-txt-link-freetext" href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a>
<a class="moz-txt-link-freetext" href="https://github.com/jvuletich">https://github.com/jvuletich</a>
<a class="moz-txt-link-freetext" href="https://www.linkedin.com/in/juan-vuletich-75611b3">https://www.linkedin.com/in/juan-vuletich-75611b3</a>
@JuanVuletich</pre>
</body>
</html>