Pix » History » Revision 5
Revision 4 (iri, 03/25/2011 10:10 PM) → Revision 5/38 (iri, 03/25/2011 10:29 PM)
h1. Pix Images resources. {{toc}} h2. _gtkPixNew create a new pix object Prototype : *fun [Chn P I [I I I]] ObjGtkPix* table. |*channel*|Chn|a channel| |*filename*|P|an image filename| |*mode*|I|Mode. Should be at 0.| |*tuple*|[I I I]|the width (or nil to not constraint it),| | | |the height (or nil to not constraint it),| | | |the ratio (1 to keep it)| +Return+ : ObjGtkPix : a new pix object or nil if an error occurs h2. _gtkPixFree Destroys a pix object Prototype : *fun [ObjGtkPix] I* +Return+ : I : always 0 except if error, it returns nil h2. _gtkPixScale Scale Prototype : *fun [ObjGtkPix I I I I] ObjGtkPix* table. |*pix*|ObjGtkPix|a valid pix object| | |*width*|I|the new width| | |*height*|I|the new height| | |*mode*|I|an algorithm at your choice :|SCOL_GTK_PIX_INTERP_BILINEAR (default) : | | | | |SCOL_GTK_PIX_INTERP_NEAREST : | | | | |SCOL_GTK_PIX_INTERP_TILES : | | | | |SCOL_GTK_PIX_INTERP_HYPER : | |*flag*|I|if 1, the pix in the pix object _pix_ will be destroyed.|If 0, the pix object _pix_ will be kept and a new pix object will be created.| +Return+ : ObjGtkPix : a *new* pix object or nil if an error occurs. h2. _gtkPixScaleEx Not implemented yet. +Return+ : always nil. h2. _gtkPixRotate Performs a rotation Prototype : *fun [ObjGtkPix I I] ObjGtkPix* table. |*pix*|ObjGtkPix|a pix object| |*angle*|I|0, 90, 180 or 270 degrees. Others values are ignored| |*flag*|I|0 if the new pix Scol object is created with the rotated pix| | | |1 if the new pix replaces the pix in the curent pix object _pix_| +Return+ : ObjGtkPix : a rotated pix in the (new or same) pix object or the same pix object if the value is bad or nil if an error occurs h2. _gtkPixFlip Performs a flip to a pix object Prototype : *fun [ObjGtkPix I I] ObjGtkPix* table. |*pix*|ObjGtkPix|a pix object| |*flip*|I|SCOL_GTK_PIX_FLIP_HORIZONTAL or SCOL_GTK_PIX_FLIP_VERTICAL. Other value are ignored.| |*flag*|I|0 if the new pix Scol object is created with the flipped pix| | | |1 if the new pix replaces the pix in the curent pix object _pix_| +Return+ : ObjGtkPix : a flipped pix in the (new or same) pix object or the same pix object if the value is bad or nil if an error occurs Return [[Api]]