-
Notifications
You must be signed in to change notification settings - Fork 0
/
picedit.doc
273 lines (198 loc) · 10.1 KB
/
picedit.doc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
This document describes the picture editor of Free Hero Mesh.
To start the picture editor, use the -p switch. In this case, the puzzle
set files are not required to exist; the .xclass file will be created if
necessary, and the other ones are ignored.
This allows creating the graphics for the classes of objects in the puzzle
set. The class definition file will associate one or more pictures with
each class, using the names given in the picture file.
Each named picture can have up to fifteen variants. Only one variant is
used; which one is used depends on the .altImage and .imageSize settings,
which can be defined by the end user.
=== Main menu ===
The main menu displays the list of the names of all pictures. This list is
sorted by name. Grey means a normal picture, green means dependent, and
brown with a red plus sign in front means multidepenent.
You can push escape to quit and save, or shift+escape quits without saving.
The F1 key adds a picture.
The F2 key deletes a picture by name.
The F3 key allows entering a name of a picture to edit.
The F4 key renames a picture.
The F5 key adds a dependent picture (see the below section).
The F6 key is used to set configuration. Currently, this only sets the
default picture sizes. If you specify zero, then it will use the user
configuration, otherwise it is saved with the puzzle set, and will be
used when adding new pictures. You can specify multiple sizes; it will
create it with variants of all of those sizes. You can also specify the
same numbers multiple times if you want multiple variants of that size.
The F7 key copies a picture.
The F12 key allows entering a SQL statement. If there are any result rows,
only the first row and first column are displayed.
Any of the prompts for picture names can start the picture name with a
plus sign in order to affect a multidependent picture; see the below
section about multidependent pictures for details.
=== Drawing ===
The following keyboard commands are available:
Esc
Leave the drawing screen.
Shift+Tab or [
Select the previous image variant.
Tab or ]
Select the next image variant.
1 to 9
Select one of the first nine image variants.
Space
Unmark the block and point.
Return
Copy the marked part of the picture to the clipboard. This will discard
the previous contents of the clipboard (if any). This is separate from
the operating system clipboard; it is local to Free Hero Mesh, and is
lost when Free Hero Mesh is restarted.
Insert
Paste from the clipboard. If a block is marked, it will stretch the
pasted image to fit the area. If a point is marked but not a block, that
point will be the upper left corner of the paste position. If neither,
then it is pasted with its upper left corner at the upper left corner of
the current image buffer.
Delete
Erase the pixels marked block, making all of the pixels transparent.
Arrows
Allows selecting a colour without using the mouse.
Home
Selects transparency as the current colour.
F1
Rotate marked area clockwise by 90 degrees. The marked area must be
square in order for this to work.
F2
Rotate marked area counterclockwise by 90 degrees. The marked area must
be square in order for this to work.
F3
Flip marked area vertically.
F4
Flip marked area horizontally.
F5
Resizes the current image variant. It will ask for the size; enter a
number from 1 to 255 to set the size (which is always square), and then
it will resize and clear the image. If you enter P then it will become
a copy of the contents of the clipboard; this won't work if the contents
of the clipboard is not square.
F6
Add a new image variant. It will ask for the size, like with F5, except
this adds a new one rather than replacing the existing one. The maximum
number of image variants is fifteen.
F7
Delete the current image variant. You cannot delete all of the variants
of an image; you must have at least one.
F8 or number pad *
Mark the entire image as a block.
F9
Import a picture. At the prompt, you must enter a system command which
will produce a square farbfeld picture on stdout. The imported picture
will replace the current picture variant.
F10
Export a picture. At the prompt, you must enter a system command which
will read a farbfeld picture from stdin.
F12
Enter a SQL statement to edit the current picture. This should be a
UPDATE statement which updates the column called "C" of the table called
"GRAPH". It has columns "X" and "Y" which are the coordinates of the
pixel, and "C" which is the colour of the pixel. It may also be a SELECT
statement in order to query it, and the response is then displayed
(which must be a single row and single column only). This table also has
a column "S" which is the same for all rows, and is the size of the
picture, which can be used in macros (see config.doc).
` or =
Exchange the current picture with the spare page. (The spare page is not
stored in the puzzle set; it is lost when Free Hero Mesh is terminated.)
Click in the colour palette on the right to select a colour. With the left
button, that colour is selected as the current colour. The middle button
will replace everything of the current colour with the clicked colour, and
the right button will exchange pixels between the current colour and the
clicked colour; in either case, if any block is marked, only the marked
block will be affected.
You can type alphabets to select the drawing mode. The available drawing
modes are as follows:
Draw (D)
The left mouse button draws with the current colour, and the right mouse
button draws transparent pixels; you can also hold and drag the mouse to
draw multiple pixels. Clicking with the middle button will select the
clicked colour as the current colour.
Mark (M)
Select a point with the left button, and then the right button selects
the opposite corner of the rectangular area to mark.
Pick (P)
Clicking in the picture editing area will have the same effect as
clicking in the colour palette, on the same colour as the pixel.
Line (L)
Click the left button on the initial point of the line, and then click
the middle or right button on the final point of the line. If the right
button is used then the new point is the new initial point for further
lines, otherwise a further line will use the old initial point.
Hollow rectangle (R)
Click the left button on the first corner and the right button on the
other corner.
Filled rectangle (F)
Click the left button on the first corner and the right button on the
other corner.
Hollow circle (C)
Click the left button at the centre of the circle and the right button
at the radius, or you can click the left button at the radius and the
middle button at the centre.
Filled circle (I)
Click the left button at the centre of the circle and the right button
at the radius, or you can click the left button at the radius and the
middle button at the centre.
Hollow ellipse (E)
Click the left button on one corner of the bounding rectangle of the
ellipse, and then click the middle or right button on the other side.
Filled ellipse (S)
Click the left button on one corner of the bounding rectangle of the
ellipse, and then click the middle or right button on the other side.
Flood (O)
Click any button to flood an area of a solid colour with the current
colour. Which button decides the directions to use, where the left
button means the von Neumann neighbourhood and the right button means
the Moore neighbourhood.
For clicking in the palette or the Pick mode, with the middle or right
mouse button, you can also push CTRL or SHIFT keys with it in order to
affect only odd or only even coordinates.
=== Dependent pictures ===
A dependent picture depends on one or more independent pictures. It
consists of any combination of the following items, in any order:
* Base: This one must come first, and is the independent picture which
will be used as the base; all other filters are applied to alter it.
* Flip/rotation: Flip/rotate the picture. "Identity" also belongs to this
category, but has no effect.
* Replace colours: A list of pairs of colours. The first of each pair is
the old colour, and next the colour to replace it with.
* Advance colours: A list of colours; change each colour mentioned in the
list into the next colour in the list after that one.
* Exchange colours: A list of pairs of colours; each colour is changed to
the other colour in the pair.
* Overlay: Paste the specified independent picture over the current
picture, showing through wherever it is transparent.
* Shift: Shift the picture. Specify the sizes and shift amounts in the
format "size: shift"; each size also affects all multiples of that size,
in which case the shift amount is also multiplied by the same amount.
* Hue/Shade: Specify hue adjustment and shade adjustment. The hue
adjustment is unsigned, and the shade adjustment is signed; any colours
that are in range 1 to 225 are affected; other colours remain unchanged.
=== Multidependent pictures ===
A multidependent picture lump defines several pictures which are formed
from one or more independent pictures and filters, using common sets of
base pictures and filter chains.
You can define a list of up to 63 bases and up to three lists of filter
chains each of which may contain up to 63 filter chains; all pictures are
generated which take all combinations of one item from each list.
Each list may be nullable. In this case, you can omit to choose an item
from that list for forming a picture. Empty lists are automatically
nullable, even if they have not been defined as nullable.
Each picture is made from a base, followed by a filter chain in the first
list, and then the second list, and then the third.
The bases are names of independent pictures. The filter chains may have
any names, up to seven characters; if the first character is a dot or
underscore or hyphen, then they may be up to eight characters. The name
of the resulting picture is then the name of the selected item of each
list, in order, concatenated together (the name of the multidependent
picture lump itself is not used).
Each filter chain is defined in the same way as for dependent pictures,
although you cannot specify a base name, because there isn't any.