images/genicons.sh
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Fri, 13 Jan 2017 19:51:36 +0300
changeset 1631 940e20a8865b
parent 533 25437efb7ae4
child 2238 a01a3ed1af2c
permissions -rwxr-xr-x
fix issue with printing scheme (FBD, LD or SFC) with comment element on GNU/Linux

If you draw FBD scheme and place comment on it and then try to print
it, then no wires will be printed and comment box is empty (text is
missing). This happens only for wx.PrinterDC and not on wx.MemoryDC
that is used to draw print preview window in Beremiz IDE.
Looks like a bug in wxPython or wxWidgets.

There were found several workaround for this issue.
1) If some dc.DrawLines call is placed before dc.DrawPolygon, then the
problem is gone.

...
dc.DrawLines(polygon)
dc.DrawPolygon(polygon)
...

2) Reseting DC brush solves the problem as well (see this changeset).
197
a50b5fa04c57 SVG/Inkscape based icon generation script + SVG drawing.
etisserant
parents:
diff changeset
     1
#!/bin/bash
a50b5fa04c57 SVG/Inkscape based icon generation script + SVG drawing.
etisserant
parents:
diff changeset
     2
a50b5fa04c57 SVG/Inkscape based icon generation script + SVG drawing.
etisserant
parents:
diff changeset
     3
INKSCAPE=inkscape
a50b5fa04c57 SVG/Inkscape based icon generation script + SVG drawing.
etisserant
parents:
diff changeset
     4
a50b5fa04c57 SVG/Inkscape based icon generation script + SVG drawing.
etisserant
parents:
diff changeset
     5
for i in `cat icons.svg |grep -o -e '%%[^%]*%%'|sed 's/%//g'` 
a50b5fa04c57 SVG/Inkscape based icon generation script + SVG drawing.
etisserant
parents:
diff changeset
     6
do
199
aa5f43bafad4 minor gui improvements :
etisserant
parents: 197
diff changeset
     7
 if [ $i.png -nt icons.svg ]; then
aa5f43bafad4 minor gui improvements :
etisserant
parents: 197
diff changeset
     8
 	echo "Skip $i"
aa5f43bafad4 minor gui improvements :
etisserant
parents: 197
diff changeset
     9
 else
aa5f43bafad4 minor gui improvements :
etisserant
parents: 197
diff changeset
    10
	rm  -f $i.png
aa5f43bafad4 minor gui improvements :
etisserant
parents: 197
diff changeset
    11
	echo "$INKSCAPE" icons.svg -z -e $i.png -i $i
aa5f43bafad4 minor gui improvements :
etisserant
parents: 197
diff changeset
    12
	"$INKSCAPE" icons.svg -z -e $i.png -i $i
aa5f43bafad4 minor gui improvements :
etisserant
parents: 197
diff changeset
    13
 fi
197
a50b5fa04c57 SVG/Inkscape based icon generation script + SVG drawing.
etisserant
parents:
diff changeset
    14
done
a50b5fa04c57 SVG/Inkscape based icon generation script + SVG drawing.
etisserant
parents:
diff changeset
    15
a50b5fa04c57 SVG/Inkscape based icon generation script + SVG drawing.
etisserant
parents:
diff changeset
    16
cp ico24.png brz.png
533
25437efb7ae4 Christmas 2009 release
Edouard TISSERANT <edouard.tisserant@gmail.com>
parents: 199
diff changeset
    17
convert ico*.png brz.ico
25437efb7ae4 Christmas 2009 release
Edouard TISSERANT <edouard.tisserant@gmail.com>
parents: 199
diff changeset
    18
rm -f ico*.png