Changes between Version 14 and Version 15 of IconTutorial


Ignore:
Timestamp:
Dec 29, 2007, 8:16:22 PM (17 years ago)
Author:
cinc
Comment:

Ending words added

Legend:

Unmodified
Added
Removed
Modified
  • IconTutorial

    v14 v15  
    240240Where is the second overlay image gone?
    241241
    242 It's actually still kind of there but you can't see it because it is scaled two times by 0.01 and thus won't be painted anymore (it's size is smaller than a single pixel). The reason is the way scaling (and positioning using the ''<transl>'' command) works. The scaling is applied once to the drawing context and will work on all subsequent paint commands. The same goes for the translate command which moves the current drawing context in space. So the first scale command resizes all the following images by 0.01. The second scale comand resizes again by 0.01 for the then following images (that is !OverlayImage2). The scaling also influences the translate commands which are also global.[[BR]]
    243 So to get the same icon as before the commands has to be like the following.
     242It's actually still kind of there but you can't see it because it is scaled two times by 0.01 and thus won't be painted anymore (it's size is smaller than a single pixel). The reason is the way scaling (and positioning using the ''<transl>'' command) works. The scaling is applied once to the drawing context and will work on all subsequent paint commands. The same goes for the translate command which moves the current drawing context in space. So the first scale command resizes all the following images by 0.01. The second scale comand resizes again by 0.01 for the then following images (that is !OverlayImage2). The scaling also influences the translate commands which are also global.
     243
     244So to get the same icon as before the commands have to be like the following.
    244245
    245246{{{
     
    253254Calculating the correct factors and offsets may become tricky when using a lot of commands so the ''<ctxt>'' command comes in handy in the end. Interpreting the command string and assembling the final icon may use slightly more time for the longer sequence but this only happens once when loading the icon and thus doesn't cause much harm.
    254255
     256
     257== Ending words ==
     258
     259As shown creating new icons from a set of predefined images isn't exactly rocket science. This small tutorial gave a short run on how to do it with minimal effort. Using this blueprint a majority of eCS icons can be created just by changing the base image, the overlay images and the given commands.
     260
     261The icon engine offers way more features which will be described elesewhere.