Jump to content

Calligra/Build Stencils for Flow: Difference between revisions

From KDE Community Wiki
Yue (talk | contribs)
No edit summary
Yue (talk | contribs)
No edit summary
Line 1: Line 1:
It is very easy to create stencil collections for Flow.
It is very easy to create stencil collections for Flow.


Line 14: Line 13:


We strongly recommand you use Karbon for the stencils creation to ganrantee compatibility, but consider Karbon is not ready for professional production, you can use your favourite svg drawing application like inkscape to draw the stencils and import them to Karbon.
We strongly recommand you use Karbon for the stencils creation to ganrantee compatibility, but consider Karbon is not ready for professional production, you can use your favourite svg drawing application like inkscape to draw the stencils and import them to Karbon.
[[File:Import-graphic.png|200px|thumb|left|alt text]]


After svg files imported, you need to place a text shape on the stencil to provide stencil labels, usually it should be as big as the bounding box to your stencil, unless you need customized label positions or multi labels.
After svg files imported, you need to place a text shape on the stencil to provide stencil labels, usually it should be as big as the bounding box to your stencil, unless you need customized label positions or multi labels.

Revision as of 18:31, 28 January 2011

It is very easy to create stencil collections for Flow.

Structure

In Flow, stencils are shape items listed on Stencil Box docker, they are written in openDocument graphic format(.odg). In Flow default stencils are placed at /usr/share/apps/flow/stencils/, each subdirectory represents one stencil family, under such a directory there is a config file (collection.desktop) and one or several odg files. One group in an odg file(a <draw:g> element in xml) represents a stencil, you can create all stencils in a family in one file, or seperated in several files if you want.

collection.desktop

This is a desktop entry file claiming the family name of the stencils under the deirctory, directory without the file won't be read by Stencil Box docker, you can refer to the examples in source code(flow/stencils) to write your own one.

Create stencils file

We strongly recommand you use Karbon for the stencils creation to ganrantee compatibility, but consider Karbon is not ready for professional production, you can use your favourite svg drawing application like inkscape to draw the stencils and import them to Karbon.

alt text

After svg files imported, you need to place a text shape on the stencil to provide stencil labels, usually it should be as big as the bounding box to your stencil, unless you need customized label positions or multi labels.

Now group your stencil and the label(make sure the label is placed on top), rename the group name to the name of stencil in English language, translators will translate them into local languages with the help of simple perl scripts in source code.

Publish your stencils

After you finished your stencil collection, you can upload it to the Flow stencil library website, currently we need volunteers to help with the site.