From 84adefa331c4159d432d22840663c38f155cd4c1 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Fri, 20 Nov 2009 14:54:40 +0000 Subject: The R13B03 release. --- lib/wx/src/gen/wxImage.erl | 905 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 905 insertions(+) create mode 100644 lib/wx/src/gen/wxImage.erl (limited to 'lib/wx/src/gen/wxImage.erl') diff --git a/lib/wx/src/gen/wxImage.erl b/lib/wx/src/gen/wxImage.erl new file mode 100644 index 0000000000..f90ae09707 --- /dev/null +++ b/lib/wx/src/gen/wxImage.erl @@ -0,0 +1,905 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2008-2009. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% +%% This file is generated DO NOT EDIT + +%% @doc See external documentation: wxImage. +%% +%% All (default) image handlers are initialized. + +%% +%% @type wxImage(). An object reference, The representation is internal +%% and can be changed without notice. It can't be used for comparsion +%% stored on disc or distributed for use on other nodes. + +-module(wxImage). +-include("wxe.hrl"). +-export(['Destroy'/1,blur/2,blurHorizontal/2,blurVertical/2,convertAlphaToMask/1, + convertAlphaToMask/2,convertToGreyscale/1,convertToGreyscale/2,convertToMono/4, + copy/1,create/3,create/4,create/5,create/6,destroy/1,findFirstUnusedColour/1, + findFirstUnusedColour/2,getAlpha/1,getAlpha/3,getBlue/3,getData/1, + getGreen/3,getHeight/1,getImageCount/1,getImageCount/2,getImageExtWildcard/0, + getMaskBlue/1,getMaskGreen/1,getMaskRed/1,getOption/2,getOptionInt/2, + getOrFindMaskColour/1,getPalette/1,getRed/3,getSubImage/2,getWidth/1, + hasAlpha/1,hasMask/1,hasOption/2,initAlpha/1,initStandardHandlers/0, + isTransparent/3,isTransparent/4,loadFile/2,loadFile/3,loadFile/4,mirror/1, + mirror/2,new/0,new/1,new/2,new/3,new/4,new/5,ok/1,removeHandler/1,replace/7, + rescale/3,rescale/4,resize/3,resize/4,rotate/3,rotate/4,rotate90/1,rotate90/2, + rotateHue/2,saveFile/2,saveFile/3,scale/3,scale/4,setAlpha/2,setAlpha/3, + setAlpha/4,setData/2,setData/3,setData/4,setData/5,setMask/1,setMask/2, + setMaskColour/4,setMaskFromImage/5,setOption/3,setPalette/2,setRGB/5, + setRGB/6,size/3,size/4]). + +%% inherited exports +-export([parent_class/1]). + +%% @hidden +parent_class(_Class) -> erlang:error({badtype, ?MODULE}). + +%% @spec () -> wxImage() +%% @doc See external documentation. +new() -> + wxe_util:construct(?wxImage_new_0, + <<>>). + +%% @spec (Name::string()) -> wxImage() +%% @equiv new(Name, []) +new(Name) + when is_list(Name) -> + new(Name, []). + +%% @spec (X::integer()|string(),X::integer()|term()) -> wxImage() +%% @doc See external documentation. +%%
Alternatives: +%%

+%% new(Width::integer(), Height::integer()) -> new(Width,Height, [])

+%%

+%% new(Name::string(), [Option]) -> wxImage() +%%
Option = {type, integer()} | {index, integer()} +%%

+ +new(Width,Height) + when is_integer(Width),is_integer(Height) -> + new(Width,Height, []); +new(Name, Options) + when is_list(Name),is_list(Options) -> + Name_UC = unicode:characters_to_binary([Name,0]), + MOpts = fun({type, Type}, Acc) -> [<<1:32/?UI,Type:32/?UI>>|Acc]; + ({index, Index}, Acc) -> [<<2:32/?UI,Index:32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:construct(?wxImage_new_2, + <<(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>). + +%% @spec (X::integer()|string(),X::integer()|string(),X::binary()|term()) -> wxImage() +%% @doc See external documentation. +%%
Alternatives: +%%

+%% new(Width::integer(), Height::integer(), Data::binary()) -> new(Width,Height,Data, [])

+%%

+%% new(Width::integer(), Height::integer(), [Option]) -> wxImage() +%%
Option = {clear, bool()} +%%

+%%

+%% new(Name::string(), Mimetype::string(), [Option]) -> wxImage() +%%
Option = {index, integer()} +%%

+ +new(Width,Height,Data) + when is_integer(Width),is_integer(Height),is_binary(Data) -> + new(Width,Height,Data, []); +new(Width,Height, Options) + when is_integer(Width),is_integer(Height),is_list(Options) -> + MOpts = fun({clear, Clear}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Clear)):32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:construct(?wxImage_new_3_0, + <>); +new(Name,Mimetype, Options) + when is_list(Name),is_list(Mimetype),is_list(Options) -> + Name_UC = unicode:characters_to_binary([Name,0]), + Mimetype_UC = unicode:characters_to_binary([Mimetype,0]), + MOpts = fun({index, Index}, Acc) -> [<<1:32/?UI,Index:32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:construct(?wxImage_new_3_1, + <<(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(Mimetype_UC)):32/?UI,(Mimetype_UC)/binary, 0:(((8- ((4+byte_size(Mimetype_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>). + +%% @spec (Width::integer(),Height::integer(),Data::binary(),X::binary()|term()) -> wxImage() +%% @doc See external documentation. +%%
Alternatives: +%%

+%% new(Width::integer(), Height::integer(), Data::binary(), Alpha::binary()) -> new(Width,Height,Data,Alpha, [])

+%%

+%% new(Width::integer(), Height::integer(), Data::binary(), [Option]) -> wxImage() +%%
Option = {static_data, bool()} +%%

+ +new(Width,Height,Data,Alpha) + when is_integer(Width),is_integer(Height),is_binary(Data),is_binary(Alpha) -> + new(Width,Height,Data,Alpha, []); +new(Width,Height,Data, Options) + when is_integer(Width),is_integer(Height),is_binary(Data),is_list(Options) -> + wxe_util:send_bin(Data), + MOpts = fun({static_data, Static_data}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Static_data)):32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:construct(?wxImage_new_4, + <>). + +%% @spec (Width::integer(), Height::integer(), Data::binary(), Alpha::binary(), [Option]) -> wxImage() +%% Option = {static_data, bool()} +%% @doc See external documentation. +new(Width,Height,Data,Alpha, Options) + when is_integer(Width),is_integer(Height),is_binary(Data),is_binary(Alpha),is_list(Options) -> + wxe_util:send_bin(Data), + wxe_util:send_bin(Alpha), + MOpts = fun({static_data, Static_data}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Static_data)):32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:construct(?wxImage_new_5, + <>). + +%% @spec (This::wxImage(), Radius::integer()) -> wxImage() +%% @doc See external documentation. +blur(#wx_ref{type=ThisT,ref=ThisRef},Radius) + when is_integer(Radius) -> + ?CLASS(ThisT,wxImage), + wxe_util:call(?wxImage_Blur, + <>). + +%% @spec (This::wxImage(), Radius::integer()) -> wxImage() +%% @doc See external documentation. +blurHorizontal(#wx_ref{type=ThisT,ref=ThisRef},Radius) + when is_integer(Radius) -> + ?CLASS(ThisT,wxImage), + wxe_util:call(?wxImage_BlurHorizontal, + <>). + +%% @spec (This::wxImage(), Radius::integer()) -> wxImage() +%% @doc See external documentation. +blurVertical(#wx_ref{type=ThisT,ref=ThisRef},Radius) + when is_integer(Radius) -> + ?CLASS(ThisT,wxImage), + wxe_util:call(?wxImage_BlurVertical, + <>). + +%% @spec (This::wxImage()) -> bool() +%% @equiv convertAlphaToMask(This, []) +convertAlphaToMask(This) + when is_record(This, wx_ref) -> + convertAlphaToMask(This, []). + +%% @spec (This::wxImage(), [Option]) -> bool() +%% Option = {threshold, integer()} +%% @doc See external documentation. +convertAlphaToMask(#wx_ref{type=ThisT,ref=ThisRef}, Options) + when is_list(Options) -> + ?CLASS(ThisT,wxImage), + MOpts = fun({threshold, Threshold}, Acc) -> [<<1:32/?UI,Threshold:32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:call(?wxImage_ConvertAlphaToMask, + <>). + +%% @spec (This::wxImage()) -> wxImage() +%% @equiv convertToGreyscale(This, []) +convertToGreyscale(This) + when is_record(This, wx_ref) -> + convertToGreyscale(This, []). + +%% @spec (This::wxImage(), [Option]) -> wxImage() +%% Option = {lr, float()} | {lg, float()} | {lb, float()} +%% @doc See external documentation. +convertToGreyscale(#wx_ref{type=ThisT,ref=ThisRef}, Options) + when is_list(Options) -> + ?CLASS(ThisT,wxImage), + MOpts = fun({lr, Lr}, Acc) -> [<<1:32/?UI,0:32,Lr:64/?F>>|Acc]; + ({lg, Lg}, Acc) -> [<<2:32/?UI,0:32,Lg:64/?F>>|Acc]; + ({lb, Lb}, Acc) -> [<<3:32/?UI,0:32,Lb:64/?F>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:call(?wxImage_ConvertToGreyscale, + <>). + +%% @spec (This::wxImage(), R::integer(), G::integer(), B::integer()) -> wxImage() +%% @doc See external documentation. +convertToMono(#wx_ref{type=ThisT,ref=ThisRef},R,G,B) + when is_integer(R),is_integer(G),is_integer(B) -> + ?CLASS(ThisT,wxImage), + wxe_util:call(?wxImage_ConvertToMono, + <>). + +%% @spec (This::wxImage()) -> wxImage() +%% @doc See external documentation. +copy(#wx_ref{type=ThisT,ref=ThisRef}) -> + ?CLASS(ThisT,wxImage), + wxe_util:call(?wxImage_Copy, + <>). + +%% @spec (This::wxImage(), Width::integer(), Height::integer()) -> bool() +%% @equiv create(This,Width,Height, []) +create(This,Width,Height) + when is_record(This, wx_ref),is_integer(Width),is_integer(Height) -> + create(This,Width,Height, []). + +%% @spec (This::wxImage(),Width::integer(),Height::integer(),X::binary()|term()) -> bool() +%% @doc See external documentation. +%%
Alternatives: +%%

+%% create(This::wxImage(), Width::integer(), Height::integer(), Data::binary()) -> create(This,Width,Height,Data, [])

+%%

+%% create(This::wxImage(), Width::integer(), Height::integer(), [Option]) -> bool() +%%
Option = {clear, bool()} +%%

+ +create(This,Width,Height,Data) + when is_record(This, wx_ref),is_integer(Width),is_integer(Height),is_binary(Data) -> + create(This,Width,Height,Data, []); +create(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options) + when is_integer(Width),is_integer(Height),is_list(Options) -> + ?CLASS(ThisT,wxImage), + MOpts = fun({clear, Clear}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Clear)):32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:call(?wxImage_Create_3, + <>). + +%% @spec (This::wxImage(),Width::integer(),Height::integer(),Data::binary(),X::binary()|term()) -> bool() +%% @doc See external documentation. +%%
Alternatives: +%%

+%% create(This::wxImage(), Width::integer(), Height::integer(), Data::binary(), Alpha::binary()) -> create(This,Width,Height,Data,Alpha, [])

+%%

+%% create(This::wxImage(), Width::integer(), Height::integer(), Data::binary(), [Option]) -> bool() +%%
Option = {static_data, bool()} +%%

+ +create(This,Width,Height,Data,Alpha) + when is_record(This, wx_ref),is_integer(Width),is_integer(Height),is_binary(Data),is_binary(Alpha) -> + create(This,Width,Height,Data,Alpha, []); +create(#wx_ref{type=ThisT,ref=ThisRef},Width,Height,Data, Options) + when is_integer(Width),is_integer(Height),is_binary(Data),is_list(Options) -> + ?CLASS(ThisT,wxImage), + wxe_util:send_bin(Data), + MOpts = fun({static_data, Static_data}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Static_data)):32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:call(?wxImage_Create_4, + <>). + +%% @spec (This::wxImage(), Width::integer(), Height::integer(), Data::binary(), Alpha::binary(), [Option]) -> bool() +%% Option = {static_data, bool()} +%% @doc See external documentation. +create(#wx_ref{type=ThisT,ref=ThisRef},Width,Height,Data,Alpha, Options) + when is_integer(Width),is_integer(Height),is_binary(Data),is_binary(Alpha),is_list(Options) -> + ?CLASS(ThisT,wxImage), + wxe_util:send_bin(Data), + wxe_util:send_bin(Alpha), + MOpts = fun({static_data, Static_data}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Static_data)):32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:call(?wxImage_Create_5, + <>). + +%% @spec (This::wxImage()) -> ok +%% @doc See external documentation. +'Destroy'(#wx_ref{type=ThisT,ref=ThisRef}) -> + ?CLASS(ThisT,wxImage), + wxe_util:cast(?wxImage_Destroy, + <>). + +%% @spec (This::wxImage()) -> {bool(),R::integer(),G::integer(),B::integer()} +%% @equiv findFirstUnusedColour(This, []) +findFirstUnusedColour(This) + when is_record(This, wx_ref) -> + findFirstUnusedColour(This, []). + +%% @spec (This::wxImage(), [Option]) -> {bool(),R::integer(),G::integer(),B::integer()} +%% Option = {startR, integer()} | {startG, integer()} | {startB, integer()} +%% @doc See external documentation. +findFirstUnusedColour(#wx_ref{type=ThisT,ref=ThisRef}, Options) + when is_list(Options) -> + ?CLASS(ThisT,wxImage), + MOpts = fun({startR, StartR}, Acc) -> [<<1:32/?UI,StartR:32/?UI>>|Acc]; + ({startG, StartG}, Acc) -> [<<2:32/?UI,StartG:32/?UI>>|Acc]; + ({startB, StartB}, Acc) -> [<<3:32/?UI,StartB:32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:call(?wxImage_FindFirstUnusedColour, + <>). + +%% @spec () -> string() +%% @doc See external documentation. +getImageExtWildcard() -> + wxe_util:call(?wxImage_GetImageExtWildcard, + <<>>). + +%% @spec (This::wxImage()) -> binary() +%% @doc See external documentation. +getAlpha(#wx_ref{type=ThisT,ref=ThisRef}) -> + ?CLASS(ThisT,wxImage), + wxe_util:call(?wxImage_GetAlpha_0, + <>). + +%% @spec (This::wxImage(), X::integer(), Y::integer()) -> integer() +%% @doc See external documentation. +getAlpha(#wx_ref{type=ThisT,ref=ThisRef},X,Y) + when is_integer(X),is_integer(Y) -> + ?CLASS(ThisT,wxImage), + wxe_util:call(?wxImage_GetAlpha_2, + <>). + +%% @spec (This::wxImage(), X::integer(), Y::integer()) -> integer() +%% @doc See external documentation. +getBlue(#wx_ref{type=ThisT,ref=ThisRef},X,Y) + when is_integer(X),is_integer(Y) -> + ?CLASS(ThisT,wxImage), + wxe_util:call(?wxImage_GetBlue, + <>). + +%% @spec (This::wxImage()) -> binary() +%% @doc See external documentation. +getData(#wx_ref{type=ThisT,ref=ThisRef}) -> + ?CLASS(ThisT,wxImage), + wxe_util:call(?wxImage_GetData, + <>). + +%% @spec (This::wxImage(), X::integer(), Y::integer()) -> integer() +%% @doc See external documentation. +getGreen(#wx_ref{type=ThisT,ref=ThisRef},X,Y) + when is_integer(X),is_integer(Y) -> + ?CLASS(ThisT,wxImage), + wxe_util:call(?wxImage_GetGreen, + <>). + +%% @spec (Name::string()) -> integer() +%% @equiv getImageCount(Name, []) +getImageCount(Name) + when is_list(Name) -> + getImageCount(Name, []). + +%% @spec (Name::string(), [Option]) -> integer() +%% Option = {type, integer()} +%% @doc See external documentation. +getImageCount(Name, Options) + when is_list(Name),is_list(Options) -> + Name_UC = unicode:characters_to_binary([Name,0]), + MOpts = fun({type, Type}, Acc) -> [<<1:32/?UI,Type:32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:call(?wxImage_GetImageCount, + <<(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>). + +%% @spec (This::wxImage()) -> integer() +%% @doc See external documentation. +getHeight(#wx_ref{type=ThisT,ref=ThisRef}) -> + ?CLASS(ThisT,wxImage), + wxe_util:call(?wxImage_GetHeight, + <>). + +%% @spec (This::wxImage()) -> integer() +%% @doc See external documentation. +getMaskBlue(#wx_ref{type=ThisT,ref=ThisRef}) -> + ?CLASS(ThisT,wxImage), + wxe_util:call(?wxImage_GetMaskBlue, + <>). + +%% @spec (This::wxImage()) -> integer() +%% @doc See external documentation. +getMaskGreen(#wx_ref{type=ThisT,ref=ThisRef}) -> + ?CLASS(ThisT,wxImage), + wxe_util:call(?wxImage_GetMaskGreen, + <>). + +%% @spec (This::wxImage()) -> integer() +%% @doc See external documentation. +getMaskRed(#wx_ref{type=ThisT,ref=ThisRef}) -> + ?CLASS(ThisT,wxImage), + wxe_util:call(?wxImage_GetMaskRed, + <>). + +%% @spec (This::wxImage()) -> {bool(),R::integer(),G::integer(),B::integer()} +%% @doc See external documentation. +getOrFindMaskColour(#wx_ref{type=ThisT,ref=ThisRef}) -> + ?CLASS(ThisT,wxImage), + wxe_util:call(?wxImage_GetOrFindMaskColour, + <>). + +%% @spec (This::wxImage()) -> wxPalette:wxPalette() +%% @doc See external documentation. +getPalette(#wx_ref{type=ThisT,ref=ThisRef}) -> + ?CLASS(ThisT,wxImage), + wxe_util:call(?wxImage_GetPalette, + <>). + +%% @spec (This::wxImage(), X::integer(), Y::integer()) -> integer() +%% @doc See external documentation. +getRed(#wx_ref{type=ThisT,ref=ThisRef},X,Y) + when is_integer(X),is_integer(Y) -> + ?CLASS(ThisT,wxImage), + wxe_util:call(?wxImage_GetRed, + <>). + +%% @spec (This::wxImage(), Rect::{X::integer(),Y::integer(),W::integer(),H::integer()}) -> wxImage() +%% @doc See external documentation. +getSubImage(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH}) + when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH) -> + ?CLASS(ThisT,wxImage), + wxe_util:call(?wxImage_GetSubImage, + <>). + +%% @spec (This::wxImage()) -> integer() +%% @doc See external documentation. +getWidth(#wx_ref{type=ThisT,ref=ThisRef}) -> + ?CLASS(ThisT,wxImage), + wxe_util:call(?wxImage_GetWidth, + <>). + +%% @spec (This::wxImage()) -> bool() +%% @doc See external documentation. +hasAlpha(#wx_ref{type=ThisT,ref=ThisRef}) -> + ?CLASS(ThisT,wxImage), + wxe_util:call(?wxImage_HasAlpha, + <>). + +%% @spec (This::wxImage()) -> bool() +%% @doc See external documentation. +hasMask(#wx_ref{type=ThisT,ref=ThisRef}) -> + ?CLASS(ThisT,wxImage), + wxe_util:call(?wxImage_HasMask, + <>). + +%% @spec (This::wxImage(), Name::string()) -> string() +%% @doc See external documentation. +getOption(#wx_ref{type=ThisT,ref=ThisRef},Name) + when is_list(Name) -> + ?CLASS(ThisT,wxImage), + Name_UC = unicode:characters_to_binary([Name,0]), + wxe_util:call(?wxImage_GetOption, + <>). + +%% @spec (This::wxImage(), Name::string()) -> integer() +%% @doc See external documentation. +getOptionInt(#wx_ref{type=ThisT,ref=ThisRef},Name) + when is_list(Name) -> + ?CLASS(ThisT,wxImage), + Name_UC = unicode:characters_to_binary([Name,0]), + wxe_util:call(?wxImage_GetOptionInt, + <>). + +%% @spec (This::wxImage(), Name::string()) -> bool() +%% @doc See external documentation. +hasOption(#wx_ref{type=ThisT,ref=ThisRef},Name) + when is_list(Name) -> + ?CLASS(ThisT,wxImage), + Name_UC = unicode:characters_to_binary([Name,0]), + wxe_util:call(?wxImage_HasOption, + <>). + +%% @spec (This::wxImage()) -> ok +%% @doc See external documentation. +initAlpha(#wx_ref{type=ThisT,ref=ThisRef}) -> + ?CLASS(ThisT,wxImage), + wxe_util:cast(?wxImage_InitAlpha, + <>). + +%% @spec () -> ok +%% @doc See external documentation. +initStandardHandlers() -> + wxe_util:cast(?wxImage_InitStandardHandlers, + <<>>). + +%% @spec (This::wxImage(), X::integer(), Y::integer()) -> bool() +%% @equiv isTransparent(This,X,Y, []) +isTransparent(This,X,Y) + when is_record(This, wx_ref),is_integer(X),is_integer(Y) -> + isTransparent(This,X,Y, []). + +%% @spec (This::wxImage(), X::integer(), Y::integer(), [Option]) -> bool() +%% Option = {threshold, integer()} +%% @doc See external documentation. +isTransparent(#wx_ref{type=ThisT,ref=ThisRef},X,Y, Options) + when is_integer(X),is_integer(Y),is_list(Options) -> + ?CLASS(ThisT,wxImage), + MOpts = fun({threshold, Threshold}, Acc) -> [<<1:32/?UI,Threshold:32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:call(?wxImage_IsTransparent, + <>). + +%% @spec (This::wxImage(), Name::string()) -> bool() +%% @equiv loadFile(This,Name, []) +loadFile(This,Name) + when is_record(This, wx_ref),is_list(Name) -> + loadFile(This,Name, []). + +%% @spec (This::wxImage(), Name::string(), [Option]) -> bool() +%% Option = {type, integer()} | {index, integer()} +%% @doc See external documentation. +loadFile(#wx_ref{type=ThisT,ref=ThisRef},Name, Options) + when is_list(Name),is_list(Options) -> + ?CLASS(ThisT,wxImage), + Name_UC = unicode:characters_to_binary([Name,0]), + MOpts = fun({type, Type}, Acc) -> [<<1:32/?UI,Type:32/?UI>>|Acc]; + ({index, Index}, Acc) -> [<<2:32/?UI,Index:32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:call(?wxImage_LoadFile_2, + <>). + +%% @spec (This::wxImage(), Name::string(), Mimetype::string(), [Option]) -> bool() +%% Option = {index, integer()} +%% @doc See external documentation. +loadFile(#wx_ref{type=ThisT,ref=ThisRef},Name,Mimetype, Options) + when is_list(Name),is_list(Mimetype),is_list(Options) -> + ?CLASS(ThisT,wxImage), + Name_UC = unicode:characters_to_binary([Name,0]), + Mimetype_UC = unicode:characters_to_binary([Mimetype,0]), + MOpts = fun({index, Index}, Acc) -> [<<1:32/?UI,Index:32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:call(?wxImage_LoadFile_3, + <>). + +%% @spec (This::wxImage()) -> bool() +%% @doc See external documentation. +ok(#wx_ref{type=ThisT,ref=ThisRef}) -> + ?CLASS(ThisT,wxImage), + wxe_util:call(?wxImage_Ok, + <>). + +%% @spec (Name::string()) -> bool() +%% @doc See external documentation. +removeHandler(Name) + when is_list(Name) -> + Name_UC = unicode:characters_to_binary([Name,0]), + wxe_util:call(?wxImage_RemoveHandler, + <<(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>). + +%% @spec (This::wxImage()) -> wxImage() +%% @equiv mirror(This, []) +mirror(This) + when is_record(This, wx_ref) -> + mirror(This, []). + +%% @spec (This::wxImage(), [Option]) -> wxImage() +%% Option = {horizontally, bool()} +%% @doc See external documentation. +mirror(#wx_ref{type=ThisT,ref=ThisRef}, Options) + when is_list(Options) -> + ?CLASS(ThisT,wxImage), + MOpts = fun({horizontally, Horizontally}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Horizontally)):32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:call(?wxImage_Mirror, + <>). + +%% @spec (This::wxImage(), R1::integer(), G1::integer(), B1::integer(), R2::integer(), G2::integer(), B2::integer()) -> ok +%% @doc See external documentation. +replace(#wx_ref{type=ThisT,ref=ThisRef},R1,G1,B1,R2,G2,B2) + when is_integer(R1),is_integer(G1),is_integer(B1),is_integer(R2),is_integer(G2),is_integer(B2) -> + ?CLASS(ThisT,wxImage), + wxe_util:cast(?wxImage_Replace, + <>). + +%% @spec (This::wxImage(), Width::integer(), Height::integer()) -> wxImage() +%% @equiv rescale(This,Width,Height, []) +rescale(This,Width,Height) + when is_record(This, wx_ref),is_integer(Width),is_integer(Height) -> + rescale(This,Width,Height, []). + +%% @spec (This::wxImage(), Width::integer(), Height::integer(), [Option]) -> wxImage() +%% Option = {quality, integer()} +%% @doc See external documentation. +rescale(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options) + when is_integer(Width),is_integer(Height),is_list(Options) -> + ?CLASS(ThisT,wxImage), + MOpts = fun({quality, Quality}, Acc) -> [<<1:32/?UI,Quality:32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:call(?wxImage_Rescale, + <>). + +%% @spec (This::wxImage(), Size::{W::integer(),H::integer()}, Pos::{X::integer(),Y::integer()}) -> wxImage() +%% @equiv resize(This,Size,Pos, []) +resize(This,Size={SizeW,SizeH},Pos={PosX,PosY}) + when is_record(This, wx_ref),is_integer(SizeW),is_integer(SizeH),is_integer(PosX),is_integer(PosY) -> + resize(This,Size,Pos, []). + +%% @spec (This::wxImage(), Size::{W::integer(),H::integer()}, Pos::{X::integer(),Y::integer()}, [Option]) -> wxImage() +%% Option = {r, integer()} | {g, integer()} | {b, integer()} +%% @doc See external documentation. +resize(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH},{PosX,PosY}, Options) + when is_integer(SizeW),is_integer(SizeH),is_integer(PosX),is_integer(PosY),is_list(Options) -> + ?CLASS(ThisT,wxImage), + MOpts = fun({r, R}, Acc) -> [<<1:32/?UI,R:32/?UI>>|Acc]; + ({g, G}, Acc) -> [<<2:32/?UI,G:32/?UI>>|Acc]; + ({b, B}, Acc) -> [<<3:32/?UI,B:32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:call(?wxImage_Resize, + <>). + +%% @spec (This::wxImage(), Angle::float(), Centre_of_rotation::{X::integer(),Y::integer()}) -> wxImage() +%% @equiv rotate(This,Angle,Centre_of_rotation, []) +rotate(This,Angle,Centre_of_rotation={Centre_of_rotationX,Centre_of_rotationY}) + when is_record(This, wx_ref),is_float(Angle),is_integer(Centre_of_rotationX),is_integer(Centre_of_rotationY) -> + rotate(This,Angle,Centre_of_rotation, []). + +%% @spec (This::wxImage(), Angle::float(), Centre_of_rotation::{X::integer(),Y::integer()}, [Option]) -> wxImage() +%% Option = {interpolating, bool()} | {offset_after_rotation, {X::integer(),Y::integer()}} +%% @doc See external documentation. +rotate(#wx_ref{type=ThisT,ref=ThisRef},Angle,{Centre_of_rotationX,Centre_of_rotationY}, Options) + when is_float(Angle),is_integer(Centre_of_rotationX),is_integer(Centre_of_rotationY),is_list(Options) -> + ?CLASS(ThisT,wxImage), + MOpts = fun({interpolating, Interpolating}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Interpolating)):32/?UI>>|Acc]; + ({offset_after_rotation, {Offset_after_rotationX,Offset_after_rotationY}}, Acc) -> [<<2:32/?UI,Offset_after_rotationX:32/?UI,Offset_after_rotationY:32/?UI,0:32>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:call(?wxImage_Rotate, + <>). + +%% @spec (This::wxImage(), Angle::float()) -> ok +%% @doc See external documentation. +rotateHue(#wx_ref{type=ThisT,ref=ThisRef},Angle) + when is_float(Angle) -> + ?CLASS(ThisT,wxImage), + wxe_util:cast(?wxImage_RotateHue, + <>). + +%% @spec (This::wxImage()) -> wxImage() +%% @equiv rotate90(This, []) +rotate90(This) + when is_record(This, wx_ref) -> + rotate90(This, []). + +%% @spec (This::wxImage(), [Option]) -> wxImage() +%% Option = {clockwise, bool()} +%% @doc See external documentation. +rotate90(#wx_ref{type=ThisT,ref=ThisRef}, Options) + when is_list(Options) -> + ?CLASS(ThisT,wxImage), + MOpts = fun({clockwise, Clockwise}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Clockwise)):32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:call(?wxImage_Rotate90, + <>). + +%% @spec (This::wxImage(), Name::string()) -> bool() +%% @doc See external documentation. +saveFile(#wx_ref{type=ThisT,ref=ThisRef},Name) + when is_list(Name) -> + ?CLASS(ThisT,wxImage), + Name_UC = unicode:characters_to_binary([Name,0]), + wxe_util:call(?wxImage_SaveFile_1, + <>). + +%% @spec (This::wxImage(),Name::string(),X::integer()|string()) -> bool() +%% @doc See external documentation. +%%
Alternatives: +%%

+%% saveFile(This::wxImage(), Name::string(), Type::integer()) -> bool() +%%

+%%

+%% saveFile(This::wxImage(), Name::string(), Mimetype::string()) -> bool() +%%

+saveFile(#wx_ref{type=ThisT,ref=ThisRef},Name,Type) + when is_list(Name),is_integer(Type) -> + ?CLASS(ThisT,wxImage), + Name_UC = unicode:characters_to_binary([Name,0]), + wxe_util:call(?wxImage_SaveFile_2_0, + <>); +saveFile(#wx_ref{type=ThisT,ref=ThisRef},Name,Mimetype) + when is_list(Name),is_list(Mimetype) -> + ?CLASS(ThisT,wxImage), + Name_UC = unicode:characters_to_binary([Name,0]), + Mimetype_UC = unicode:characters_to_binary([Mimetype,0]), + wxe_util:call(?wxImage_SaveFile_2_1, + <>). + +%% @spec (This::wxImage(), Width::integer(), Height::integer()) -> wxImage() +%% @equiv scale(This,Width,Height, []) +scale(This,Width,Height) + when is_record(This, wx_ref),is_integer(Width),is_integer(Height) -> + scale(This,Width,Height, []). + +%% @spec (This::wxImage(), Width::integer(), Height::integer(), [Option]) -> wxImage() +%% Option = {quality, integer()} +%% @doc See external documentation. +scale(#wx_ref{type=ThisT,ref=ThisRef},Width,Height, Options) + when is_integer(Width),is_integer(Height),is_list(Options) -> + ?CLASS(ThisT,wxImage), + MOpts = fun({quality, Quality}, Acc) -> [<<1:32/?UI,Quality:32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:call(?wxImage_Scale, + <>). + +%% @spec (This::wxImage(), Size::{W::integer(),H::integer()}, Pos::{X::integer(),Y::integer()}) -> wxImage() +%% @equiv size(This,Size,Pos, []) +size(This,Size={SizeW,SizeH},Pos={PosX,PosY}) + when is_record(This, wx_ref),is_integer(SizeW),is_integer(SizeH),is_integer(PosX),is_integer(PosY) -> + size(This,Size,Pos, []). + +%% @spec (This::wxImage(), Size::{W::integer(),H::integer()}, Pos::{X::integer(),Y::integer()}, [Option]) -> wxImage() +%% Option = {r, integer()} | {g, integer()} | {b, integer()} +%% @doc See external documentation. +size(#wx_ref{type=ThisT,ref=ThisRef},{SizeW,SizeH},{PosX,PosY}, Options) + when is_integer(SizeW),is_integer(SizeH),is_integer(PosX),is_integer(PosY),is_list(Options) -> + ?CLASS(ThisT,wxImage), + MOpts = fun({r, R}, Acc) -> [<<1:32/?UI,R:32/?UI>>|Acc]; + ({g, G}, Acc) -> [<<2:32/?UI,G:32/?UI>>|Acc]; + ({b, B}, Acc) -> [<<3:32/?UI,B:32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:call(?wxImage_Size, + <>). + +%% @spec (This::wxImage(), Alpha::binary()) -> ok +%% @equiv setAlpha(This,Alpha, []) +setAlpha(This,Alpha) + when is_record(This, wx_ref),is_binary(Alpha) -> + setAlpha(This,Alpha, []). + +%% @spec (This::wxImage(), Alpha::binary(), [Option]) -> ok +%% Option = {static_data, bool()} +%% @doc See external documentation. +setAlpha(#wx_ref{type=ThisT,ref=ThisRef},Alpha, Options) + when is_binary(Alpha),is_list(Options) -> + ?CLASS(ThisT,wxImage), + wxe_util:send_bin(Alpha), + MOpts = fun({static_data, Static_data}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Static_data)):32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:cast(?wxImage_SetAlpha_2, + <>). + +%% @spec (This::wxImage(), X::integer(), Y::integer(), Alpha::integer()) -> ok +%% @doc See external documentation. +setAlpha(#wx_ref{type=ThisT,ref=ThisRef},X,Y,Alpha) + when is_integer(X),is_integer(Y),is_integer(Alpha) -> + ?CLASS(ThisT,wxImage), + wxe_util:cast(?wxImage_SetAlpha_3, + <>). + +%% @spec (This::wxImage(), Data::binary()) -> ok +%% @equiv setData(This,Data, []) +setData(This,Data) + when is_record(This, wx_ref),is_binary(Data) -> + setData(This,Data, []). + +%% @spec (This::wxImage(), Data::binary(), [Option]) -> ok +%% Option = {static_data, bool()} +%% @doc See external documentation. +setData(#wx_ref{type=ThisT,ref=ThisRef},Data, Options) + when is_binary(Data),is_list(Options) -> + ?CLASS(ThisT,wxImage), + wxe_util:send_bin(Data), + MOpts = fun({static_data, Static_data}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Static_data)):32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:cast(?wxImage_SetData_2, + <>). + +%% @spec (This::wxImage(), Data::binary(), New_width::integer(), New_height::integer()) -> ok +%% @equiv setData(This,Data,New_width,New_height, []) +setData(This,Data,New_width,New_height) + when is_record(This, wx_ref),is_binary(Data),is_integer(New_width),is_integer(New_height) -> + setData(This,Data,New_width,New_height, []). + +%% @spec (This::wxImage(), Data::binary(), New_width::integer(), New_height::integer(), [Option]) -> ok +%% Option = {static_data, bool()} +%% @doc See external documentation. +setData(#wx_ref{type=ThisT,ref=ThisRef},Data,New_width,New_height, Options) + when is_binary(Data),is_integer(New_width),is_integer(New_height),is_list(Options) -> + ?CLASS(ThisT,wxImage), + wxe_util:send_bin(Data), + MOpts = fun({static_data, Static_data}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Static_data)):32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:cast(?wxImage_SetData_4, + <>). + +%% @spec (This::wxImage()) -> ok +%% @equiv setMask(This, []) +setMask(This) + when is_record(This, wx_ref) -> + setMask(This, []). + +%% @spec (This::wxImage(), [Option]) -> ok +%% Option = {mask, bool()} +%% @doc See external documentation. +setMask(#wx_ref{type=ThisT,ref=ThisRef}, Options) + when is_list(Options) -> + ?CLASS(ThisT,wxImage), + MOpts = fun({mask, Mask}, Acc) -> [<<1:32/?UI,(wxe_util:from_bool(Mask)):32/?UI>>|Acc]; + (BadOpt, _) -> erlang:error({badoption, BadOpt}) end, + BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)), + wxe_util:cast(?wxImage_SetMask, + <>). + +%% @spec (This::wxImage(), R::integer(), G::integer(), B::integer()) -> ok +%% @doc See external documentation. +setMaskColour(#wx_ref{type=ThisT,ref=ThisRef},R,G,B) + when is_integer(R),is_integer(G),is_integer(B) -> + ?CLASS(ThisT,wxImage), + wxe_util:cast(?wxImage_SetMaskColour, + <>). + +%% @spec (This::wxImage(), Mask::wxImage(), Mr::integer(), Mg::integer(), Mb::integer()) -> bool() +%% @doc See external documentation. +setMaskFromImage(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MaskT,ref=MaskRef},Mr,Mg,Mb) + when is_integer(Mr),is_integer(Mg),is_integer(Mb) -> + ?CLASS(ThisT,wxImage), + ?CLASS(MaskT,wxImage), + wxe_util:call(?wxImage_SetMaskFromImage, + <>). + +%% @spec (This::wxImage(),Name::string(),X::integer()|string()) -> ok +%% @doc See external documentation. +%%
Alternatives: +%%

+%% setOption(This::wxImage(), Name::string(), Value::integer()) -> ok +%%

+%%

+%% setOption(This::wxImage(), Name::string(), Value::string()) -> ok +%%

+setOption(#wx_ref{type=ThisT,ref=ThisRef},Name,Value) + when is_list(Name),is_integer(Value) -> + ?CLASS(ThisT,wxImage), + Name_UC = unicode:characters_to_binary([Name,0]), + wxe_util:cast(?wxImage_SetOption_2_0, + <>); +setOption(#wx_ref{type=ThisT,ref=ThisRef},Name,Value) + when is_list(Name),is_list(Value) -> + ?CLASS(ThisT,wxImage), + Name_UC = unicode:characters_to_binary([Name,0]), + Value_UC = unicode:characters_to_binary([Value,0]), + wxe_util:cast(?wxImage_SetOption_2_1, + <>). + +%% @spec (This::wxImage(), Palette::wxPalette:wxPalette()) -> ok +%% @doc See external documentation. +setPalette(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PaletteT,ref=PaletteRef}) -> + ?CLASS(ThisT,wxImage), + ?CLASS(PaletteT,wxPalette), + wxe_util:cast(?wxImage_SetPalette, + <>). + +%% @spec (This::wxImage(), Rect::{X::integer(),Y::integer(),W::integer(),H::integer()}, R::integer(), G::integer(), B::integer()) -> ok +%% @doc See external documentation. +setRGB(#wx_ref{type=ThisT,ref=ThisRef},{RectX,RectY,RectW,RectH},R,G,B) + when is_integer(RectX),is_integer(RectY),is_integer(RectW),is_integer(RectH),is_integer(R),is_integer(G),is_integer(B) -> + ?CLASS(ThisT,wxImage), + wxe_util:cast(?wxImage_SetRGB_4, + <>). + +%% @spec (This::wxImage(), X::integer(), Y::integer(), R::integer(), G::integer(), B::integer()) -> ok +%% @doc See external documentation. +setRGB(#wx_ref{type=ThisT,ref=ThisRef},X,Y,R,G,B) + when is_integer(X),is_integer(Y),is_integer(R),is_integer(G),is_integer(B) -> + ?CLASS(ThisT,wxImage), + wxe_util:cast(?wxImage_SetRGB_5, + <>). + +%% @spec (This::wxImage()) -> ok +%% @doc Destroys this object, do not use object again +destroy(Obj=#wx_ref{type=Type}) -> + ?CLASS(Type,wxImage), + wxe_util:destroy(?DESTROY_OBJECT,Obj), + ok. -- cgit v1.2.3