simple icon tray

Window managers, icon programs, widgets, etc.
Message
Author
User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#31 Post by 01micko »

Hello vovchik,

So far it all works nice except that if I try to use lock as a parameter I get the clock! Curiously, I tried "ock".. got a clock!

Thanks for your work, oh, if it makes a difference I'm using fatdog with 32 bit compat and your binary (no bacon in fatdog as yet).
Puppy Linux Blog - contact me for access

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#32 Post by vovchik »

Thanks 01micko!

There was a little bug in my FIND routine. It has now been fixed. It really pays to have people test. Thanks again.

With kind regards,
vovchik

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#33 Post by technosaurus »

I wouldn't say the bacon version is inherently faster or smaller considering that it will likely be called from a script and ops can be done using only builtins (typically faster than sourcing and executing an external program)... Then considering that it will be on a compressed squashfs, the script will get compressed without the additional overhead. It's still good to have alternative though, for native bacon apps. A C only version is pretty easy to do, as it would basically only need strcmp and (f)printf. The things that I left stubbed out that would really improve the look, need some input from graphically oriented designers. Backgrounds that can help tie them together with a unified look and feel that also complement foregrounds that can be informative while being graphically appealing and unified. If I had written it in C I was afraid I would lose input due to inaccessibility.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#34 Post by vovchik »

Dear technosaurus,

The BaCon is certainly faster at coming up with the icon and color lists at the moment, but those bits could be optimized in bash. What I am interested in most is collecting more of these simple icons for inclusion and including a few more arguments (scaling and gradients come to mind), as well as text generation (with a few effects). It would really be possible to code a little SVG Factory. And it might just be useful to implement object overlays/compositing. Just food for thought :)

With kind regards,
vovchik

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#35 Post by technosaurus »

I made a quick mod of the code to incorporate the ICON= into a case statement which both speeds it up and reduces memory usage. Also added color support based solely on positional parameters $2, $3... I need to find one of my old examples to incorporate text. For colors, I assume svg can use anything in rgb.txt.. or hex values of course. The backgrounds I am thinking could be an exported VAR so they can unify across the platform. I saw that vovchick had upscaled the image, I guess I should add a parameter to allow that to be adjustable (gtk doesn't do a great job scaling)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#36 Post by technosaurus »

Forgot to upload.

decided it would be better to use stdout for the icon, that way it can be sent anywhere - got everything but the background complete (unless you export the applicable environment variables to valid SVG code)... todo
but execution time is still <0.05s

Edit: no time to sort through these, but it may have links to some usable icons:
http://wiki.inkscape.org/wiki/index.php/Galleries
Attachments
svgdraw-col.tar.gz
(86.21 KiB) Downloaded 1021 times
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#37 Post by seaside »

Is this going viral?

How about a GUI to try out the icons in the notiification area - but then I guess we'd have to call it SIN (get's more attention
that way :D )

Code: Select all

 #!/bin/sh 
 #
# based on bash svgdraw by technosaurus (as
#			modded by vovchik) and raphaeljs by
#			Dmitriy Baranovskiy (copyright 2008
# LICENSE:	GPL3
# GUI seaside -requires sit2 and bsvg
  
cd /tmp

 iconsel=`bsvg -i |tr " " '\n' |sed -e '1,/(225):/d' `
  for i in $iconsel; do ICONS="$ICONS<item>$i</item>";done
 
 colsel=`bsvg -c |tr " " '\n' |sed -e '1,/(148):/d' `
 for i in $colsel; do COLS="$COLS<item>$i</item>";done  
 
 makeicon()  {
 bsvg $ICON  $LINE_COLOR  $FILL_COLOR
cp /tmp/$ICON.svg /tmp/siticon.svg
 exit
 }
 export -f makeicon
 
 echo '<svg width="128" height="128" viewBox="0 0 128 128">
	<g transform="scale(4.0)">
		<path style="fill:aliceblue;fill-rule:nonzero;stroke:aliceblue;fill-opacity:0.75;stroke-opacity:0.75;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;"
		d="M19.275,3.849l1.695,8.56l1.875-1.642c2.311,3.59,1.72,8.415-1.584,11.317c-2.24,1.96-5.186,2.57-7.875,1.908l-0.84,3.396c3.75,0.931,7.891,0.066,11.02-2.672c4.768-4.173,5.521-11.219,1.94-16.279l2.028-1.775L19.275,3.849zM8.154,20.232c-2.312-3.589-1.721-8.416,1.582-11.317c2.239-1.959,5.186-2.572,7.875-1.909l0.842-3.398c-3.752-0.93-7.893-0.067-11.022,2.672c-4.765,4.174-5.519,11.223-1.939,16.283l-2.026,1.772l8.26,2.812l-1.693-8.559L8.154,20.232z" />
	</g>
</svg>'  >/tmp/siticon.svg

  sit /tmp/siticon.svg &
 
  export MAIN_DIALOG='
<vbox>
  <hbox>
    <text>
      <label>Icon Select::</label>
    </text>
    <combobox>
      <variable>ICON</variable>
      '"$ICONS"'
    </combobox>
  </hbox>
  <hbox>
    <text>
      <label>Line Color</label>
    </text>
    <combobox>
      <variable>LINE_COLOR</variable>
      '"$COLS"'
    </combobox>
  </hbox>
  <hbox>
    <text>
      <label>Fill Color</label>
    </text>
    <combobox>
      <variable>FILL_COLOR</variable>
      '"$COLS"'
    </combobox>
  </hbox>
  <hbox>
   <button ok>
      <action>makeicon</action>
   </button>
   <button cancel>
      <action>killall sit</action>
    <action>exit:</action>
   </button>
  </hbox>
 </vbox>
'

gtkdialog3 --program=MAIN_DIALOG
unset MAIN_DIALOG

Regards,
s

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#38 Post by vovchik »

Dear seaside,

I like the gui very much. Thanks. I see that you use bsvg, so I just made a new version that outputs to stdout if you use "-" as the last argument after the color args (run without parameters and bsvg will show you how). No need to copy to and from /tmp now, just redirect. Also, I have simplified your parsing by adding "-C" and "-I" parameters. They output unformatted lists (1 item per line). The archive contains a new UPX'd binary and the revised source.

It is going viral indeed, and nicely!:)

With kind regards,
vovchik
Attachments
bsvg-0.1b.tar.gz
(189.26 KiB) Downloaded 1051 times

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#39 Post by seaside »

Technosaurus and Vovchik - thanks for those simplifications and additions. Much better.

It seems to me at this point that the icon draw files should be separate from the icon creation mechanism. If more icons are brought in or existing ones changed, considerable extra work is involved with updating.

A simple "grep firefox raphaeljs.txt (holding the draw files)" seems reasonably quick and perhaps might be considered as a way to have any number of "draw" files at the ready.

Best regards,
s

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#40 Post by seaside »

Here's a version that seems reasonably responsive. (I'm sure technosaurus would make it absolutely fly :D )Placing the svg draw in a separate file (svgs).

Code: Select all

 #!/bin/sh 
 #
# based on bash svgdraw by technosaurus (as
#			modded by vovchik) and raphaeljs by
#			Dmitriy Baranovskiy (copyright 2008
# LICENSE:	GPL3
# GUI seaside -requires sit2 
  
 while read l; do A="$A\n <item>${l%=*}</item>";done </mnt/sdb6/svgs # svgs file
 ICONS=`echo -e  $A | grep -v  '#' | sort`

colors="
 aliceblue antiquewhite aqua aquamarine azure beige bisque black blanchedalmond \
 blue blueviolet brown burlywood cadetblue chartreuse chocolate coral           \
 cornflowerblue cornsilk crimson cyan darkblue darkcyan darkgoldenrod darkgray  \
 darkgreen darkgrey darkkhaki darkmagenta darkolivegreen darkorange darkorchid  \
 darkred darksalmon darkseagreen darkslateblue darkslategray darkslategrey      \
 darkturquoise darkviolet deeppink deepskyblue dimgray dimgrey dodgerblue       \
 firebrick floralwhite forestgreen fuchsia gainsboro ghostwhite gold goldenrod  \
 gray green greenyellow grey honeydew hotpink indianred indigo ivory khaki      \
 lavender lavenderblush lawngreen lemonchiffon lightblue lightcoral lightcyan   \
 lightgoldenrodyellow lightgray lightgreen lightgrey lightpink lightsalmon      \
 lightseagreen lightskyblue lightslategray lightslategrey lightsteelblue        \
 lightyellow lime limegreen linen magenta maroon mediumaquamarine mediumblue    \
 mediumorchid mediumpurple mediumseagreen mediumslateblue mediumspringgreen     \
 mediumturquoise mediumvioletred midnightblue mintcream mistyrose moccasin      \
 navajowhite navy oldlace olive olivedrab orange orangered orchid palegoldenrod \
 palegreen paleturquoise palevioletred papayawhip peachpuff peru pink plum      \
 powderblue purple red rosybrown royalblue saddlebrown salmon sandybrown        \
 seagreen seashell sienna silver skyblue slateblue slategray slategrey snow     \
 springgreen steelblue tan teal thistle tomato turquoise violet wheat white     \
 whitesmoke yellow yellowgreen none None "

  for i in $colors; do COLS="$COLS<item>$i</item>";done
 
 makeicon()  {
 
 ICOND=`grep $ICON /mnt/sdb6/svgs|cut -f2 -d=`
 
echo '<svg width="'${SIZE:-32}'" height="'${SIZE:-32}'" viewBox="0 0 '${SIZE:-32}' '${SIZE:-32}'">'$CUSTOM_BG'
<g transform="scale('${RATIO:-1.0}')">
<path style="fill:'${FILL_COLOR:-gray}';fill-rule:nonzero;stroke:'${LINE_COLOR:-black}';fill-opacity:'${FILL_OPACITY:-0.75}';stroke-opacity:'${STROKE_OPACITY:-0.75}';stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;"
d='$ICOND' />
</g>'$CUSTOM_FG'
</svg>'  > /tmp/$ICON.svg

cp /tmp/$ICON.svg /tmp/siticon.svg

 exit
 }
 export -f makeicon
 
 echo '<svg width="128" height="128" viewBox="0 0 128 128">
	<g transform="scale(4.0)">
		<path style="fill:aliceblue;fill-rule:nonzero;stroke:aliceblue;fill-opacity:0.75;stroke-opacity:0.75;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;"
		d="M19.275,3.849l1.695,8.56l1.875-1.642c2.311,3.59,1.72,8.415-1.584,11.317c-2.24,1.96-5.186,2.57-7.875,1.908l-0.84,3.396c3.75,0.931,7.891,0.066,11.02-2.672c4.768-4.173,5.521-11.219,1.94-16.279l2.028-1.775L19.275,3.849zM8.154,20.232c-2.312-3.589-1.721-8.416,1.582-11.317c2.239-1.959,5.186-2.572,7.875-1.909l0.842-3.398c-3.752-0.93-7.893-0.067-11.022,2.672c-4.765,4.174-5.519,11.223-1.939,16.283l-2.026,1.772l8.26,2.812l-1.693-8.559L8.154,20.232z" />
	</g>
</svg>'  >/tmp/siticon.svg

  sit  /tmp/siticon.svg &
 
  export MAIN_DIALOG='
<vbox>
  <hbox>
    <text>
      <label>Icon Select::</label>
    </text>
    <combobox>
      <variable>ICON</variable>
      '"$ICONS"'
    </combobox>
  </hbox>
  <hbox>
    <text>
      <label>Line Color</label>
    </text>
    <combobox>
      <variable>LINE_COLOR</variable>
      '"$COLS"'
    </combobox>
  </hbox>
  <hbox>
    <text>
      <label>Fill Color</label>
    </text>
    <combobox>
      <variable>FILL_COLOR</variable>
      '"$COLS"'
    </combobox>
  </hbox>
  <hbox>
   <button ok>
      <action>makeicon</action>
   </button>
   <button cancel>
      <action>killall sit</action>
    <action>exit:</action>
   </button>
  </hbox>
 </vbox>
'

gtkdialog3 --program=MAIN_DIALOG
unset MAIN_DIALOG 
Regards,
s

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#41 Post by 01micko »

Viral :?: [ :lol: ]

I guess we could almost make a script to generate rox desktop icon themes in any colour combination. Just need a few more icons.

yeah, nothing to do with sit, new thread?

I have found some [possibly] suitable icons, lots of them have spaces/new lines in the string starting with "M", any work around?

http://somerandomdude.com/work/iconic/
Attachments
desktop_icons.png
(65.31 KiB) Downloaded 1321 times
Puppy Linux Blog - contact me for access

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#42 Post by technosaurus »

I was thinking about the "what should puppy look like?" thread when I came across these.
http://murga-linux.com/puppy/viewtopic.php?t=78080
I wanted a way to make the desktop look like the menu, look like the apps, look like the tray. We'd still need to generate pngs for jwm - anyone want to patch jwm to just use imlib2?
Last edited by technosaurus on Thu 11 Dec 2014, 13:40, edited 1 time in total.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

Updated to v. 0.1c (over 180 icons added)

#43 Post by vovchik »

Dear all,

I have revised bsvg again and added heaps of new svgs (now 410). I have also included a script that dumps all the icons in the library to your current directory as svg files - and you can specify colors. Incorporated in this version is a set by P.J. Onori (http://somerandomdude.com/work/iconic/), but I first had to modify all his polygons and other shape macros to full svg paths and to standardize all views to 128x128. His icons start with "I_". A real pain, that transformation exercise, but at least all the icons are now one size. I also added a few of my own (icon names starting with V_).

Have fun...

With kind regards,
vovchik

PS. Thanks technosaurus. That was a very nice find:)

PPS. The archive contains the source, a 32-bit UPX'd binary compiled on Lucid and the dump script. I would place the binary and dump script in /usr/local/bin.

PPPS. @ technosaurus, seaside and 01micko. You can now parse my source to grab the icon definitions for use in bash or another language. The new ones (named I_ and V_) need a new svg "<g transform=>" line, which is the last field in each line.[/url]

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

Re: Updated to v. 0.1c (over 180 icons added)

#44 Post by seaside »

vovchik wrote:Dear all,

I have revised bsvg again and added heaps of new svgs (now 410). I have also included a script that dumps all the icons in the library to your current directory as svg files - and you can specify colors. Incorporated in this version is a set by P.J. Onori (http://somerandomdude.com/work/iconic/), but I first had to modify all his polygons and other shape macros to full svg paths and to standardize all views to 128x128. His icons start with "I_". A real pain, that transformation exercise, but at least all the icons are now one size. I also added a few of my own (icon names starting with V_).

Have fun...
Vovchik,

Very impressive.

I checked out those icons mentioned by 01micko and after struggling to parse out the path with this convoluted phrase

Code: Select all

 sed -n '/<path style/,/\/>/p' $ICON.svg|sed 's/\t//g'|tr -d '\012\015'|cut -f3 -d=|sed 's|/>||'
only to find many were empty and some did not work. Since I had no idea of how to convert the polygons to path draw statements, I did what I do best.......went on to something else. :D

Thanks for your hard work and how does one convert polygons (or anything else) to path draw statements?

Best Regards,
s

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#45 Post by vovchik »

Dear seaside,

Thanks. Conversion is a royal pain in the arse. You have to ungroup the image in Inkscape (several times) and then use Item->Convert to paths for every object. I suppose this could be done algorithmically, but I did it the ugly manual way, with some preliminary programmed parsing to throw out prolix metadata and other unnecessary garbage. Nominal scaling is also another pain, but it is important to have one viewport for all icons of the same dimensions, particularly if you later want to convert to png or something else. It will save work later on. With the transform statement I have included, and the path data, you should now be able to use the data in bash or something else to make your own generator or gui.

With kind regards,
vovchik

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#46 Post by seaside »

Vovchik,

Wow. That work is a tribute to your tenacity and knowledge of imagery :!:

Thanks again,
s
(Now I know why I was wise enough to go on to something else :D )
EDIT: I did find that the cross icon didn't render

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#47 Post by technosaurus »

vovchik wrote:Dear seaside,

Thanks. Conversion is a royal pain in the arse. You have to ungroup the image in Inkscape (several times) and then use Item->Convert to paths for every object. I suppose this could be done algorithmically, but I did it the ugly manual way, with some preliminary programmed parsing to throw out prolix metadata and other unnecessary garbage. Nominal scaling is also another pain, but it is important to have one viewport for all icons of the same dimensions, particularly if you later want to convert to png or something else. It will save work later on. With the transform statement I have included, and the path data, you should now be able to use the data in bash or something else to make your own generator or gui.

With kind regards,
vovchik
... yeah, I've just been stringing only the d="..." from each path into the same one in a separate file and then pasting them back into my case statement using none of the rest of the svg metadata, rounding the numbers along the way... fairly reasonable success when they are all on the same scaling (too much math otherwise)

it was easier to replace "M", "C", and "L" with \nM \nC and \nL in geany (sed would have worked too but I wanted to _see_ it)
also replaced commas with spaces to help awk
this is the awk:

Code: Select all

awk '/^L/||/^M/{printf "%c %d,%d",$1,$2+0.5,$3+0.5}
/^C/{printf "%c %d,%d %d,%d %d,%d", $1, $2+0.5, $3+0.5, $4+0.5, $5+0.5, $6+0.5,$7+0.5}' infile >outfile
this rounding part _should_ cut the code size down quite a bit (as much as 80% reduction)
FYI, adding 0.5 and casting to int (%d) is a nifty rounding trick that works great (fast) in C also, though in C you would actually need to do: (int) (myfloat + 0.5) ... awk does that for us

here is another email icon
d="M 2,38 L 16,24 L 24,32 L 32,24 L 46,38 L 2,38 z M 0,8 L 14,22 L 0,36 L 0,8 z M 2,6 L 24,28 L 48,6 L 2,6 z M 48,8 L 34,22 L 48,36 L 48,8 z "[/list]
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#48 Post by seaside »

vovchik,

Here's the reworked bsvg-gui for sit to go with your new gem.

Code: Select all

#!/bin/sh
#
# based on bash svgdraw by technosaurus (as
#         modded by vovchik) and raphaeljs by
#         Dmitriy Baranovskiy (copyright 2008
# LICENSE:   GPL3
# Iconics svgs added
# GUI seaside -requires sit2 and bsvg-0.1c.

for i in `bsvg -I`; do ICONS="$ICONS<item>$i</item>";done
for i in `bsvg -C`; do COLS="$COLS<item>$i</item>";done

 makeicon()  {
 bsvg $ICON  $LINE_COLOR  $FILL_COLOR ->/tmp/siticon.svg
 exit
 }
 export -f makeicon
 
 echo '<svg width="128" height="128" viewBox="0 0 128 128">
	<g transform="matrix(4.000000,0.000000,0.000000,3.637503,24.80000,5.999897)">
		<path style="fill:aliceblue;fill-rule:nonzero;stroke:aliceblue;fill-opacity:0.75;stroke-opacity:0.75;stroke-width:1pt;stroke-linejoin:miter;stroke-linecap:butt;"
		d="M9.212,32c-2.359,0-4.719-0.898-6.52-2.691c-3.59-3.598-3.59-9.449,0-13.039l8.113-7.938 c0.461-0.465,0.727-1.102,0.727-1.785c0-0.68-0.266-1.32-0.742-1.805C9.798,3.75,8.181,3.754,7.181,4.746 C6.196,5.738,6.196,7.355,7.188,8.348L4.356,11.18C1.806,8.625,1.806,4.473,4.353,1.918c2.562-2.559,6.711-2.555,9.264-0.004 c1.242,1.238,1.922,2.887,1.922,4.637c0,1.75-0.68,3.395-1.922,4.629l-8.111,7.934c-2.02,2.016-2.02,5.328,0.02,7.363 c2.031,2.035,5.344,2.031,7.383,0c2.029-2.035,2.029-5.348,0-7.379l-1.422-1.414l4.35-4.348l2.828,2.828l-1.672,1.672 c2.266,3.562,1.852,8.359-1.258,11.469C13.937,31.102,11.571,32,9.212,32L9.212,32z" />
	</g>
</svg> ' >/tmp/siticon.svg

sit /tmp/siticon.svg &
 
export MAIN_DIALOG='
<vbox>
  <hbox>
    <text>
      <label>Icon Select::</label>
    </text>
    <combobox>
      <variable>ICON</variable>
      '"$ICONS"'
    </combobox>
  </hbox>
  <hbox>
    <text>
      <label>Line Color</label>
    </text>
    <combobox>
      <variable>LINE_COLOR</variable>
      '"$COLS"'
    </combobox>
  </hbox>
  <hbox>
    <text>
      <label>Fill Color</label>
    </text>
    <combobox>
      <variable>FILL_COLOR</variable>
      '"$COLS"'
    </combobox>
  </hbox>
  <hbox>
   <button ok>
      <action>makeicon</action>
   </button>
   <button cancel>
      <action>killall sit</action>
    <action>exit:</action>
   </button>
  </hbox>
 </vbox>
'

gtkdialog3 --program=MAIN_DIALOG
unset MAIN_DIALOG 
technosaurus

Code: Select all

awk '/^L/||/^M/{printf "%c %d,%d",$1,$2+0.5,$3+0.5}
/^C/{printf "%c %d,%d %d,%d %d,%d", $1, $2+0.5, $3+0.5, $4+0.5, $5+0.5, $6+0.5,$7+0.5}' infile >outfile 
Really "awksome" I think I'll have to go to a dark corner somewhere and try to recover :D

Amazing to have every likely icon quickly available in a simple easily recognizable image. Nicely done.

Regards,
s

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

bsvg updated (478 icons)

#49 Post by vovchik »

Dear guys,

I have been at it again. This is version 0.1d that now contains 478 icons. The "V-bk" ones are really good and useful. Please have a look. Technosaurus' email icon is also in there.

With kind regards,
vovchik

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#50 Post by technosaurus »

I had some goodies to post, but i got a little too inventive with my svg coding and deadlocked my system. Turns out that if you recursively include an image in itself viewnior starts trying to open it but goes into an endless loop, inkscapelite only goes down one layer so it is fine, and seamonkey will keep showing layer after layer but eventually deadlock the system. There was a difference if you had 2 copies that included each other (a.svg that includes b.svg and vice versa) compared to an image that includes itself (apparently some apps do detect that)

Here is close to what the example was if anyone wants to test their favorite viewer:

Code: Select all

<svg width="100%" height="100%"
     xmlns="http://www.w3.org/2000/svg"
     xmlns:xlink="http://www.w3.org/1999/xlink">
  <circle cx="50%" cy="50%" r="50%" style="fill:red;opacity:0.05" />
  <image x="1%" y="1%" width="98%" height="98%" xlink:href="b.svg" />
</svg>
@vovchik/seaside: The SVG code appears to be progressing to the point where it is useful outside the tray. If you want to start a separate thread, let me know and I'll put a link in my initial post.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Post Reply