Developing Stencils
The following screenshots are taken from a GNU/Linux desktop using Pencil to create the prototype GUI for a Windows application and the Pencil website mockups
The following screenshots are taken from a GNU/Linux desktop using Pencil to create the prototype GUI for a Windows application and the Pencil website mockups
Pencil controls shapes in its document by mean of stencils. Each stencil (Rectangle,
for example) is indeed a template to generate shapes. Each template
defines:
For example: the Rectangle stencil defines a shape formed by a single SVG <rect> element.
Fox example: the Rectangle stencil has a 'box' property of type Dimension, a 'strokeStyle' property of type StrokeStyle and a 'fillColor' property of type Color.
For example: the Rectangle <rect> element has its fill and fill-opacity change to the 'fillColor' property of the shape.
For example: the Rectangle stencil define a 'Remove border' action to allow users setting the 'strokeStyle' width property to 0px and hence makes the <rect> element's border disappeared.
Stencils are organized in collections. Each collection contains a set of related stencils and can be installed into or uninstalled from Pencil using the collection manager attached to the collection pane.
After being installed into Pencil, a stencil can be used to create
shapes by dragging it into the drawing pane of a page. When a stencil
is dropped into a page, the following actions will be taken by Pencil
to create a shape for that stencil:
After being successfully inserted into a page, a shape begins its life in that page. During the life, a shape may have its properties changed to the desired value of the user. Depending on the type, a property value can be changed in a specific way that is easiest to the user. In the current implementation of Pencil, property manipulation is detailed in the following table:
Note: Pencil reserves the use of some special property names for pre-defined purposes. Please refer the XXX document to have detailed information on how these property names can be used in your stencil.
An example of this is that the 'box' property of type 'Dimension' should always be used to
determined the dimension of the outmost box surrounding the shape.
| Property Type |
Property Name |
Primary Method of Manipulation |
Other Methods |
|---|---|---|---|
| Dimension |
box |
Using the on-screen geometry
editor with handles for resizing. |
|
| other names |
Not
implemented |
||
| Color |
fillColor |
Using the color toolbar |
Using the Property Dialog |
| strokeColor |
Using the color toolbar | Using the Property Dialog | |
| other names |
Using the Property Dialog | ||
| StrokeStyle |
any name |
Using the Property Dialog |
|
| Alignment | any name | Using the Property Dialog | |
| Bool |
any name | Using the context menu |
|
| Font |
textFont |
Using the font toolbar |
Using the Property Dialog |
| other names | Using the Property Dialog | ||
| Enum |
any name | Using the context menu |
|
| Handle |
any name | Using the on-screen handle
editor when focusing the shape |
|
| PlainText |
any name | Using the on-screen plain text
editor activated by double clicking the shape or pressing F2 while
focusing it |
Using the Property Dialog |
| RichText |
any name | Using the on-screen rich text editor activated by double clicking the shape or pressing F2 while focusing it |