1%%
2%% %CopyrightBegin%
3%%
4%% Copyright Ericsson AB 2008-2020. All Rights Reserved.
5%%
6%% Licensed under the Apache License, Version 2.0 (the "License");
7%% you may not use this file except in compliance with the License.
8%% You may obtain a copy of the License at
9%%
10%%     http://www.apache.org/licenses/LICENSE-2.0
11%%
12%% Unless required by applicable law or agreed to in writing, software
13%% distributed under the License is distributed on an "AS IS" BASIS,
14%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15%% See the License for the specific language governing permissions and
16%% limitations under the License.
17%%
18%% %CopyrightEnd%
19%% This file is generated DO NOT EDIT
20
21%%
22%% All (default) image handlers are initialized.
23
24%%
25-module(wxImage).
26-include("wxe.hrl").
27-export(['Destroy'/1,blur/2,blurHorizontal/2,blurVertical/2,convertAlphaToMask/1,
28  convertAlphaToMask/2,convertAlphaToMask/4,convertAlphaToMask/5,convertToGreyscale/1,
29  convertToGreyscale/4,convertToMono/4,copy/1,create/2,create/3,create/4,
30  create/5,create/6,destroy/1,findFirstUnusedColour/1,findFirstUnusedColour/2,
31  getAlpha/1,getAlpha/3,getBlue/3,getData/1,getGreen/3,getHeight/1,getImageCount/1,
32  getImageCount/2,getImageExtWildcard/0,getMaskBlue/1,getMaskGreen/1,
33  getMaskRed/1,getOption/2,getOptionInt/2,getOrFindMaskColour/1,getPalette/1,
34  getRed/3,getSubImage/2,getWidth/1,hasAlpha/1,hasMask/1,hasOption/2,
35  initAlpha/1,initStandardHandlers/0,isOk/1,isTransparent/3,isTransparent/4,
36  loadFile/2,loadFile/3,loadFile/4,mirror/1,mirror/2,new/0,new/1,new/2,
37  new/3,new/4,new/5,ok/1,removeHandler/1,replace/7,rescale/3,rescale/4,
38  resize/3,resize/4,rotate/3,rotate/4,rotate90/1,rotate90/2,rotateHue/2,
39  saveFile/2,saveFile/3,scale/3,scale/4,setAlpha/2,setAlpha/3,setAlpha/4,
40  setData/2,setData/3,setData/4,setData/5,setMask/1,setMask/2,setMaskColour/4,
41  setMaskFromImage/5,setOption/3,setPalette/2,setRGB/5,setRGB/6,size/3,
42  size/4]).
43
44%% inherited exports
45-export([parent_class/1]).
46
47-type wxImage() :: wx:wx_object().
48-export_type([wxImage/0]).
49%% @hidden
50parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
51
52%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagewximage">external documentation</a>.
53-spec new() -> wxImage().
54new() ->
55  wxe_util:queue_cmd(?get_env(), ?wxImage_new_0),
56  wxe_util:rec(?wxImage_new_0).
57
58%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagewximage">external documentation</a>.
59%% <br /> Also:<br />
60%% new(Sz) -> wxImage() when<br />
61%% 	Sz::{W::integer(), H::integer()}.<br />
62%%
63%%<br /> Type = ?wxBITMAP_TYPE_INVALID | ?wxBITMAP_TYPE_BMP | ?wxBITMAP_TYPE_BMP_RESOURCE | ?wxBITMAP_TYPE_RESOURCE | ?wxBITMAP_TYPE_ICO | ?wxBITMAP_TYPE_ICO_RESOURCE | ?wxBITMAP_TYPE_CUR | ?wxBITMAP_TYPE_CUR_RESOURCE | ?wxBITMAP_TYPE_XBM | ?wxBITMAP_TYPE_XBM_DATA | ?wxBITMAP_TYPE_XPM | ?wxBITMAP_TYPE_XPM_DATA | ?wxBITMAP_TYPE_TIFF | ?wxBITMAP_TYPE_TIF | ?wxBITMAP_TYPE_TIFF_RESOURCE | ?wxBITMAP_TYPE_TIF_RESOURCE | ?wxBITMAP_TYPE_GIF | ?wxBITMAP_TYPE_GIF_RESOURCE | ?wxBITMAP_TYPE_PNG | ?wxBITMAP_TYPE_PNG_RESOURCE | ?wxBITMAP_TYPE_JPEG | ?wxBITMAP_TYPE_JPEG_RESOURCE | ?wxBITMAP_TYPE_PNM | ?wxBITMAP_TYPE_PNM_RESOURCE | ?wxBITMAP_TYPE_PCX | ?wxBITMAP_TYPE_PCX_RESOURCE | ?wxBITMAP_TYPE_PICT | ?wxBITMAP_TYPE_PICT_RESOURCE | ?wxBITMAP_TYPE_ICON | ?wxBITMAP_TYPE_ICON_RESOURCE | ?wxBITMAP_TYPE_ANI | ?wxBITMAP_TYPE_IFF | ?wxBITMAP_TYPE_TGA | ?wxBITMAP_TYPE_MACCURSOR | ?wxBITMAP_TYPE_MACCURSOR_RESOURCE | ?wxBITMAP_TYPE_ANY
64-spec new(Name) -> wxImage() when
65	Name::unicode:chardata();
66      (Sz) -> wxImage() when
67	Sz::{W::integer(), H::integer()}.
68
69new(Name)
70 when ?is_chardata(Name) ->
71  new(Name, []);
72
73new({SzW,SzH} = Sz)
74 when is_integer(SzW),is_integer(SzH) ->
75  new(Sz, []).
76
77%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagewximage">external documentation</a>.
78%% <br /> Also:<br />
79%% new(Sz, Data) -> wxImage() when<br />
80%% 	Sz::{W::integer(), H::integer()}, Data::binary();<br />
81%%       (Name, [Option]) -> wxImage() when<br />
82%% 	Name::unicode:chardata(),<br />
83%% 	Option :: {'type', wx:wx_enum()}<br />
84%% 		 | {'index', integer()};<br />
85%%       (Sz, [Option]) -> wxImage() when<br />
86%% 	Sz::{W::integer(), H::integer()},<br />
87%% 	Option :: {'clear', boolean()}.<br />
88%%
89%%<br /> Type = ?wxBITMAP_TYPE_INVALID | ?wxBITMAP_TYPE_BMP | ?wxBITMAP_TYPE_BMP_RESOURCE | ?wxBITMAP_TYPE_RESOURCE | ?wxBITMAP_TYPE_ICO | ?wxBITMAP_TYPE_ICO_RESOURCE | ?wxBITMAP_TYPE_CUR | ?wxBITMAP_TYPE_CUR_RESOURCE | ?wxBITMAP_TYPE_XBM | ?wxBITMAP_TYPE_XBM_DATA | ?wxBITMAP_TYPE_XPM | ?wxBITMAP_TYPE_XPM_DATA | ?wxBITMAP_TYPE_TIFF | ?wxBITMAP_TYPE_TIF | ?wxBITMAP_TYPE_TIFF_RESOURCE | ?wxBITMAP_TYPE_TIF_RESOURCE | ?wxBITMAP_TYPE_GIF | ?wxBITMAP_TYPE_GIF_RESOURCE | ?wxBITMAP_TYPE_PNG | ?wxBITMAP_TYPE_PNG_RESOURCE | ?wxBITMAP_TYPE_JPEG | ?wxBITMAP_TYPE_JPEG_RESOURCE | ?wxBITMAP_TYPE_PNM | ?wxBITMAP_TYPE_PNM_RESOURCE | ?wxBITMAP_TYPE_PCX | ?wxBITMAP_TYPE_PCX_RESOURCE | ?wxBITMAP_TYPE_PICT | ?wxBITMAP_TYPE_PICT_RESOURCE | ?wxBITMAP_TYPE_ICON | ?wxBITMAP_TYPE_ICON_RESOURCE | ?wxBITMAP_TYPE_ANI | ?wxBITMAP_TYPE_IFF | ?wxBITMAP_TYPE_TGA | ?wxBITMAP_TYPE_MACCURSOR | ?wxBITMAP_TYPE_MACCURSOR_RESOURCE | ?wxBITMAP_TYPE_ANY
90-spec new(Width, Height) -> wxImage() when
91	Width::integer(), Height::integer();
92      (Sz, Data) -> wxImage() when
93	Sz::{W::integer(), H::integer()}, Data::binary();
94      (Name, [Option]) -> wxImage() when
95	Name::unicode:chardata(),
96	Option :: {'type', wx:wx_enum()}
97		 | {'index', integer()};
98      (Sz, [Option]) -> wxImage() when
99	Sz::{W::integer(), H::integer()},
100	Option :: {'clear', boolean()}.
101
102new(Width,Height)
103 when is_integer(Width),is_integer(Height) ->
104  new(Width,Height, []);
105
106new({SzW,SzH} = Sz,Data)
107 when is_integer(SzW),is_integer(SzH),is_binary(Data) ->
108  new(Sz,Data, []);
109new(Name, Options)
110 when ?is_chardata(Name),is_list(Options) ->
111  Name_UC = unicode:characters_to_binary(Name),
112  MOpts = fun({type, _type} = Arg) -> Arg;
113          ({index, _index} = Arg) -> Arg;
114          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
115  Opts = lists:map(MOpts, Options),
116  wxe_util:queue_cmd(Name_UC, Opts,?get_env(),?wxImage_new_2_0),
117  wxe_util:rec(?wxImage_new_2_0);
118new({SzW,SzH} = Sz, Options)
119 when is_integer(SzW),is_integer(SzH),is_list(Options) ->
120  MOpts = fun({clear, _clear} = Arg) -> Arg;
121          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
122  Opts = lists:map(MOpts, Options),
123  wxe_util:queue_cmd(Sz, Opts,?get_env(),?wxImage_new_2_1),
124  wxe_util:rec(?wxImage_new_2_1).
125
126%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagewximage">external documentation</a>.
127%% <br /> Also:<br />
128%% new(Sz, Data, Alpha) -> wxImage() when<br />
129%% 	Sz::{W::integer(), H::integer()}, Data::binary(), Alpha::binary();<br />
130%%       (Width, Height, [Option]) -> wxImage() when<br />
131%% 	Width::integer(), Height::integer(),<br />
132%% 	Option :: {'clear', boolean()};<br />
133%%       (Name, Mimetype, [Option]) -> wxImage() when<br />
134%% 	Name::unicode:chardata(), Mimetype::unicode:chardata(),<br />
135%% 	Option :: {'index', integer()};<br />
136%%       (Sz, Data, [Option]) -> wxImage() when<br />
137%% 	Sz::{W::integer(), H::integer()}, Data::binary(),<br />
138%% 	Option :: {'static_data', boolean()}.<br />
139%%
140-spec new(Width, Height, Data) -> wxImage() when
141	Width::integer(), Height::integer(), Data::binary();
142      (Sz, Data, Alpha) -> wxImage() when
143	Sz::{W::integer(), H::integer()}, Data::binary(), Alpha::binary();
144      (Width, Height, [Option]) -> wxImage() when
145	Width::integer(), Height::integer(),
146	Option :: {'clear', boolean()};
147      (Name, Mimetype, [Option]) -> wxImage() when
148	Name::unicode:chardata(), Mimetype::unicode:chardata(),
149	Option :: {'index', integer()};
150      (Sz, Data, [Option]) -> wxImage() when
151	Sz::{W::integer(), H::integer()}, Data::binary(),
152	Option :: {'static_data', boolean()}.
153
154new(Width,Height,Data)
155 when is_integer(Width),is_integer(Height),is_binary(Data) ->
156  new(Width,Height,Data, []);
157
158new({SzW,SzH} = Sz,Data,Alpha)
159 when is_integer(SzW),is_integer(SzH),is_binary(Data),is_binary(Alpha) ->
160  new(Sz,Data,Alpha, []);
161new(Width,Height, Options)
162 when is_integer(Width),is_integer(Height),is_list(Options) ->
163  MOpts = fun({clear, _clear} = Arg) -> Arg;
164          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
165  Opts = lists:map(MOpts, Options),
166  wxe_util:queue_cmd(Width,Height, Opts,?get_env(),?wxImage_new_3_0),
167  wxe_util:rec(?wxImage_new_3_0);
168new(Name,Mimetype, Options)
169 when ?is_chardata(Name),?is_chardata(Mimetype),is_list(Options) ->
170  Name_UC = unicode:characters_to_binary(Name),
171  Mimetype_UC = unicode:characters_to_binary(Mimetype),
172  MOpts = fun({index, _index} = Arg) -> Arg;
173          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
174  Opts = lists:map(MOpts, Options),
175  wxe_util:queue_cmd(Name_UC,Mimetype_UC, Opts,?get_env(),?wxImage_new_3_1),
176  wxe_util:rec(?wxImage_new_3_1);
177new({SzW,SzH} = Sz,Data, Options)
178 when is_integer(SzW),is_integer(SzH),is_binary(Data),is_list(Options) ->
179  MOpts = fun({static_data, _static_data} = Arg) -> Arg;
180          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
181  Opts = lists:map(MOpts, Options),
182  wxe_util:queue_cmd(Sz,Data, Opts,?get_env(),?wxImage_new_3_2),
183  wxe_util:rec(?wxImage_new_3_2).
184
185%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagewximage">external documentation</a>.
186%% <br /> Also:<br />
187%% new(Width, Height, Data, [Option]) -> wxImage() when<br />
188%% 	Width::integer(), Height::integer(), Data::binary(),<br />
189%% 	Option :: {'static_data', boolean()};<br />
190%%       (Sz, Data, Alpha, [Option]) -> wxImage() when<br />
191%% 	Sz::{W::integer(), H::integer()}, Data::binary(), Alpha::binary(),<br />
192%% 	Option :: {'static_data', boolean()}.<br />
193%%
194-spec new(Width, Height, Data, Alpha) -> wxImage() when
195	Width::integer(), Height::integer(), Data::binary(), Alpha::binary();
196      (Width, Height, Data, [Option]) -> wxImage() when
197	Width::integer(), Height::integer(), Data::binary(),
198	Option :: {'static_data', boolean()};
199      (Sz, Data, Alpha, [Option]) -> wxImage() when
200	Sz::{W::integer(), H::integer()}, Data::binary(), Alpha::binary(),
201	Option :: {'static_data', boolean()}.
202
203new(Width,Height,Data,Alpha)
204 when is_integer(Width),is_integer(Height),is_binary(Data),is_binary(Alpha) ->
205  new(Width,Height,Data,Alpha, []);
206new(Width,Height,Data, Options)
207 when is_integer(Width),is_integer(Height),is_binary(Data),is_list(Options) ->
208  MOpts = fun({static_data, _static_data} = Arg) -> Arg;
209          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
210  Opts = lists:map(MOpts, Options),
211  wxe_util:queue_cmd(Width,Height,Data, Opts,?get_env(),?wxImage_new_4_0),
212  wxe_util:rec(?wxImage_new_4_0);
213new({SzW,SzH} = Sz,Data,Alpha, Options)
214 when is_integer(SzW),is_integer(SzH),is_binary(Data),is_binary(Alpha),is_list(Options) ->
215  MOpts = fun({static_data, _static_data} = Arg) -> Arg;
216          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
217  Opts = lists:map(MOpts, Options),
218  wxe_util:queue_cmd(Sz,Data,Alpha, Opts,?get_env(),?wxImage_new_4_1),
219  wxe_util:rec(?wxImage_new_4_1).
220
221%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagewximage">external documentation</a>.
222-spec new(Width, Height, Data, Alpha, [Option]) -> wxImage() when
223	Width::integer(), Height::integer(), Data::binary(), Alpha::binary(),
224	Option :: {'static_data', boolean()}.
225new(Width,Height,Data,Alpha, Options)
226 when is_integer(Width),is_integer(Height),is_binary(Data),is_binary(Alpha),is_list(Options) ->
227  MOpts = fun({static_data, _static_data} = Arg) -> Arg;
228          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
229  Opts = lists:map(MOpts, Options),
230  wxe_util:queue_cmd(Width,Height,Data,Alpha, Opts,?get_env(),?wxImage_new_5),
231  wxe_util:rec(?wxImage_new_5).
232
233%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageblur">external documentation</a>.
234-spec blur(This, BlurRadius) -> wxImage() when
235	This::wxImage(), BlurRadius::integer().
236blur(#wx_ref{type=ThisT}=This,BlurRadius)
237 when is_integer(BlurRadius) ->
238  ?CLASS(ThisT,wxImage),
239  wxe_util:queue_cmd(This,BlurRadius,?get_env(),?wxImage_Blur),
240  wxe_util:rec(?wxImage_Blur).
241
242%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageblurhorizontal">external documentation</a>.
243-spec blurHorizontal(This, BlurRadius) -> wxImage() when
244	This::wxImage(), BlurRadius::integer().
245blurHorizontal(#wx_ref{type=ThisT}=This,BlurRadius)
246 when is_integer(BlurRadius) ->
247  ?CLASS(ThisT,wxImage),
248  wxe_util:queue_cmd(This,BlurRadius,?get_env(),?wxImage_BlurHorizontal),
249  wxe_util:rec(?wxImage_BlurHorizontal).
250
251%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageblurvertical">external documentation</a>.
252-spec blurVertical(This, BlurRadius) -> wxImage() when
253	This::wxImage(), BlurRadius::integer().
254blurVertical(#wx_ref{type=ThisT}=This,BlurRadius)
255 when is_integer(BlurRadius) ->
256  ?CLASS(ThisT,wxImage),
257  wxe_util:queue_cmd(This,BlurRadius,?get_env(),?wxImage_BlurVertical),
258  wxe_util:rec(?wxImage_BlurVertical).
259
260%% @equiv convertAlphaToMask(This, [])
261-spec convertAlphaToMask(This) -> boolean() when
262	This::wxImage().
263
264convertAlphaToMask(This)
265 when is_record(This, wx_ref) ->
266  convertAlphaToMask(This, []).
267
268%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageconvertalphatomask">external documentation</a>.
269-spec convertAlphaToMask(This, [Option]) -> boolean() when
270	This::wxImage(),
271	Option :: {'threshold', integer()}.
272convertAlphaToMask(#wx_ref{type=ThisT}=This, Options)
273 when is_list(Options) ->
274  ?CLASS(ThisT,wxImage),
275  MOpts = fun({threshold, _threshold} = Arg) -> Arg;
276          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
277  Opts = lists:map(MOpts, Options),
278  wxe_util:queue_cmd(This, Opts,?get_env(),?wxImage_ConvertAlphaToMask_1),
279  wxe_util:rec(?wxImage_ConvertAlphaToMask_1).
280
281%% @equiv convertAlphaToMask(This,Mr,Mg,Mb, [])
282-spec convertAlphaToMask(This, Mr, Mg, Mb) -> boolean() when
283	This::wxImage(), Mr::integer(), Mg::integer(), Mb::integer().
284
285convertAlphaToMask(This,Mr,Mg,Mb)
286 when is_record(This, wx_ref),is_integer(Mr),is_integer(Mg),is_integer(Mb) ->
287  convertAlphaToMask(This,Mr,Mg,Mb, []).
288
289%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageconvertalphatomask">external documentation</a>.
290-spec convertAlphaToMask(This, Mr, Mg, Mb, [Option]) -> boolean() when
291	This::wxImage(), Mr::integer(), Mg::integer(), Mb::integer(),
292	Option :: {'threshold', integer()}.
293convertAlphaToMask(#wx_ref{type=ThisT}=This,Mr,Mg,Mb, Options)
294 when is_integer(Mr),is_integer(Mg),is_integer(Mb),is_list(Options) ->
295  ?CLASS(ThisT,wxImage),
296  MOpts = fun({threshold, _threshold} = Arg) -> Arg;
297          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
298  Opts = lists:map(MOpts, Options),
299  wxe_util:queue_cmd(This,Mr,Mg,Mb, Opts,?get_env(),?wxImage_ConvertAlphaToMask_4),
300  wxe_util:rec(?wxImage_ConvertAlphaToMask_4).
301
302%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageconverttogreyscale">external documentation</a>.
303-spec convertToGreyscale(This) -> wxImage() when
304	This::wxImage().
305convertToGreyscale(#wx_ref{type=ThisT}=This) ->
306  ?CLASS(ThisT,wxImage),
307  wxe_util:queue_cmd(This,?get_env(),?wxImage_ConvertToGreyscale_0),
308  wxe_util:rec(?wxImage_ConvertToGreyscale_0).
309
310%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageconverttogreyscale">external documentation</a>.
311-spec convertToGreyscale(This, Weight_r, Weight_g, Weight_b) -> wxImage() when
312	This::wxImage(), Weight_r::number(), Weight_g::number(), Weight_b::number().
313convertToGreyscale(#wx_ref{type=ThisT}=This,Weight_r,Weight_g,Weight_b)
314 when is_number(Weight_r),is_number(Weight_g),is_number(Weight_b) ->
315  ?CLASS(ThisT,wxImage),
316  wxe_util:queue_cmd(This,Weight_r,Weight_g,Weight_b,?get_env(),?wxImage_ConvertToGreyscale_3),
317  wxe_util:rec(?wxImage_ConvertToGreyscale_3).
318
319%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageconverttomono">external documentation</a>.
320-spec convertToMono(This, R, G, B) -> wxImage() when
321	This::wxImage(), R::integer(), G::integer(), B::integer().
322convertToMono(#wx_ref{type=ThisT}=This,R,G,B)
323 when is_integer(R),is_integer(G),is_integer(B) ->
324  ?CLASS(ThisT,wxImage),
325  wxe_util:queue_cmd(This,R,G,B,?get_env(),?wxImage_ConvertToMono),
326  wxe_util:rec(?wxImage_ConvertToMono).
327
328%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagecopy">external documentation</a>.
329-spec copy(This) -> wxImage() when
330	This::wxImage().
331copy(#wx_ref{type=ThisT}=This) ->
332  ?CLASS(ThisT,wxImage),
333  wxe_util:queue_cmd(This,?get_env(),?wxImage_Copy),
334  wxe_util:rec(?wxImage_Copy).
335
336%% @equiv create(This,Sz, [])
337-spec create(This, Sz) -> boolean() when
338	This::wxImage(), Sz::{W::integer(), H::integer()}.
339
340create(This,{SzW,SzH} = Sz)
341 when is_record(This, wx_ref),is_integer(SzW),is_integer(SzH) ->
342  create(This,Sz, []).
343
344%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagecreate">external documentation</a>.
345%% <br /> Also:<br />
346%% create(This, Sz, Data) -> boolean() when<br />
347%% 	This::wxImage(), Sz::{W::integer(), H::integer()}, Data::binary();<br />
348%%       (This, Sz, [Option]) -> boolean() when<br />
349%% 	This::wxImage(), Sz::{W::integer(), H::integer()},<br />
350%% 	Option :: {'clear', boolean()}.<br />
351%%
352-spec create(This, Width, Height) -> boolean() when
353	This::wxImage(), Width::integer(), Height::integer();
354      (This, Sz, Data) -> boolean() when
355	This::wxImage(), Sz::{W::integer(), H::integer()}, Data::binary();
356      (This, Sz, [Option]) -> boolean() when
357	This::wxImage(), Sz::{W::integer(), H::integer()},
358	Option :: {'clear', boolean()}.
359
360create(This,Width,Height)
361 when is_record(This, wx_ref),is_integer(Width),is_integer(Height) ->
362  create(This,Width,Height, []);
363
364create(This,{SzW,SzH} = Sz,Data)
365 when is_record(This, wx_ref),is_integer(SzW),is_integer(SzH),is_binary(Data) ->
366  create(This,Sz,Data, []);
367create(#wx_ref{type=ThisT}=This,{SzW,SzH} = Sz, Options)
368 when is_integer(SzW),is_integer(SzH),is_list(Options) ->
369  ?CLASS(ThisT,wxImage),
370  MOpts = fun({clear, _clear} = Arg) -> Arg;
371          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
372  Opts = lists:map(MOpts, Options),
373  wxe_util:queue_cmd(This,Sz, Opts,?get_env(),?wxImage_Create_2),
374  wxe_util:rec(?wxImage_Create_2).
375
376%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagecreate">external documentation</a>.
377%% <br /> Also:<br />
378%% create(This, Sz, Data, Alpha) -> boolean() when<br />
379%% 	This::wxImage(), Sz::{W::integer(), H::integer()}, Data::binary(), Alpha::binary();<br />
380%%       (This, Width, Height, [Option]) -> boolean() when<br />
381%% 	This::wxImage(), Width::integer(), Height::integer(),<br />
382%% 	Option :: {'clear', boolean()};<br />
383%%       (This, Sz, Data, [Option]) -> boolean() when<br />
384%% 	This::wxImage(), Sz::{W::integer(), H::integer()}, Data::binary(),<br />
385%% 	Option :: {'static_data', boolean()}.<br />
386%%
387-spec create(This, Width, Height, Data) -> boolean() when
388	This::wxImage(), Width::integer(), Height::integer(), Data::binary();
389      (This, Sz, Data, Alpha) -> boolean() when
390	This::wxImage(), Sz::{W::integer(), H::integer()}, Data::binary(), Alpha::binary();
391      (This, Width, Height, [Option]) -> boolean() when
392	This::wxImage(), Width::integer(), Height::integer(),
393	Option :: {'clear', boolean()};
394      (This, Sz, Data, [Option]) -> boolean() when
395	This::wxImage(), Sz::{W::integer(), H::integer()}, Data::binary(),
396	Option :: {'static_data', boolean()}.
397
398create(This,Width,Height,Data)
399 when is_record(This, wx_ref),is_integer(Width),is_integer(Height),is_binary(Data) ->
400  create(This,Width,Height,Data, []);
401
402create(This,{SzW,SzH} = Sz,Data,Alpha)
403 when is_record(This, wx_ref),is_integer(SzW),is_integer(SzH),is_binary(Data),is_binary(Alpha) ->
404  create(This,Sz,Data,Alpha, []);
405create(#wx_ref{type=ThisT}=This,Width,Height, Options)
406 when is_integer(Width),is_integer(Height),is_list(Options) ->
407  ?CLASS(ThisT,wxImage),
408  MOpts = fun({clear, _clear} = Arg) -> Arg;
409          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
410  Opts = lists:map(MOpts, Options),
411  wxe_util:queue_cmd(This,Width,Height, Opts,?get_env(),?wxImage_Create_3_0),
412  wxe_util:rec(?wxImage_Create_3_0);
413create(#wx_ref{type=ThisT}=This,{SzW,SzH} = Sz,Data, Options)
414 when is_integer(SzW),is_integer(SzH),is_binary(Data),is_list(Options) ->
415  ?CLASS(ThisT,wxImage),
416  MOpts = fun({static_data, _static_data} = Arg) -> Arg;
417          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
418  Opts = lists:map(MOpts, Options),
419  wxe_util:queue_cmd(This,Sz,Data, Opts,?get_env(),?wxImage_Create_3_1),
420  wxe_util:rec(?wxImage_Create_3_1).
421
422%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagecreate">external documentation</a>.
423%% <br /> Also:<br />
424%% create(This, Width, Height, Data, [Option]) -> boolean() when<br />
425%% 	This::wxImage(), Width::integer(), Height::integer(), Data::binary(),<br />
426%% 	Option :: {'static_data', boolean()};<br />
427%%       (This, Sz, Data, Alpha, [Option]) -> boolean() when<br />
428%% 	This::wxImage(), Sz::{W::integer(), H::integer()}, Data::binary(), Alpha::binary(),<br />
429%% 	Option :: {'static_data', boolean()}.<br />
430%%
431-spec create(This, Width, Height, Data, Alpha) -> boolean() when
432	This::wxImage(), Width::integer(), Height::integer(), Data::binary(), Alpha::binary();
433      (This, Width, Height, Data, [Option]) -> boolean() when
434	This::wxImage(), Width::integer(), Height::integer(), Data::binary(),
435	Option :: {'static_data', boolean()};
436      (This, Sz, Data, Alpha, [Option]) -> boolean() when
437	This::wxImage(), Sz::{W::integer(), H::integer()}, Data::binary(), Alpha::binary(),
438	Option :: {'static_data', boolean()}.
439
440create(This,Width,Height,Data,Alpha)
441 when is_record(This, wx_ref),is_integer(Width),is_integer(Height),is_binary(Data),is_binary(Alpha) ->
442  create(This,Width,Height,Data,Alpha, []);
443create(#wx_ref{type=ThisT}=This,Width,Height,Data, Options)
444 when is_integer(Width),is_integer(Height),is_binary(Data),is_list(Options) ->
445  ?CLASS(ThisT,wxImage),
446  MOpts = fun({static_data, _static_data} = Arg) -> Arg;
447          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
448  Opts = lists:map(MOpts, Options),
449  wxe_util:queue_cmd(This,Width,Height,Data, Opts,?get_env(),?wxImage_Create_4_0),
450  wxe_util:rec(?wxImage_Create_4_0);
451create(#wx_ref{type=ThisT}=This,{SzW,SzH} = Sz,Data,Alpha, Options)
452 when is_integer(SzW),is_integer(SzH),is_binary(Data),is_binary(Alpha),is_list(Options) ->
453  ?CLASS(ThisT,wxImage),
454  MOpts = fun({static_data, _static_data} = Arg) -> Arg;
455          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
456  Opts = lists:map(MOpts, Options),
457  wxe_util:queue_cmd(This,Sz,Data,Alpha, Opts,?get_env(),?wxImage_Create_4_1),
458  wxe_util:rec(?wxImage_Create_4_1).
459
460%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagecreate">external documentation</a>.
461-spec create(This, Width, Height, Data, Alpha, [Option]) -> boolean() when
462	This::wxImage(), Width::integer(), Height::integer(), Data::binary(), Alpha::binary(),
463	Option :: {'static_data', boolean()}.
464create(#wx_ref{type=ThisT}=This,Width,Height,Data,Alpha, Options)
465 when is_integer(Width),is_integer(Height),is_binary(Data),is_binary(Alpha),is_list(Options) ->
466  ?CLASS(ThisT,wxImage),
467  MOpts = fun({static_data, _static_data} = Arg) -> Arg;
468          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
469  Opts = lists:map(MOpts, Options),
470  wxe_util:queue_cmd(This,Width,Height,Data,Alpha, Opts,?get_env(),?wxImage_Create_5),
471  wxe_util:rec(?wxImage_Create_5).
472
473%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagedestroy">external documentation</a>.
474-spec 'Destroy'(This) -> 'ok' when
475	This::wxImage().
476'Destroy'(#wx_ref{type=ThisT}=This) ->
477  ?CLASS(ThisT,wxImage),
478  wxe_util:queue_cmd(This,?get_env(),?wxImage_Destroy).
479
480%% @equiv findFirstUnusedColour(This, [])
481-spec findFirstUnusedColour(This) -> Result when
482	Result ::{Res ::boolean(), R::integer(), G::integer(), B::integer()},
483	This::wxImage().
484
485findFirstUnusedColour(This)
486 when is_record(This, wx_ref) ->
487  findFirstUnusedColour(This, []).
488
489%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagefindfirstunusedcolour">external documentation</a>.
490-spec findFirstUnusedColour(This, [Option]) -> Result when
491	Result :: {Res ::boolean(), R::integer(), G::integer(), B::integer()},
492	This::wxImage(),
493	Option :: {'startR', integer()}
494		 | {'startG', integer()}
495		 | {'startB', integer()}.
496findFirstUnusedColour(#wx_ref{type=ThisT}=This, Options)
497 when is_list(Options) ->
498  ?CLASS(ThisT,wxImage),
499  MOpts = fun({startR, _startR} = Arg) -> Arg;
500          ({startG, _startG} = Arg) -> Arg;
501          ({startB, _startB} = Arg) -> Arg;
502          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
503  Opts = lists:map(MOpts, Options),
504  wxe_util:queue_cmd(This, Opts,?get_env(),?wxImage_FindFirstUnusedColour),
505  wxe_util:rec(?wxImage_FindFirstUnusedColour).
506
507%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagegetimageextwildcard">external documentation</a>.
508-spec getImageExtWildcard() -> unicode:charlist().
509getImageExtWildcard() ->
510  wxe_util:queue_cmd(?get_env(), ?wxImage_GetImageExtWildcard),
511  wxe_util:rec(?wxImage_GetImageExtWildcard).
512
513%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagegetalpha">external documentation</a>.
514-spec getAlpha(This) -> binary() when
515	This::wxImage().
516getAlpha(#wx_ref{type=ThisT}=This) ->
517  ?CLASS(ThisT,wxImage),
518  wxe_util:queue_cmd(This,?get_env(),?wxImage_GetAlpha_0),
519  wxe_util:rec(?wxImage_GetAlpha_0).
520
521%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagegetalpha">external documentation</a>.
522-spec getAlpha(This, X, Y) -> integer() when
523	This::wxImage(), X::integer(), Y::integer().
524getAlpha(#wx_ref{type=ThisT}=This,X,Y)
525 when is_integer(X),is_integer(Y) ->
526  ?CLASS(ThisT,wxImage),
527  wxe_util:queue_cmd(This,X,Y,?get_env(),?wxImage_GetAlpha_2),
528  wxe_util:rec(?wxImage_GetAlpha_2).
529
530%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagegetblue">external documentation</a>.
531-spec getBlue(This, X, Y) -> integer() when
532	This::wxImage(), X::integer(), Y::integer().
533getBlue(#wx_ref{type=ThisT}=This,X,Y)
534 when is_integer(X),is_integer(Y) ->
535  ?CLASS(ThisT,wxImage),
536  wxe_util:queue_cmd(This,X,Y,?get_env(),?wxImage_GetBlue),
537  wxe_util:rec(?wxImage_GetBlue).
538
539%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagegetdata">external documentation</a>.
540-spec getData(This) -> binary() when
541	This::wxImage().
542getData(#wx_ref{type=ThisT}=This) ->
543  ?CLASS(ThisT,wxImage),
544  wxe_util:queue_cmd(This,?get_env(),?wxImage_GetData),
545  wxe_util:rec(?wxImage_GetData).
546
547%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagegetgreen">external documentation</a>.
548-spec getGreen(This, X, Y) -> integer() when
549	This::wxImage(), X::integer(), Y::integer().
550getGreen(#wx_ref{type=ThisT}=This,X,Y)
551 when is_integer(X),is_integer(Y) ->
552  ?CLASS(ThisT,wxImage),
553  wxe_util:queue_cmd(This,X,Y,?get_env(),?wxImage_GetGreen),
554  wxe_util:rec(?wxImage_GetGreen).
555
556%% @equiv getImageCount(Filename, [])
557-spec getImageCount(Filename) -> integer() when
558	Filename::unicode:chardata().
559
560getImageCount(Filename)
561 when ?is_chardata(Filename) ->
562  getImageCount(Filename, []).
563
564%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagegetimagecount">external documentation</a>.
565%%<br /> Type = ?wxBITMAP_TYPE_INVALID | ?wxBITMAP_TYPE_BMP | ?wxBITMAP_TYPE_BMP_RESOURCE | ?wxBITMAP_TYPE_RESOURCE | ?wxBITMAP_TYPE_ICO | ?wxBITMAP_TYPE_ICO_RESOURCE | ?wxBITMAP_TYPE_CUR | ?wxBITMAP_TYPE_CUR_RESOURCE | ?wxBITMAP_TYPE_XBM | ?wxBITMAP_TYPE_XBM_DATA | ?wxBITMAP_TYPE_XPM | ?wxBITMAP_TYPE_XPM_DATA | ?wxBITMAP_TYPE_TIFF | ?wxBITMAP_TYPE_TIF | ?wxBITMAP_TYPE_TIFF_RESOURCE | ?wxBITMAP_TYPE_TIF_RESOURCE | ?wxBITMAP_TYPE_GIF | ?wxBITMAP_TYPE_GIF_RESOURCE | ?wxBITMAP_TYPE_PNG | ?wxBITMAP_TYPE_PNG_RESOURCE | ?wxBITMAP_TYPE_JPEG | ?wxBITMAP_TYPE_JPEG_RESOURCE | ?wxBITMAP_TYPE_PNM | ?wxBITMAP_TYPE_PNM_RESOURCE | ?wxBITMAP_TYPE_PCX | ?wxBITMAP_TYPE_PCX_RESOURCE | ?wxBITMAP_TYPE_PICT | ?wxBITMAP_TYPE_PICT_RESOURCE | ?wxBITMAP_TYPE_ICON | ?wxBITMAP_TYPE_ICON_RESOURCE | ?wxBITMAP_TYPE_ANI | ?wxBITMAP_TYPE_IFF | ?wxBITMAP_TYPE_TGA | ?wxBITMAP_TYPE_MACCURSOR | ?wxBITMAP_TYPE_MACCURSOR_RESOURCE | ?wxBITMAP_TYPE_ANY
566-spec getImageCount(Filename, [Option]) -> integer() when
567	Filename::unicode:chardata(),
568	Option :: {'type', wx:wx_enum()}.
569getImageCount(Filename, Options)
570 when ?is_chardata(Filename),is_list(Options) ->
571  Filename_UC = unicode:characters_to_binary(Filename),
572  MOpts = fun({type, _type} = Arg) -> Arg;
573          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
574  Opts = lists:map(MOpts, Options),
575  wxe_util:queue_cmd(Filename_UC, Opts,?get_env(),?wxImage_GetImageCount),
576  wxe_util:rec(?wxImage_GetImageCount).
577
578%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagegetheight">external documentation</a>.
579-spec getHeight(This) -> integer() when
580	This::wxImage().
581getHeight(#wx_ref{type=ThisT}=This) ->
582  ?CLASS(ThisT,wxImage),
583  wxe_util:queue_cmd(This,?get_env(),?wxImage_GetHeight),
584  wxe_util:rec(?wxImage_GetHeight).
585
586%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagegetmaskblue">external documentation</a>.
587-spec getMaskBlue(This) -> integer() when
588	This::wxImage().
589getMaskBlue(#wx_ref{type=ThisT}=This) ->
590  ?CLASS(ThisT,wxImage),
591  wxe_util:queue_cmd(This,?get_env(),?wxImage_GetMaskBlue),
592  wxe_util:rec(?wxImage_GetMaskBlue).
593
594%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagegetmaskgreen">external documentation</a>.
595-spec getMaskGreen(This) -> integer() when
596	This::wxImage().
597getMaskGreen(#wx_ref{type=ThisT}=This) ->
598  ?CLASS(ThisT,wxImage),
599  wxe_util:queue_cmd(This,?get_env(),?wxImage_GetMaskGreen),
600  wxe_util:rec(?wxImage_GetMaskGreen).
601
602%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagegetmaskred">external documentation</a>.
603-spec getMaskRed(This) -> integer() when
604	This::wxImage().
605getMaskRed(#wx_ref{type=ThisT}=This) ->
606  ?CLASS(ThisT,wxImage),
607  wxe_util:queue_cmd(This,?get_env(),?wxImage_GetMaskRed),
608  wxe_util:rec(?wxImage_GetMaskRed).
609
610%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagegetorfindmaskcolour">external documentation</a>.
611-spec getOrFindMaskColour(This) -> Result when
612	Result ::{Res ::boolean(), R::integer(), G::integer(), B::integer()},
613	This::wxImage().
614getOrFindMaskColour(#wx_ref{type=ThisT}=This) ->
615  ?CLASS(ThisT,wxImage),
616  wxe_util:queue_cmd(This,?get_env(),?wxImage_GetOrFindMaskColour),
617  wxe_util:rec(?wxImage_GetOrFindMaskColour).
618
619%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagegetpalette">external documentation</a>.
620-spec getPalette(This) -> wxPalette:wxPalette() when
621	This::wxImage().
622getPalette(#wx_ref{type=ThisT}=This) ->
623  ?CLASS(ThisT,wxImage),
624  wxe_util:queue_cmd(This,?get_env(),?wxImage_GetPalette),
625  wxe_util:rec(?wxImage_GetPalette).
626
627%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagegetred">external documentation</a>.
628-spec getRed(This, X, Y) -> integer() when
629	This::wxImage(), X::integer(), Y::integer().
630getRed(#wx_ref{type=ThisT}=This,X,Y)
631 when is_integer(X),is_integer(Y) ->
632  ?CLASS(ThisT,wxImage),
633  wxe_util:queue_cmd(This,X,Y,?get_env(),?wxImage_GetRed),
634  wxe_util:rec(?wxImage_GetRed).
635
636%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagegetsubimage">external documentation</a>.
637-spec getSubImage(This, Rect) -> wxImage() when
638	This::wxImage(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}.
639getSubImage(#wx_ref{type=ThisT}=This,{RectX,RectY,RectW,RectH} = Rect)
640 when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) ->
641  ?CLASS(ThisT,wxImage),
642  wxe_util:queue_cmd(This,Rect,?get_env(),?wxImage_GetSubImage),
643  wxe_util:rec(?wxImage_GetSubImage).
644
645%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagegetwidth">external documentation</a>.
646-spec getWidth(This) -> integer() when
647	This::wxImage().
648getWidth(#wx_ref{type=ThisT}=This) ->
649  ?CLASS(ThisT,wxImage),
650  wxe_util:queue_cmd(This,?get_env(),?wxImage_GetWidth),
651  wxe_util:rec(?wxImage_GetWidth).
652
653%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagehasalpha">external documentation</a>.
654-spec hasAlpha(This) -> boolean() when
655	This::wxImage().
656hasAlpha(#wx_ref{type=ThisT}=This) ->
657  ?CLASS(ThisT,wxImage),
658  wxe_util:queue_cmd(This,?get_env(),?wxImage_HasAlpha),
659  wxe_util:rec(?wxImage_HasAlpha).
660
661%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagehasmask">external documentation</a>.
662-spec hasMask(This) -> boolean() when
663	This::wxImage().
664hasMask(#wx_ref{type=ThisT}=This) ->
665  ?CLASS(ThisT,wxImage),
666  wxe_util:queue_cmd(This,?get_env(),?wxImage_HasMask),
667  wxe_util:rec(?wxImage_HasMask).
668
669%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagegetoption">external documentation</a>.
670-spec getOption(This, Name) -> unicode:charlist() when
671	This::wxImage(), Name::unicode:chardata().
672getOption(#wx_ref{type=ThisT}=This,Name)
673 when ?is_chardata(Name) ->
674  ?CLASS(ThisT,wxImage),
675  Name_UC = unicode:characters_to_binary(Name),
676  wxe_util:queue_cmd(This,Name_UC,?get_env(),?wxImage_GetOption),
677  wxe_util:rec(?wxImage_GetOption).
678
679%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagegetoptionint">external documentation</a>.
680-spec getOptionInt(This, Name) -> integer() when
681	This::wxImage(), Name::unicode:chardata().
682getOptionInt(#wx_ref{type=ThisT}=This,Name)
683 when ?is_chardata(Name) ->
684  ?CLASS(ThisT,wxImage),
685  Name_UC = unicode:characters_to_binary(Name),
686  wxe_util:queue_cmd(This,Name_UC,?get_env(),?wxImage_GetOptionInt),
687  wxe_util:rec(?wxImage_GetOptionInt).
688
689%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagehasoption">external documentation</a>.
690-spec hasOption(This, Name) -> boolean() when
691	This::wxImage(), Name::unicode:chardata().
692hasOption(#wx_ref{type=ThisT}=This,Name)
693 when ?is_chardata(Name) ->
694  ?CLASS(ThisT,wxImage),
695  Name_UC = unicode:characters_to_binary(Name),
696  wxe_util:queue_cmd(This,Name_UC,?get_env(),?wxImage_HasOption),
697  wxe_util:rec(?wxImage_HasOption).
698
699%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageinitalpha">external documentation</a>.
700-spec initAlpha(This) -> 'ok' when
701	This::wxImage().
702initAlpha(#wx_ref{type=ThisT}=This) ->
703  ?CLASS(ThisT,wxImage),
704  wxe_util:queue_cmd(This,?get_env(),?wxImage_InitAlpha).
705
706%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageinitstandardhandlers">external documentation</a>.
707-spec initStandardHandlers() -> 'ok'.
708initStandardHandlers() ->
709  wxe_util:queue_cmd(?get_env(), ?wxImage_InitStandardHandlers).
710
711%% @equiv isTransparent(This,X,Y, [])
712-spec isTransparent(This, X, Y) -> boolean() when
713	This::wxImage(), X::integer(), Y::integer().
714
715isTransparent(This,X,Y)
716 when is_record(This, wx_ref),is_integer(X),is_integer(Y) ->
717  isTransparent(This,X,Y, []).
718
719%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageistransparent">external documentation</a>.
720-spec isTransparent(This, X, Y, [Option]) -> boolean() when
721	This::wxImage(), X::integer(), Y::integer(),
722	Option :: {'threshold', integer()}.
723isTransparent(#wx_ref{type=ThisT}=This,X,Y, Options)
724 when is_integer(X),is_integer(Y),is_list(Options) ->
725  ?CLASS(ThisT,wxImage),
726  MOpts = fun({threshold, _threshold} = Arg) -> Arg;
727          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
728  Opts = lists:map(MOpts, Options),
729  wxe_util:queue_cmd(This,X,Y, Opts,?get_env(),?wxImage_IsTransparent),
730  wxe_util:rec(?wxImage_IsTransparent).
731
732%% @equiv loadFile(This,Name, [])
733-spec loadFile(This, Name) -> boolean() when
734	This::wxImage(), Name::unicode:chardata().
735
736loadFile(This,Name)
737 when is_record(This, wx_ref),?is_chardata(Name) ->
738  loadFile(This,Name, []).
739
740%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageloadfile">external documentation</a>.
741%%<br /> Type = ?wxBITMAP_TYPE_INVALID | ?wxBITMAP_TYPE_BMP | ?wxBITMAP_TYPE_BMP_RESOURCE | ?wxBITMAP_TYPE_RESOURCE | ?wxBITMAP_TYPE_ICO | ?wxBITMAP_TYPE_ICO_RESOURCE | ?wxBITMAP_TYPE_CUR | ?wxBITMAP_TYPE_CUR_RESOURCE | ?wxBITMAP_TYPE_XBM | ?wxBITMAP_TYPE_XBM_DATA | ?wxBITMAP_TYPE_XPM | ?wxBITMAP_TYPE_XPM_DATA | ?wxBITMAP_TYPE_TIFF | ?wxBITMAP_TYPE_TIF | ?wxBITMAP_TYPE_TIFF_RESOURCE | ?wxBITMAP_TYPE_TIF_RESOURCE | ?wxBITMAP_TYPE_GIF | ?wxBITMAP_TYPE_GIF_RESOURCE | ?wxBITMAP_TYPE_PNG | ?wxBITMAP_TYPE_PNG_RESOURCE | ?wxBITMAP_TYPE_JPEG | ?wxBITMAP_TYPE_JPEG_RESOURCE | ?wxBITMAP_TYPE_PNM | ?wxBITMAP_TYPE_PNM_RESOURCE | ?wxBITMAP_TYPE_PCX | ?wxBITMAP_TYPE_PCX_RESOURCE | ?wxBITMAP_TYPE_PICT | ?wxBITMAP_TYPE_PICT_RESOURCE | ?wxBITMAP_TYPE_ICON | ?wxBITMAP_TYPE_ICON_RESOURCE | ?wxBITMAP_TYPE_ANI | ?wxBITMAP_TYPE_IFF | ?wxBITMAP_TYPE_TGA | ?wxBITMAP_TYPE_MACCURSOR | ?wxBITMAP_TYPE_MACCURSOR_RESOURCE | ?wxBITMAP_TYPE_ANY
742-spec loadFile(This, Name, [Option]) -> boolean() when
743	This::wxImage(), Name::unicode:chardata(),
744	Option :: {'type', wx:wx_enum()}
745		 | {'index', integer()}.
746loadFile(#wx_ref{type=ThisT}=This,Name, Options)
747 when ?is_chardata(Name),is_list(Options) ->
748  ?CLASS(ThisT,wxImage),
749  Name_UC = unicode:characters_to_binary(Name),
750  MOpts = fun({type, _type} = Arg) -> Arg;
751          ({index, _index} = Arg) -> Arg;
752          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
753  Opts = lists:map(MOpts, Options),
754  wxe_util:queue_cmd(This,Name_UC, Opts,?get_env(),?wxImage_LoadFile_2),
755  wxe_util:rec(?wxImage_LoadFile_2).
756
757%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageloadfile">external documentation</a>.
758-spec loadFile(This, Name, Mimetype, [Option]) -> boolean() when
759	This::wxImage(), Name::unicode:chardata(), Mimetype::unicode:chardata(),
760	Option :: {'index', integer()}.
761loadFile(#wx_ref{type=ThisT}=This,Name,Mimetype, Options)
762 when ?is_chardata(Name),?is_chardata(Mimetype),is_list(Options) ->
763  ?CLASS(ThisT,wxImage),
764  Name_UC = unicode:characters_to_binary(Name),
765  Mimetype_UC = unicode:characters_to_binary(Mimetype),
766  MOpts = fun({index, _index} = Arg) -> Arg;
767          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
768  Opts = lists:map(MOpts, Options),
769  wxe_util:queue_cmd(This,Name_UC,Mimetype_UC, Opts,?get_env(),?wxImage_LoadFile_3),
770  wxe_util:rec(?wxImage_LoadFile_3).
771
772%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageisok">external documentation</a>.
773-spec ok(This) -> boolean() when
774	This::wxImage().
775
776ok(This)
777 when is_record(This, wx_ref) ->
778  isOk(This).
779
780%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageisok">external documentation</a>.
781-spec isOk(This) -> boolean() when
782	This::wxImage().
783isOk(#wx_ref{type=ThisT}=This) ->
784  ?CLASS(ThisT,wxImage),
785  wxe_util:queue_cmd(This,?get_env(),?wxImage_IsOk),
786  wxe_util:rec(?wxImage_IsOk).
787
788%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageremovehandler">external documentation</a>.
789-spec removeHandler(Name) -> boolean() when
790	Name::unicode:chardata().
791removeHandler(Name)
792 when ?is_chardata(Name) ->
793  Name_UC = unicode:characters_to_binary(Name),
794  wxe_util:queue_cmd(Name_UC,?get_env(),?wxImage_RemoveHandler),
795  wxe_util:rec(?wxImage_RemoveHandler).
796
797%% @equiv mirror(This, [])
798-spec mirror(This) -> wxImage() when
799	This::wxImage().
800
801mirror(This)
802 when is_record(This, wx_ref) ->
803  mirror(This, []).
804
805%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagemirror">external documentation</a>.
806-spec mirror(This, [Option]) -> wxImage() when
807	This::wxImage(),
808	Option :: {'horizontally', boolean()}.
809mirror(#wx_ref{type=ThisT}=This, Options)
810 when is_list(Options) ->
811  ?CLASS(ThisT,wxImage),
812  MOpts = fun({horizontally, _horizontally} = Arg) -> Arg;
813          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
814  Opts = lists:map(MOpts, Options),
815  wxe_util:queue_cmd(This, Opts,?get_env(),?wxImage_Mirror),
816  wxe_util:rec(?wxImage_Mirror).
817
818%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagereplace">external documentation</a>.
819-spec replace(This, R1, G1, B1, R2, G2, B2) -> 'ok' when
820	This::wxImage(), R1::integer(), G1::integer(), B1::integer(), R2::integer(), G2::integer(), B2::integer().
821replace(#wx_ref{type=ThisT}=This,R1,G1,B1,R2,G2,B2)
822 when is_integer(R1),is_integer(G1),is_integer(B1),is_integer(R2),is_integer(G2),is_integer(B2) ->
823  ?CLASS(ThisT,wxImage),
824  wxe_util:queue_cmd(This,R1,G1,B1,R2,G2,B2,?get_env(),?wxImage_Replace).
825
826%% @equiv rescale(This,Width,Height, [])
827-spec rescale(This, Width, Height) -> wxImage() when
828	This::wxImage(), Width::integer(), Height::integer().
829
830rescale(This,Width,Height)
831 when is_record(This, wx_ref),is_integer(Width),is_integer(Height) ->
832  rescale(This,Width,Height, []).
833
834%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagerescale">external documentation</a>.
835%%<br /> Quality = ?wxIMAGE_QUALITY_NEAREST | ?wxIMAGE_QUALITY_BILINEAR | ?wxIMAGE_QUALITY_BICUBIC | ?wxIMAGE_QUALITY_BOX_AVERAGE | ?wxIMAGE_QUALITY_NORMAL | ?wxIMAGE_QUALITY_HIGH
836-spec rescale(This, Width, Height, [Option]) -> wxImage() when
837	This::wxImage(), Width::integer(), Height::integer(),
838	Option :: {'quality', wx:wx_enum()}.
839rescale(#wx_ref{type=ThisT}=This,Width,Height, Options)
840 when is_integer(Width),is_integer(Height),is_list(Options) ->
841  ?CLASS(ThisT,wxImage),
842  MOpts = fun({quality, _quality} = Arg) -> Arg;
843          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
844  Opts = lists:map(MOpts, Options),
845  wxe_util:queue_cmd(This,Width,Height, Opts,?get_env(),?wxImage_Rescale),
846  wxe_util:rec(?wxImage_Rescale).
847
848%% @equiv resize(This,Size,Pos, [])
849-spec resize(This, Size, Pos) -> wxImage() when
850	This::wxImage(), Size::{W::integer(), H::integer()}, Pos::{X::integer(), Y::integer()}.
851
852resize(This,{SizeW,SizeH} = Size,{PosX,PosY} = Pos)
853 when is_record(This, wx_ref),is_integer(SizeW),is_integer(SizeH),is_integer(PosX),is_integer(PosY) ->
854  resize(This,Size,Pos, []).
855
856%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximageresize">external documentation</a>.
857-spec resize(This, Size, Pos, [Option]) -> wxImage() when
858	This::wxImage(), Size::{W::integer(), H::integer()}, Pos::{X::integer(), Y::integer()},
859	Option :: {'r', integer()}
860		 | {'g', integer()}
861		 | {'b', integer()}.
862resize(#wx_ref{type=ThisT}=This,{SizeW,SizeH} = Size,{PosX,PosY} = Pos, Options)
863 when is_integer(SizeW),is_integer(SizeH),is_integer(PosX),is_integer(PosY),is_list(Options) ->
864  ?CLASS(ThisT,wxImage),
865  MOpts = fun({r, _r} = Arg) -> Arg;
866          ({g, _g} = Arg) -> Arg;
867          ({b, _b} = Arg) -> Arg;
868          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
869  Opts = lists:map(MOpts, Options),
870  wxe_util:queue_cmd(This,Size,Pos, Opts,?get_env(),?wxImage_Resize),
871  wxe_util:rec(?wxImage_Resize).
872
873%% @equiv rotate(This,Angle,RotationCentre, [])
874-spec rotate(This, Angle, RotationCentre) -> wxImage() when
875	This::wxImage(), Angle::number(), RotationCentre::{X::integer(), Y::integer()}.
876
877rotate(This,Angle,{RotationCentreX,RotationCentreY} = RotationCentre)
878 when is_record(This, wx_ref),is_number(Angle),is_integer(RotationCentreX),is_integer(RotationCentreY) ->
879  rotate(This,Angle,RotationCentre, []).
880
881%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagerotate">external documentation</a>.
882-spec rotate(This, Angle, RotationCentre, [Option]) -> wxImage() when
883	This::wxImage(), Angle::number(), RotationCentre::{X::integer(), Y::integer()},
884	Option :: {'interpolating', boolean()}
885		 | {'offset_after_rotation', {X::integer(), Y::integer()}}.
886rotate(#wx_ref{type=ThisT}=This,Angle,{RotationCentreX,RotationCentreY} = RotationCentre, Options)
887 when is_number(Angle),is_integer(RotationCentreX),is_integer(RotationCentreY),is_list(Options) ->
888  ?CLASS(ThisT,wxImage),
889  MOpts = fun({interpolating, _interpolating} = Arg) -> Arg;
890          ({offset_after_rotation, {_offset_after_rotationX,_offset_after_rotationY}} = Arg) -> Arg;
891          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
892  Opts = lists:map(MOpts, Options),
893  wxe_util:queue_cmd(This,Angle,RotationCentre, Opts,?get_env(),?wxImage_Rotate),
894  wxe_util:rec(?wxImage_Rotate).
895
896%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagerotatehue">external documentation</a>.
897-spec rotateHue(This, Angle) -> 'ok' when
898	This::wxImage(), Angle::number().
899rotateHue(#wx_ref{type=ThisT}=This,Angle)
900 when is_number(Angle) ->
901  ?CLASS(ThisT,wxImage),
902  wxe_util:queue_cmd(This,Angle,?get_env(),?wxImage_RotateHue).
903
904%% @equiv rotate90(This, [])
905-spec rotate90(This) -> wxImage() when
906	This::wxImage().
907
908rotate90(This)
909 when is_record(This, wx_ref) ->
910  rotate90(This, []).
911
912%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagerotate90">external documentation</a>.
913-spec rotate90(This, [Option]) -> wxImage() when
914	This::wxImage(),
915	Option :: {'clockwise', boolean()}.
916rotate90(#wx_ref{type=ThisT}=This, Options)
917 when is_list(Options) ->
918  ?CLASS(ThisT,wxImage),
919  MOpts = fun({clockwise, _clockwise} = Arg) -> Arg;
920          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
921  Opts = lists:map(MOpts, Options),
922  wxe_util:queue_cmd(This, Opts,?get_env(),?wxImage_Rotate90),
923  wxe_util:rec(?wxImage_Rotate90).
924
925%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesavefile">external documentation</a>.
926-spec saveFile(This, Name) -> boolean() when
927	This::wxImage(), Name::unicode:chardata().
928saveFile(#wx_ref{type=ThisT}=This,Name)
929 when ?is_chardata(Name) ->
930  ?CLASS(ThisT,wxImage),
931  Name_UC = unicode:characters_to_binary(Name),
932  wxe_util:queue_cmd(This,Name_UC,?get_env(),?wxImage_SaveFile_1),
933  wxe_util:rec(?wxImage_SaveFile_1).
934
935%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesavefile">external documentation</a>.
936%% <br /> Also:<br />
937%% saveFile(This, Name, Mimetype) -> boolean() when<br />
938%% 	This::wxImage(), Name::unicode:chardata(), Mimetype::unicode:chardata().<br />
939%%
940%%<br /> Type = ?wxBITMAP_TYPE_INVALID | ?wxBITMAP_TYPE_BMP | ?wxBITMAP_TYPE_BMP_RESOURCE | ?wxBITMAP_TYPE_RESOURCE | ?wxBITMAP_TYPE_ICO | ?wxBITMAP_TYPE_ICO_RESOURCE | ?wxBITMAP_TYPE_CUR | ?wxBITMAP_TYPE_CUR_RESOURCE | ?wxBITMAP_TYPE_XBM | ?wxBITMAP_TYPE_XBM_DATA | ?wxBITMAP_TYPE_XPM | ?wxBITMAP_TYPE_XPM_DATA | ?wxBITMAP_TYPE_TIFF | ?wxBITMAP_TYPE_TIF | ?wxBITMAP_TYPE_TIFF_RESOURCE | ?wxBITMAP_TYPE_TIF_RESOURCE | ?wxBITMAP_TYPE_GIF | ?wxBITMAP_TYPE_GIF_RESOURCE | ?wxBITMAP_TYPE_PNG | ?wxBITMAP_TYPE_PNG_RESOURCE | ?wxBITMAP_TYPE_JPEG | ?wxBITMAP_TYPE_JPEG_RESOURCE | ?wxBITMAP_TYPE_PNM | ?wxBITMAP_TYPE_PNM_RESOURCE | ?wxBITMAP_TYPE_PCX | ?wxBITMAP_TYPE_PCX_RESOURCE | ?wxBITMAP_TYPE_PICT | ?wxBITMAP_TYPE_PICT_RESOURCE | ?wxBITMAP_TYPE_ICON | ?wxBITMAP_TYPE_ICON_RESOURCE | ?wxBITMAP_TYPE_ANI | ?wxBITMAP_TYPE_IFF | ?wxBITMAP_TYPE_TGA | ?wxBITMAP_TYPE_MACCURSOR | ?wxBITMAP_TYPE_MACCURSOR_RESOURCE | ?wxBITMAP_TYPE_ANY
941-spec saveFile(This, Name, Type) -> boolean() when
942	This::wxImage(), Name::unicode:chardata(), Type::wx:wx_enum();
943      (This, Name, Mimetype) -> boolean() when
944	This::wxImage(), Name::unicode:chardata(), Mimetype::unicode:chardata().
945saveFile(#wx_ref{type=ThisT}=This,Name,Type)
946 when ?is_chardata(Name),is_integer(Type) ->
947  ?CLASS(ThisT,wxImage),
948  Name_UC = unicode:characters_to_binary(Name),
949  wxe_util:queue_cmd(This,Name_UC,Type,?get_env(),?wxImage_SaveFile_2_0),
950  wxe_util:rec(?wxImage_SaveFile_2_0);
951saveFile(#wx_ref{type=ThisT}=This,Name,Mimetype)
952 when ?is_chardata(Name),?is_chardata(Mimetype) ->
953  ?CLASS(ThisT,wxImage),
954  Name_UC = unicode:characters_to_binary(Name),
955  Mimetype_UC = unicode:characters_to_binary(Mimetype),
956  wxe_util:queue_cmd(This,Name_UC,Mimetype_UC,?get_env(),?wxImage_SaveFile_2_1),
957  wxe_util:rec(?wxImage_SaveFile_2_1).
958
959%% @equiv scale(This,Width,Height, [])
960-spec scale(This, Width, Height) -> wxImage() when
961	This::wxImage(), Width::integer(), Height::integer().
962
963scale(This,Width,Height)
964 when is_record(This, wx_ref),is_integer(Width),is_integer(Height) ->
965  scale(This,Width,Height, []).
966
967%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagescale">external documentation</a>.
968%%<br /> Quality = ?wxIMAGE_QUALITY_NEAREST | ?wxIMAGE_QUALITY_BILINEAR | ?wxIMAGE_QUALITY_BICUBIC | ?wxIMAGE_QUALITY_BOX_AVERAGE | ?wxIMAGE_QUALITY_NORMAL | ?wxIMAGE_QUALITY_HIGH
969-spec scale(This, Width, Height, [Option]) -> wxImage() when
970	This::wxImage(), Width::integer(), Height::integer(),
971	Option :: {'quality', wx:wx_enum()}.
972scale(#wx_ref{type=ThisT}=This,Width,Height, Options)
973 when is_integer(Width),is_integer(Height),is_list(Options) ->
974  ?CLASS(ThisT,wxImage),
975  MOpts = fun({quality, _quality} = Arg) -> Arg;
976          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
977  Opts = lists:map(MOpts, Options),
978  wxe_util:queue_cmd(This,Width,Height, Opts,?get_env(),?wxImage_Scale),
979  wxe_util:rec(?wxImage_Scale).
980
981%% @equiv size(This,Size,Pos, [])
982-spec size(This, Size, Pos) -> wxImage() when
983	This::wxImage(), Size::{W::integer(), H::integer()}, Pos::{X::integer(), Y::integer()}.
984
985size(This,{SizeW,SizeH} = Size,{PosX,PosY} = Pos)
986 when is_record(This, wx_ref),is_integer(SizeW),is_integer(SizeH),is_integer(PosX),is_integer(PosY) ->
987  size(This,Size,Pos, []).
988
989%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesize">external documentation</a>.
990-spec size(This, Size, Pos, [Option]) -> wxImage() when
991	This::wxImage(), Size::{W::integer(), H::integer()}, Pos::{X::integer(), Y::integer()},
992	Option :: {'r', integer()}
993		 | {'g', integer()}
994		 | {'b', integer()}.
995size(#wx_ref{type=ThisT}=This,{SizeW,SizeH} = Size,{PosX,PosY} = Pos, Options)
996 when is_integer(SizeW),is_integer(SizeH),is_integer(PosX),is_integer(PosY),is_list(Options) ->
997  ?CLASS(ThisT,wxImage),
998  MOpts = fun({r, _r} = Arg) -> Arg;
999          ({g, _g} = Arg) -> Arg;
1000          ({b, _b} = Arg) -> Arg;
1001          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
1002  Opts = lists:map(MOpts, Options),
1003  wxe_util:queue_cmd(This,Size,Pos, Opts,?get_env(),?wxImage_Size),
1004  wxe_util:rec(?wxImage_Size).
1005
1006%% @equiv setAlpha(This,Alpha, [])
1007-spec setAlpha(This, Alpha) -> 'ok' when
1008	This::wxImage(), Alpha::binary().
1009
1010setAlpha(This,Alpha)
1011 when is_record(This, wx_ref),is_binary(Alpha) ->
1012  setAlpha(This,Alpha, []).
1013
1014%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesetalpha">external documentation</a>.
1015-spec setAlpha(This, Alpha, [Option]) -> 'ok' when
1016	This::wxImage(), Alpha::binary(),
1017	Option :: {'static_data', boolean()}.
1018setAlpha(#wx_ref{type=ThisT}=This,Alpha, Options)
1019 when is_binary(Alpha),is_list(Options) ->
1020  ?CLASS(ThisT,wxImage),
1021  MOpts = fun({static_data, _static_data} = Arg) -> Arg;
1022          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
1023  Opts = lists:map(MOpts, Options),
1024  wxe_util:queue_cmd(This,Alpha, Opts,?get_env(),?wxImage_SetAlpha_2).
1025
1026%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesetalpha">external documentation</a>.
1027-spec setAlpha(This, X, Y, Alpha) -> 'ok' when
1028	This::wxImage(), X::integer(), Y::integer(), Alpha::integer().
1029setAlpha(#wx_ref{type=ThisT}=This,X,Y,Alpha)
1030 when is_integer(X),is_integer(Y),is_integer(Alpha) ->
1031  ?CLASS(ThisT,wxImage),
1032  wxe_util:queue_cmd(This,X,Y,Alpha,?get_env(),?wxImage_SetAlpha_3).
1033
1034%% @equiv setData(This,Data, [])
1035-spec setData(This, Data) -> 'ok' when
1036	This::wxImage(), Data::binary().
1037
1038setData(This,Data)
1039 when is_record(This, wx_ref),is_binary(Data) ->
1040  setData(This,Data, []).
1041
1042%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesetdata">external documentation</a>.
1043-spec setData(This, Data, [Option]) -> 'ok' when
1044	This::wxImage(), Data::binary(),
1045	Option :: {'static_data', boolean()}.
1046setData(#wx_ref{type=ThisT}=This,Data, Options)
1047 when is_binary(Data),is_list(Options) ->
1048  ?CLASS(ThisT,wxImage),
1049  MOpts = fun({static_data, _static_data} = Arg) -> Arg;
1050          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
1051  Opts = lists:map(MOpts, Options),
1052  wxe_util:queue_cmd(This,Data, Opts,?get_env(),?wxImage_SetData_2).
1053
1054%% @equiv setData(This,Data,New_width,New_height, [])
1055-spec setData(This, Data, New_width, New_height) -> 'ok' when
1056	This::wxImage(), Data::binary(), New_width::integer(), New_height::integer().
1057
1058setData(This,Data,New_width,New_height)
1059 when is_record(This, wx_ref),is_binary(Data),is_integer(New_width),is_integer(New_height) ->
1060  setData(This,Data,New_width,New_height, []).
1061
1062%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesetdata">external documentation</a>.
1063-spec setData(This, Data, New_width, New_height, [Option]) -> 'ok' when
1064	This::wxImage(), Data::binary(), New_width::integer(), New_height::integer(),
1065	Option :: {'static_data', boolean()}.
1066setData(#wx_ref{type=ThisT}=This,Data,New_width,New_height, Options)
1067 when is_binary(Data),is_integer(New_width),is_integer(New_height),is_list(Options) ->
1068  ?CLASS(ThisT,wxImage),
1069  MOpts = fun({static_data, _static_data} = Arg) -> Arg;
1070          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
1071  Opts = lists:map(MOpts, Options),
1072  wxe_util:queue_cmd(This,Data,New_width,New_height, Opts,?get_env(),?wxImage_SetData_4).
1073
1074%% @equiv setMask(This, [])
1075-spec setMask(This) -> 'ok' when
1076	This::wxImage().
1077
1078setMask(This)
1079 when is_record(This, wx_ref) ->
1080  setMask(This, []).
1081
1082%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesetmask">external documentation</a>.
1083-spec setMask(This, [Option]) -> 'ok' when
1084	This::wxImage(),
1085	Option :: {'mask', boolean()}.
1086setMask(#wx_ref{type=ThisT}=This, Options)
1087 when is_list(Options) ->
1088  ?CLASS(ThisT,wxImage),
1089  MOpts = fun({mask, _mask} = Arg) -> Arg;
1090          (BadOpt) -> erlang:error({badoption, BadOpt}) end,
1091  Opts = lists:map(MOpts, Options),
1092  wxe_util:queue_cmd(This, Opts,?get_env(),?wxImage_SetMask).
1093
1094%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesetmaskcolour">external documentation</a>.
1095-spec setMaskColour(This, Red, Green, Blue) -> 'ok' when
1096	This::wxImage(), Red::integer(), Green::integer(), Blue::integer().
1097setMaskColour(#wx_ref{type=ThisT}=This,Red,Green,Blue)
1098 when is_integer(Red),is_integer(Green),is_integer(Blue) ->
1099  ?CLASS(ThisT,wxImage),
1100  wxe_util:queue_cmd(This,Red,Green,Blue,?get_env(),?wxImage_SetMaskColour).
1101
1102%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesetmaskfromimage">external documentation</a>.
1103-spec setMaskFromImage(This, Mask, Mr, Mg, Mb) -> boolean() when
1104	This::wxImage(), Mask::wxImage(), Mr::integer(), Mg::integer(), Mb::integer().
1105setMaskFromImage(#wx_ref{type=ThisT}=This,#wx_ref{type=MaskT}=Mask,Mr,Mg,Mb)
1106 when is_integer(Mr),is_integer(Mg),is_integer(Mb) ->
1107  ?CLASS(ThisT,wxImage),
1108  ?CLASS(MaskT,wxImage),
1109  wxe_util:queue_cmd(This,Mask,Mr,Mg,Mb,?get_env(),?wxImage_SetMaskFromImage),
1110  wxe_util:rec(?wxImage_SetMaskFromImage).
1111
1112%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesetoption">external documentation</a>.
1113%% <br /> Also:<br />
1114%% setOption(This, Name, Value) -> 'ok' when<br />
1115%% 	This::wxImage(), Name::unicode:chardata(), Value::unicode:chardata().<br />
1116%%
1117-spec setOption(This, Name, Value) -> 'ok' when
1118	This::wxImage(), Name::unicode:chardata(), Value::integer();
1119      (This, Name, Value) -> 'ok' when
1120	This::wxImage(), Name::unicode:chardata(), Value::unicode:chardata().
1121setOption(#wx_ref{type=ThisT}=This,Name,Value)
1122 when ?is_chardata(Name),is_integer(Value) ->
1123  ?CLASS(ThisT,wxImage),
1124  Name_UC = unicode:characters_to_binary(Name),
1125  wxe_util:queue_cmd(This,Name_UC,Value,?get_env(),?wxImage_SetOption_2_0);
1126setOption(#wx_ref{type=ThisT}=This,Name,Value)
1127 when ?is_chardata(Name),?is_chardata(Value) ->
1128  ?CLASS(ThisT,wxImage),
1129  Name_UC = unicode:characters_to_binary(Name),
1130  Value_UC = unicode:characters_to_binary(Value),
1131  wxe_util:queue_cmd(This,Name_UC,Value_UC,?get_env(),?wxImage_SetOption_2_1).
1132
1133%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesetpalette">external documentation</a>.
1134-spec setPalette(This, Palette) -> 'ok' when
1135	This::wxImage(), Palette::wxPalette:wxPalette().
1136setPalette(#wx_ref{type=ThisT}=This,#wx_ref{type=PaletteT}=Palette) ->
1137  ?CLASS(ThisT,wxImage),
1138  ?CLASS(PaletteT,wxPalette),
1139  wxe_util:queue_cmd(This,Palette,?get_env(),?wxImage_SetPalette).
1140
1141%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesetrgb">external documentation</a>.
1142-spec setRGB(This, Rect, Red, Green, Blue) -> 'ok' when
1143	This::wxImage(), Rect::{X::integer(), Y::integer(), W::integer(), H::integer()}, Red::integer(), Green::integer(), Blue::integer().
1144setRGB(#wx_ref{type=ThisT}=This,{RectX,RectY,RectW,RectH} = Rect,Red,Green,Blue)
1145 when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH),is_integer(Red),is_integer(Green),is_integer(Blue) ->
1146  ?CLASS(ThisT,wxImage),
1147  wxe_util:queue_cmd(This,Rect,Red,Green,Blue,?get_env(),?wxImage_SetRGB_4).
1148
1149%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wximage.html#wximagesetrgb">external documentation</a>.
1150-spec setRGB(This, X, Y, R, G, B) -> 'ok' when
1151	This::wxImage(), X::integer(), Y::integer(), R::integer(), G::integer(), B::integer().
1152setRGB(#wx_ref{type=ThisT}=This,X,Y,R,G,B)
1153 when is_integer(X),is_integer(Y),is_integer(R),is_integer(G),is_integer(B) ->
1154  ?CLASS(ThisT,wxImage),
1155  wxe_util:queue_cmd(This,X,Y,R,G,B,?get_env(),?wxImage_SetRGB_5).
1156
1157%% @doc Destroys this object, do not use object again
1158-spec destroy(This::wxImage()) -> 'ok'.
1159destroy(Obj=#wx_ref{type=Type}) ->
1160  ?CLASS(Type,wxImage),
1161  wxe_util:queue_cmd(Obj, ?get_env(), ?DESTROY_OBJECT),
1162  ok.
1163