Project

General

Profile

Pix » History » Version 13

iri, 03/26/2011 08:47 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 6 iri
h2. _gtkPixAddAlpha
84
85
Adds an alpha channel to an existing pix object.
86
If the tuple is not nil, then the color specified by it will be assigned zero opacity.
87
For example, if the tuple is equals at [255, 255, 255], all white pixels will become fully transparent.
88
89
Prototype : *fun [ObjGtkPix [I I I] I] ObjGtkPix*
90
91
table.
92
|*pix*|ObjGtkPix|a pix object|
93
|*rgb*|[I I I]|red, green and blue value (0->255). or nil (see above)|
94
|*flag*|I|0 if the new pix Scol object is created with the new pix|
95
| | |1 if the new pix replaces the pix in the curent pix object _pix_|
96
97
+Return+ : ObjGtkPix : a new pix in the (new or same) pix object or the same pix object if the value is bad or nil if an error occurs
98
99 7 iri
h2. _gtkPixCopyArea
100
101
Copies a rectangular area from _srcpix_ to _destpix_.
102
103
Prototype : *fun [ObjGtkPix I I I I ObjGtkPix I I] ObjGtkPix*
104
105
table.
106
|*srcpix*|ObjGtkPix|a source pix object|
107
|*srcx*|I|x coordinate in _srcpix_|
108
|*srcy*|I|y coordinate in _srcpix_|
109
|*srcwidth*|I|width to copy from _srcpix_|
110
|*srcheight*|I|height to copy from _srcpix_|
111 8 iri
|*destpix*|ObjGtkPix|a destination pix object. If nil, a new pix object will be created in the current channel|
112 7 iri
|*destx*|I|x coordinate in _destpix_|
113
|*desty*|I|y coordinate in _destpix_|
114
115
+Return+ : ObjGtkPix : the destination pix object or nil if error
116
117 9 iri
h2. _gtkPixSaturation
118
119
Modifies the saturation to a pix object
120
121
Prototype : *fun [ObjPixGtk I] ObjGtkPix*
122
123 11 iri
Value (I) : Between - 100 and 0, saturation is reduced (-> greyscale), between 0 and 100, the saturation is increased (vivid colors). With 0, the saturation is unchanged.
124 9 iri
125
+Return+ : ObjGtkPix : the same pix object or nil if an error is occured.
126
127 13 iri
h2. _gtkPixPixelate
128
129
Pixelates a pix object.
130
131
TODO.
132
133 12 iri
h2. _gtkPixFill
134
135
Fill a pix object with a given color.
136
137
Prototype : *fun [ObjGtkPix I] ObjGtkPix*
138
139
Value : I : Format is : RRGGBBAA. If pix hasn't an alpha channel, AA is ignored
140
141
+Return+ : ObjGtkPix : the same pix object or nil if an error is occured.
142
143 6 iri
144 5 iri
145 1 iri
146
Return [[Api]]