| 201 | |
| 202 | The necessary commands are shown below. |
| 203 | |
| 204 | |
| 205 | {{{ |
| 206 | Key name: CairoCommands |
| 207 | Data: <ctxt>save</><transl>0 0.2</><scale>0.01 0.01</><imgkey>OverlayImage # 1</><ctxt>restore</> |
| 208 | <ctxt>save</><transl>0.4 0.3</><scale>0.01 0.01</><imgkey>OverlayImage2 # 1</><ctxt>restore</> |
| 209 | }}} |
| 210 | |
| 211 | |
| 212 | [[Image(source:/icon_tutorial/multimedia_folder.png, nolink)]] [[Image(source:/icon_tutorial/multimedia_folder_small.png, nolink)]] |
| 213 | |
| 214 | ==== Additional commands in detail ==== |
| 215 | |
| 216 | {{{ |
| 217 | <transl>x y</>: |
| 218 | |
| 219 | Specify the position for the next paint command. |
| 220 | }}} |
| 221 | |
| 222 | ''X'' and ''y'' specify the position on the surface where subsequent painting will take place. 0.0 0.0 is the upper left corner. The values may run from 0.0 to 1.0. |
| 223 | |
| 224 | ---- |
| 225 | |
| 226 | The resulting icon shows that images are drawn in the order they are described in the painting commands. Thus the speaker image (!OverlayImage2) is painted on the very top. |
| 227 | |
| 228 | Each of the image commands is surounded by ''<ctxt>save</>'' and ''<ctxt>restore</>''. This facilitates correct scaling and positioning. An example shows this. |
| 229 | |
| 230 | {{{ |
| 231 | Key name: CairoCommands |
| 232 | Data: <ctxt>save</><transl>0 0.2</><scale>0.01 0.01</><imgkey>OverlayImage # 1</> |
| 233 | <transl>0.4 0.3</><scale>0.01 0.01</><imgkey>OverlayImage2 # 1</><ctxt>restore</> |
| 234 | }}} |
| 235 | |
| 236 | Using only one block of context save commands (which is pointless because no further painting is done) yields the following icon. |
| 237 | |