document icon rendering and fix a broken 16x16 icon
This commit is contained in:
parent
80461c9b76
commit
30bc42a3f3
2 changed files with 26 additions and 1 deletions
|
|
@ -31,6 +31,31 @@ inkscapePath = "/usr/bin/inkscape"
|
|||
rsvgPath = "./rsvg-convert"
|
||||
artworkLayerPrefix = "artwork:"
|
||||
|
||||
#
|
||||
# 2/2011 some notes by Ichthyo
|
||||
# The purpose of this python script is
|
||||
# - to parse a SVG
|
||||
# - to invoke Inkscape to render this SVG into a raster image (icon)
|
||||
#
|
||||
# For the actual call into Incscape we rely on an executable 'rsvg-convert',
|
||||
# which is built during the Lumiera build process.
|
||||
#
|
||||
# Judging from the code and the actual SVGs, this seems to work as follows:
|
||||
# The SVG contains a design to be rendered into raster images of various sizes.
|
||||
# These sizes are determined by special rectangles, which act as bounding box and
|
||||
# are placed on a special 'plate' layer, which is a child layer of the main
|
||||
# 'artwork:' layer. The grid of the SVG is setup such as to result in pixel sizes
|
||||
# suitable for icon generation. The actual size of the generated icons are then
|
||||
# parsed from the height and width attributes of the mentioned bounding box
|
||||
# rectangles.
|
||||
#
|
||||
# The parser seems to be rather simplistic; the sizes and positions need to be
|
||||
# integral numbers. In one instance we had a float number in the y coordinate,
|
||||
# which resulted in an invalid, zero sized output icon
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
def createDirectory( name ):
|
||||
try:
|
||||
if os.path.isfile(name):
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@
|
|||
width="16"
|
||||
height="16"
|
||||
x="124"
|
||||
y="76.009514" />
|
||||
y="76" />
|
||||
<rect
|
||||
y="60"
|
||||
x="60"
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Loading…
Reference in a new issue