aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/src/gen/wxGraphicsObject.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2012-02-16 13:55:08 +0100
committerDan Gudmundsson <[email protected]>2012-02-17 10:19:45 +0100
commit953ee650a80d863a85c99e82ef69501496db0ad6 (patch)
tree637e728152ec48479bc06275e0976250c47a1d23 /lib/wx/src/gen/wxGraphicsObject.erl
parent2e3260f90ce4cb595296a36fbd212578e10a7e94 (diff)
downloadotp-953ee650a80d863a85c99e82ef69501496db0ad6.tar.gz
otp-953ee650a80d863a85c99e82ef69501496db0ad6.tar.bz2
otp-953ee650a80d863a85c99e82ef69501496db0ad6.zip
[wx] Fix wxGraphicContext bugs
* Lines had wrong arguments * Change float() to number in guards, when packing arguments integers are converted floats to automaticly anyway.
Diffstat (limited to 'lib/wx/src/gen/wxGraphicsObject.erl')
-rw-r--r--lib/wx/src/gen/wxGraphicsObject.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/wx/src/gen/wxGraphicsObject.erl b/lib/wx/src/gen/wxGraphicsObject.erl
index e2e082ff91..b8b4be1dea 100644
--- a/lib/wx/src/gen/wxGraphicsObject.erl
+++ b/lib/wx/src/gen/wxGraphicsObject.erl
@@ -24,7 +24,7 @@
-module(wxGraphicsObject).
-include("wxe.hrl").
--export([getRenderer/1,isNull/1]).
+-export([destroy/1,getRenderer/1,isNull/1]).
%% inherited exports
-export([parent_class/1]).
@@ -50,3 +50,9 @@ isNull(#wx_ref{type=ThisT,ref=ThisRef}) ->
wxe_util:call(?wxGraphicsObject_IsNull,
<<ThisRef:32/?UI>>).
+%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxGraphicsObject) -> ok.
+destroy(Obj=#wx_ref{type=Type}) ->
+ ?CLASS(Type,wxGraphicsObject),
+ wxe_util:destroy(?DESTROY_OBJECT,Obj),
+ ok.