Branch: Tag:

1999-04-17

1999-04-17 19:41:58 by Mirar (Pontus Hagland) <pike@sort.mirar.org>

Image.Layer support begin

Rev: src/modules/Image/layers.c:1.1

2182:   </text></group>      </doc> + <docgroup homogen-name='lay' homogen-type='method'> + <method name='lay'> +  <returntype> +  <object resolved='predef::Image.Layer'>Image.Layer </object></returntype> +  <arguments><argument><value>array(Image.Layer|mapping)</value></argument> +  </arguments> + </method><method name='lay'> +  <returntype> +  <object resolved='predef::Image.Layer'>Image.Layer </object></returntype> +  <arguments><argument><value>array(Image.Layer|mapping)</value></argument><argument name='xoffset'><type><int/></type></argument> + <argument name='yoffset'><type><int/></type></argument> + <argument name='xsize'><type><int/></type></argument> + <argument name='ysize'><type><int/></type></argument> +  +  </arguments> + </method><doc> + <text> + <p>Combine layers.</p> + </text> + <group><returns/><text> + <p>a new layer object.</p> + </text></group> + <group><seealso/><text> + <p><ref resolved='predef::Image.Layer'>Image.Layer</ref></p></text></group> +  + </doc> + </docgroup>   <module name='ANY'>   <doc>   <text>
8820:   </doc>   </docgroup>   </module> + <class name='Layer'> + <docgroup homogen-type='method'> + <method name='set_image'> +  <returntype> +  <object>object </object></returntype> +  <arguments><argument name='image'><type> +  <object resolved='predef::Image.Image'>Image.Image</object></type></argument> +  +  </arguments> + </method><method name='set_image'> +  <returntype> +  <object>object </object></returntype> +  <arguments><argument name='image'><type> +  <object resolved='predef::Image.Image'>Image.Image</object></type></argument> + <argument name='alpha_channel'><type> +  <object resolved='predef::Image.Image'>Image.Image</object></type></argument> +  +  </arguments> + </method><method name='image'> +  <returntype> +  <or><object resolved='predef::Image.Layer.set_image'/><int><min>0</min></int></or></returntype> +  <arguments> +  </arguments> + </method><method name='alpha'> +  <returntype> +  <or><object resolved='predef::Image.Layer.set_image'/><int><min>0</min></int></or></returntype> +  <arguments> +  </arguments> + </method><doc> + <text> + <p>Set/change/get image and alpha channel for the layer. + You could also cancel the channels giving 0 + instead of an image object.</p> + </text> + <group><note/><text> + <p>image and alpha channel must be of the same size, + or canceled.</p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-type='method'> + <method name='set_alpha_value'> +  <returntype> +  <object>object </object></returntype> +  <arguments><argument name='value'><type><float/></type></argument> +  +  </arguments> + </method><method name='alpha_value'> +  <returntype> +  <object>float </object></returntype> +  <arguments> +  </arguments> + </method><doc> + <text> + <p>Set/get the general alpha value of this layer. + This is a float value between 0 and 1, + and is multiplied with the alpha channel.</p> + </text> +  + </doc> + </docgroup> + <docgroup homogen-name='create' homogen-type='method'> + <method name='create'> +  <returntype> +  <object>void </object></returntype> +  <arguments><argument name='image'><type><object resolved='predef::Image.Layer.create'/></type></argument> + <argument name='alpha'><type><object resolved='predef::Image.Layer.create'/></type></argument> + <argument name='mode'><type><string/></type></argument> +  +  </arguments> + </method><method name='create'> +  <returntype> +  <object>void </object></returntype> +  <arguments><argument name='info'><type><mapping/></type></argument> +  +  </arguments> + </method><method name='create'> +  <returntype> +  <object>void </object></returntype> +  <arguments> +  </arguments> + </method><method name='create'> +  <returntype> +  <object>void </object></returntype> +  <arguments><argument name='xsize'><type><int/></type></argument> + <argument name='ysize'><type><int/></type></argument> + <argument name='color'><type><object resolved='predef::Image.Layer.create'/></type></argument> +  +  </arguments> + </method><method name='create'> +  <returntype> +  <object>void </object></returntype> +  <arguments><argument name='color'><type><object resolved='predef::Image.Layer.create'/></type></argument> +  +  </arguments> + </method><doc> + <text> + <p>The Layer construct either three arguments, + the image object, alpha channel and mode, or + a mapping with optional elements: + <pre> + "image":image, +  // default: black +  + "alpha":alpha, +  // alpha channel object +  // default: full opaque +  + "mode":string mode, +  // layer mode, see &lt;ref&gt;mode&lt;/ref&gt;. +  // default: "normal" +  + "alpha_value":float(0.0-1.0), +  // layer general alpha value +  // default is 1.0; this is multiplied +  // with the alpha channel. +  + "xoffset":int, + "yoffset":int, +  // offset of this layer +  + "fill":Color, + "fill_alpha":Color, +  // fill color, ie what color is used +  // "outside" the image. default: black +  // and black (full transparency). +  + "tiled":int(0|1), +  // select tiling; if 1, the image +  // will be tiled. deafult: 0, off + </pre> + The layer can also be created "empty", + either giving a size and color - + this will give a filled opaque square, + or a color, which will set the "fill" + values and fill the whole layer with an + opaque color.</p> +  + <p>All values can be modified after object creation. + </p> + </text> + <group><note/><text> + <p>image and alpha channel must be of the same size. + </p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-type='method'> + <method name='set_fill'> +  <returntype> +  <object>object </object></returntype> +  <arguments><argument name='color'><type> +  <object resolved='predef::Image.Color'>Color</object></type></argument> +  +  </arguments> + </method><method name='set_fill'> +  <returntype> +  <object>object </object></returntype> +  <arguments><argument name='color'><type> +  <object resolved='predef::Image.Color'>Color</object></type></argument> + <argument name='alpha'><type> +  <object resolved='predef::Image.Color'>Color</object></type></argument> +  +  </arguments> + </method><method name='fill'> +  <returntype> +  <object>object </object></returntype> +  <arguments> +  </arguments> + </method><method name='fill_alpha'> +  <returntype> +  <object>object </object></returntype> +  <arguments> +  </arguments> + </method><doc> + <text> + <p>Set/query fill color and alpha, ie the color used "outside" the + image. This is mostly useful if you want to "frame" + a layer.</p> + </text> +  + </doc> + </docgroup> + <docgroup homogen-type='method'> + <method name='set_mode'> +  <returntype> +  <object>object </object></returntype> +  <arguments><argument name='mode'><type><string/></type></argument> +  +  </arguments> + </method><method name='mode'> +  <returntype> +  <object>string </object></returntype> +  <arguments> +  </arguments> + </method><doc> + <text> + <p>Set/get layer mode. Mode is one of these:</p> +  + <p><table><tr><td align='left' valign='top'> + <b><tt>normal</tt></b> + ? + </td><td align='left' valign='top'> + <image file='predef.Image.Layer.set_mode.1.png' height='115' width='80'>layers.c0.png</image> + </td><td/></tr></table></p> +  + <p><table><tr><td align='left' valign='top'> + <b><tt>addition</tt></b> + ? + </td><td align='left' valign='top'> + <image file='predef.Image.Layer.set_mode.2.png' height='115' width='80'>layers.c1.png</image> + </td><td/></tr></table></p> +  + <p><table><tr><td align='left' valign='top'> + <b><tt>behind</tt></b> + ? + </td><td align='left' valign='top'> + <image file='predef.Image.Layer.set_mode.3.png' height='115' width='80'>layers.c2.png</image> + </td><td/></tr></table></p> +  + <p><table><tr><td align='left' valign='top'> + <b><tt>color</tt></b> + ? + </td><td align='left' valign='top'> + <image file='predef.Image.Layer.set_mode.4.png' height='115' width='80'>layers.c3.png</image> + </td><td/></tr></table></p> +  + <p><table><tr><td align='left' valign='top'> + <b><tt>darken</tt></b> + ? + </td><td align='left' valign='top'> + <image file='predef.Image.Layer.set_mode.5.png' height='115' width='80'>layers.c4.png</image> + </td><td/></tr></table></p> +  + <p><table><tr><td align='left' valign='top'> + <b><tt>difference</tt></b> + ? + </td><td align='left' valign='top'> + <image file='predef.Image.Layer.set_mode.6.png' height='115' width='80'>layers.c5.png</image> + </td><td/></tr></table></p> +  + <p><table><tr><td align='left' valign='top'> + <b><tt>dissolve</tt></b> + ? + </td><td align='left' valign='top'> + <image file='predef.Image.Layer.set_mode.7.png' height='115' width='80'>layers.c6.png</image> + </td><td/></tr></table></p> +  + <p><table><tr><td align='left' valign='top'> + <b><tt>divide</tt></b> + ? + </td><td align='left' valign='top'> + <image file='predef.Image.Layer.set_mode.8.png' height='115' width='80'>layers.c7.png</image> + </td><td/></tr></table></p> +  + <p><table><tr><td align='left' valign='top'> + <b><tt>erase</tt></b> + ? + </td><td align='left' valign='top'> + <image file='predef.Image.Layer.set_mode.9.png' height='115' width='80'>layers.c8.png</image> + </td><td/></tr></table></p> +  + <p><table><tr><td align='left' valign='top'> + <b><tt>hue</tt></b> + ? + </td><td align='left' valign='top'> + <image file='predef.Image.Layer.set_mode.10.png' height='115' width='80'>layers.c9.png</image> + </td><td/></tr></table></p> +  + <p><table><tr><td align='left' valign='top'> + <b><tt>lighten</tt></b> + ? + </td><td align='left' valign='top'> + <image file='predef.Image.Layer.set_mode.11.png' height='115' width='80'>layers.c10.png</image> + </td><td/></tr></table></p> +  + <p><table><tr><td align='left' valign='top'> + <b><tt>multiply</tt></b> + ? + </td><td align='left' valign='top'> + <image file='predef.Image.Layer.set_mode.12.png' height='115' width='80'>layers.c11.png</image> + </td><td/></tr></table></p> +  + <p><table><tr><td align='left' valign='top'> + <b><tt>overlay</tt></b> + ? + </td><td align='left' valign='top'> + <image file='predef.Image.Layer.set_mode.13.png' height='115' width='80'>layers.c12.png</image> + </td><td/></tr></table></p> +  + <p><table><tr><td align='left' valign='top'> + <b><tt>replace</tt></b> + ? + </td><td align='left' valign='top'> + <image file='predef.Image.Layer.set_mode.14.png' height='115' width='80'>layers.c13.png</image> + </td><td/></tr></table></p> +  + <p><table><tr><td align='left' valign='top'> + <b><tt>saturation</tt></b> + ? + </td><td align='left' valign='top'> + <image file='predef.Image.Layer.set_mode.15.png' height='115' width='80'>layers.c14.png</image> + </td><td/></tr></table></p> +  + <p><table><tr><td align='left' valign='top'> + <b><tt>screen</tt></b> + ? + </td><td align='left' valign='top'> + <image file='predef.Image.Layer.set_mode.16.png' height='115' width='80'>layers.c15.png</image> + </td><td/></tr></table></p> +  + <p><table><tr><td align='left' valign='top'> + <b><tt>subtract</tt></b> + ? + </td><td align='left' valign='top'> + <image file='predef.Image.Layer.set_mode.17.png' height='115' width='80'>layers.c16.png</image> + </td><td/></tr></table></p> +  + <p><table><tr><td align='left' valign='top'> + <b><tt>value</tt></b> + ? + </td><td align='left' valign='top'> + <image file='predef.Image.Layer.set_mode.18.png' height='115' width='80'>layers.c17.png</image> + </td><td/></tr> + </table></p> + </text> + <group><note/><text> + <p>image and alpha channel must be of the same size, + or canceled.</p> + </text></group> +  + </doc> + </docgroup> + <docgroup homogen-type='method'> + <method name='set_offset'> +  <returntype> +  <object>object </object></returntype> +  <arguments><argument name='x'><type><int/></type></argument> + <argument name='y'><type><int/></type></argument> +  +  </arguments> + </method><method name='xoffset'> +  <returntype> +  <object>int </object></returntype> +  <arguments> +  </arguments> + </method><method name='yoffset'> +  <returntype> +  <object>int </object></returntype> +  <arguments> +  </arguments> + </method><doc> + <text> + <p>Set/query layer offset.</p> + </text> +  + </doc> + </docgroup> + <docgroup homogen-type='method'> + <method name='set_tiled'> +  <returntype> +  <object>object </object></returntype> +  <arguments><argument name='yes'><type><int/></type></argument> +  +  </arguments> + </method><method name='tiled'> +  <returntype> +  <object>int </object></returntype> +  <arguments> +  </arguments> + </method><doc> + <text> + <p>Set/query <i>tiled</i> flag. If set, the + image and alpha channel will be tiled rather + then framed by the <ref resolved='predef::Image.Layer.fill'>fill</ref> values.</p> + </text> +  + </doc> + </docgroup> + </class>   <module name='PCX'>   <docgroup homogen-name='_decode' homogen-type='method'>   <method name='_decode'>