Changes between Version 9 and Version 10 of IconTutorial


Ignore:
Timestamp:
Dec 29, 2007, 9:16:41 AM (16 years ago)
Author:
cinc
Comment:

Added paint command example

Legend:

Unmodified
Added
Removed
Modified
  • IconTutorial

    v9 v10  
    167167<imgkey>imgname # alpha</>:
    168168
    169    Paint an image specified by the key ''imgname'' on the current surface with an alpha level of ''alpha''.
     169   Paint an image specified by the key 'imgname' on the current surface with an alpha level of 'alpha'.
    170170}}}
    171171
    172172This command will paint an image at the current position with the current scaling. The value of ''alpha'' may run from 0.0 to 1.0 where 1.0 means completely opaque while 0.0 means completely translucent. ''imgname'' is the name of a key in the ini file specifiying the image file to be used. The path is a relative one as known from the 'Image' key. Note that the spelling of the key is important and references to keys belonging to other icons are not possible.
    173173
     174----
     175
     176In this example slight changes are made to the paint commands. The alpha value was reduced and the scaling factors increased. 
     177
     178{{{
     179   Key name:             CairoCommands
     180   Data:                 <ctxt>save</><scale>0.015 0.015</><imgkey>OverlayImage # 0.5</><ctxt>restore</> 
     181}}}
     182
     183This icon is the result.
     184
     185
     186[[Image(source:/icon_tutorial/overlay2_alpha.png, nolink)]]
     187