Project

General

Profile

Pix » History » Version 5

iri, 03/25/2011 10:29 PM

1 1 iri
h1. Pix
2
3
Images resources.
4
5
{{toc}}
6
7
h2. _gtkPixNew
8
9
create a new pix object
10
11
Prototype : *fun [Chn P I [I I I]] ObjGtkPix*
12
13
table.
14
|*channel*|Chn|a channel|
15
|*filename*|P|an image filename|
16
|*mode*|I|Mode. Should be at 0.|
17
|*tuple*|[I I I]|the width (or nil to not constraint it),|
18
| | |the height (or nil to not constraint it),|
19
| | |the ratio (1 to keep it)|
20
21
+Return+ : ObjGtkPix : a new pix object or nil if an error occurs
22
23
h2. _gtkPixFree
24
25
Destroys a pix object
26
27
Prototype : *fun [ObjGtkPix] I*
28
29
+Return+ : I : always 0 except if error, it returns nil
30
31
h2. _gtkPixScale
32
33
Scale
34
35
Prototype : *fun [ObjGtkPix I I I I] ObjGtkPix*
36
37
table.
38
|*pix*|ObjGtkPix|a valid pix object| |
39
|*width*|I|the new width| |
40
|*height*|I|the new height| |
41 2 iri
|*mode*|I|an algorithm at your choice :|SCOL_GTK_PIX_INTERP_BILINEAR (default) : |
42 1 iri
| | | |SCOL_GTK_PIX_INTERP_NEAREST : |
43
| | | |SCOL_GTK_PIX_INTERP_TILES : |
44
| | | |SCOL_GTK_PIX_INTERP_HYPER : |
45 3 iri
|*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.|
46 1 iri
47
+Return+ : ObjGtkPix : a *new* pix object or nil if an error occurs.
48
49
h2. _gtkPixScaleEx
50
51
Not implemented yet.
52
53
+Return+ : always nil.
54 3 iri
55
h2. _gtkPixRotate
56
57
Performs a rotation
58
59
Prototype : *fun [ObjGtkPix I I] ObjGtkPix*
60
61
table.
62 4 iri
|*pix*|ObjGtkPix|a pix object|
63 3 iri
|*angle*|I|0, 90, 180 or 270 degrees. Others values are ignored|
64
|*flag*|I|0 if the new pix Scol object is created with the rotated pix|
65
| | |1 if the new pix replaces the pix in the curent pix object _pix_|
66
67
+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
68 1 iri
69 5 iri
h2. _gtkPixFlip
70
71
Performs a flip to a pix object
72
73
Prototype : *fun [ObjGtkPix I I] ObjGtkPix*
74
75
table.
76
|*pix*|ObjGtkPix|a pix object|
77
|*flip*|I|SCOL_GTK_PIX_FLIP_HORIZONTAL or SCOL_GTK_PIX_FLIP_VERTICAL. Other value are ignored.|
78
|*flag*|I|0 if the new pix Scol object is created with the flipped pix|
79
| | |1 if the new pix replaces the pix in the curent pix object _pix_|
80
81
+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
82
83
84 1 iri
85
Return [[Api]]