Vector icon module
vector.iconmodule: AmigaOS 4 icon module for scalable vector icons rendered
with cairo, plus svg2icon to create them from SVG files. By Fredrik
Wikstrom.
Version 53.1 (2012-12-02), never released.
The icons use their own IFF-style format ("AmigaOS Vector Icon",
src/include/vector_icon_format.h): a header with the nominal icon size,
position and scaling chunks and vector data for the normal and selected
image, optionally compressed with zlib or bzip2.
svg2icon
svg2icon N=NORMAL/A,S=SELECTED,W=WIDTH/N,H=HEIGHT/N,TO=ICON/A
Makes a vector icon from one or two SVG files (normal and selected image)
using libsvgtiny.
Building
src/Makefile cross-compiles with ppc-amigaos-gcc: type make in src/
to build converter/svg2icon and iconmodule/vector.iconmodule.
- The module links the prebuilt static libraries in
src/lib/
(libcairo.a, libpixman-1.a); make build_pixman and make build_cairo
rebuild them from the bundled sources.
- svg2icon needs libsvgtiny and its libraries (libdom, libwapcaplet,
libparserutils) from the SDK; it uses the shared expat.library through the
stubs in
src/expat/.
tests/showicon_cairo and tests/showicon_libart are test programs (the
libart one needs libart_lgpl).
- Other targets:
install and clean.
Contents
src/iconmodule/: the icon module (main/ has one file per module
function, utility/RenderVectorIcon.c renders the icons).
src/converter/svg2icon.c: the SVG converter.
src/include/: the vector icon format header and the cairo and pixman
headers.
src/lib/: prebuilt cairo and pixman static libraries.
src/cairo-1.12.8/: cairo, under the LGPL 2.1 or the MPL 1.1 (see its
COPYING).
src/pixman-0.28.0/: pixman, under the MIT license (see its COPYING).
src/expat/: stubs for calling expat.library.
src/tests/: test programs.
The release/ folder was empty in the Subversion repository, so it is not
in this repository.
Original project description
The OpenAmiga.org project page described the goal like this:
Initial requirements
- The icon module and related tools must not require any external software
that isn't already shipped with OS4.1.
- Icon tool types shall not be used for any format specific information.
All such information shall be contained within the icon format itself.
Step 1 functionality.
- Icon format must be able to contain selected and non selected image.
- Each image shall contain information such as:
- vector data
- x/y centering inside the icon rectangle.
- x/y scaling relative to icon rectangle.
- Icons without a selected image shall be rendered with a selected icon
glow-effect.
- A tool for creating icons from a popular vector based image format such
as SVG must be created.
example: svgtoicon image1.svg image2.svg 64x64 (see more below)
- A tool for scaling an icon (see more below)
- Effort must be taken on making it possible to scale icons as supported by
the OS4.1 icon system. However each icon shall contain a nominal icon size
that defines the height and width that the icon will be rendered with
normally when a specific size is not requested.
Step 2 functionality.
- Icon animation support either through multiple images or though time
index based vector movement paths.
- Vector based icon editor.
Icon creation tool
The icon creation tool shall at minimum be able to take two vector images
and an icon size and compose the images into a vector based icon with a non
selected and selected image using a specific width and height.
Example: svgtoicon image1.svg image2.svg 64x64
This will create an icon with two images, where each image will have a 1 to
1 x/y scaling values (relative to the icon rectangle 64x64) and be centered
in the icon rectangle.
If only one image is specified then the icon will not contain a selected
icon image. The icon plugin shall see to that a selected image is generated
when the icon is rendered.
An advanced conversion mode may include using an input file containing the
necessary information for each image.
- non selected image
- non selected image x/y scaling values
- non selected image x/y centering values
- selected image
- selected image x/y scaling values
- selected image x/y centering values
- nominal icon width and height
Icon scaling tool
This tool shall be able to redefine the nominal icon dimensions as well as
the individual image scaling and centering values.
Note: This tool shall not recalculate any vector data, only change the
mentioned parameters.
History
The project was created on OpenAmiga.org in 2008 (the first commits are
Subversion test commits). Fredrik Wikstrom wrote vector.iconmodule and
svg2icon in 2012 and updated them in 2013-2014. Moved to GitHub in November
2026, with its full commit history. |