aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/src/gen/wxGraphicsContext.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/wx/src/gen/wxGraphicsContext.erl')
-rw-r--r--lib/wx/src/gen/wxGraphicsContext.erl168
1 files changed, 110 insertions, 58 deletions
diff --git a/lib/wx/src/gen/wxGraphicsContext.erl b/lib/wx/src/gen/wxGraphicsContext.erl
index 05c56dd4b2..ddbfc92157 100644
--- a/lib/wx/src/gen/wxGraphicsContext.erl
+++ b/lib/wx/src/gen/wxGraphicsContext.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2012. 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
@@ -40,18 +40,21 @@
%% inherited exports
-export([getRenderer/1,isNull/1,parent_class/1]).
+-export_type([wxGraphicsContext/0]).
%% @hidden
parent_class(wxGraphicsObject) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
-%% @spec () -> wxGraphicsContext()
+-type wxGraphicsContext() :: wx:wx_object().
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextcreate">external documentation</a>.
+-spec create() -> wxGraphicsContext().
create() ->
wxe_util:call(?wxGraphicsContext_Create_0,
<<>>).
-%% @spec (Dc::wxWindowDC:wxWindowDC() | wxWindow:wxWindow()) -> wxGraphicsContext()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextcreate">external documentation</a>.
+-spec create(Dc) -> wxGraphicsContext() when
+ Dc::wxWindowDC:wxWindowDC() | wxWindow:wxWindow().
create(#wx_ref{type=DcT,ref=DcRef}) ->
DcOP = case ?CLASS_T(DcT,wxWindowDC) of
true ->
@@ -62,47 +65,54 @@ create(#wx_ref{type=DcT,ref=DcRef}) ->
wxe_util:call(DcOP,
<<DcRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Pen::wxPen:wxPen()) -> wxGraphicsPen:wxGraphicsPen()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextcreatepen">external documentation</a>.
+-spec createPen(This, Pen) -> wxGraphicsPen:wxGraphicsPen() when
+ This::wxGraphicsContext(), Pen::wxPen:wxPen().
createPen(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PenT,ref=PenRef}) ->
?CLASS(ThisT,wxGraphicsContext),
?CLASS(PenT,wxPen),
wxe_util:call(?wxGraphicsContext_CreatePen,
<<ThisRef:32/?UI,PenRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Brush::wxBrush:wxBrush()) -> wxGraphicsBrush:wxGraphicsBrush()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextcreatebrush">external documentation</a>.
+-spec createBrush(This, Brush) -> wxGraphicsBrush:wxGraphicsBrush() when
+ This::wxGraphicsContext(), Brush::wxBrush:wxBrush().
createBrush(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BrushT,ref=BrushRef}) ->
?CLASS(ThisT,wxGraphicsContext),
?CLASS(BrushT,wxBrush),
wxe_util:call(?wxGraphicsContext_CreateBrush,
<<ThisRef:32/?UI,BrushRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Xo::float(), Yo::float(), Xc::float(), Yc::float(), Radius::float(), OColor::wx:colour(), CColor::wx:colour()) -> wxGraphicsBrush:wxGraphicsBrush()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextcreateradialgradientbrush">external documentation</a>.
+-spec createRadialGradientBrush(This, Xo, Yo, Xc, Yc, Radius, OColor, CColor) -> wxGraphicsBrush:wxGraphicsBrush() when
+ This::wxGraphicsContext(), Xo::float(), Yo::float(), Xc::float(), Yc::float(), Radius::float(), OColor::wx:wx_colour(), CColor::wx:wx_colour().
createRadialGradientBrush(#wx_ref{type=ThisT,ref=ThisRef},Xo,Yo,Xc,Yc,Radius,OColor,CColor)
when is_float(Xo),is_float(Yo),is_float(Xc),is_float(Yc),is_float(Radius),tuple_size(OColor) =:= 3; tuple_size(OColor) =:= 4,tuple_size(CColor) =:= 3; tuple_size(CColor) =:= 4 ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:call(?wxGraphicsContext_CreateRadialGradientBrush,
<<ThisRef:32/?UI,0:32,Xo:64/?F,Yo:64/?F,Xc:64/?F,Yc:64/?F,Radius:64/?F,(wxe_util:colour_bin(OColor)):16/binary,(wxe_util:colour_bin(CColor)):16/binary>>).
-%% @spec (This::wxGraphicsContext(), X1::float(), Y1::float(), X2::float(), Y2::float(), C1::wx:colour(), C2::wx:colour()) -> wxGraphicsBrush:wxGraphicsBrush()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextcreatelineargradientbrush">external documentation</a>.
+-spec createLinearGradientBrush(This, X1, Y1, X2, Y2, C1, C2) -> wxGraphicsBrush:wxGraphicsBrush() when
+ This::wxGraphicsContext(), X1::float(), Y1::float(), X2::float(), Y2::float(), C1::wx:wx_colour(), C2::wx:wx_colour().
createLinearGradientBrush(#wx_ref{type=ThisT,ref=ThisRef},X1,Y1,X2,Y2,C1,C2)
when is_float(X1),is_float(Y1),is_float(X2),is_float(Y2),tuple_size(C1) =:= 3; tuple_size(C1) =:= 4,tuple_size(C2) =:= 3; tuple_size(C2) =:= 4 ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:call(?wxGraphicsContext_CreateLinearGradientBrush,
<<ThisRef:32/?UI,0:32,X1:64/?F,Y1:64/?F,X2:64/?F,Y2:64/?F,(wxe_util:colour_bin(C1)):16/binary,(wxe_util:colour_bin(C2)):16/binary>>).
-%% @spec (This::wxGraphicsContext(), Font::wxFont:wxFont()) -> wxGraphicsFont:wxGraphicsFont()
%% @equiv createFont(This,Font, [])
+-spec createFont(This, Font) -> wxGraphicsFont:wxGraphicsFont() when
+ This::wxGraphicsContext(), Font::wxFont:wxFont().
+
createFont(This,Font)
when is_record(This, wx_ref),is_record(Font, wx_ref) ->
createFont(This,Font, []).
-%% @spec (This::wxGraphicsContext(), Font::wxFont:wxFont(), [Option]) -> wxGraphicsFont:wxGraphicsFont()
-%% Option = {col, wx:colour()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextcreatefont">external documentation</a>.
+-spec createFont(This, Font, [Option]) -> wxGraphicsFont:wxGraphicsFont() when
+ This::wxGraphicsContext(), Font::wxFont:wxFont(),
+ Option :: {col, wx:wx_colour()}.
createFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -113,15 +123,23 @@ createFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}, Opti
wxe_util:call(?wxGraphicsContext_CreateFont,
<<ThisRef:32/?UI,FontRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxGraphicsContext()) -> wxGraphicsMatrix:wxGraphicsMatrix()
%% @equiv createMatrix(This, [])
+-spec createMatrix(This) -> wxGraphicsMatrix:wxGraphicsMatrix() when
+ This::wxGraphicsContext().
+
createMatrix(This)
when is_record(This, wx_ref) ->
createMatrix(This, []).
-%% @spec (This::wxGraphicsContext(), [Option]) -> wxGraphicsMatrix:wxGraphicsMatrix()
-%% Option = {a, float()} | {b, float()} | {c, float()} | {d, float()} | {tx, float()} | {ty, float()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextcreatematrix">external documentation</a>.
+-spec createMatrix(This, [Option]) -> wxGraphicsMatrix:wxGraphicsMatrix() when
+ This::wxGraphicsContext(),
+ Option :: {a, float()}
+ | {b, float()}
+ | {c, float()}
+ | {d, float()}
+ | {tx, float()}
+ | {ty, float()}.
createMatrix(#wx_ref{type=ThisT,ref=ThisRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -136,38 +154,43 @@ createMatrix(#wx_ref{type=ThisT,ref=ThisRef}, Options)
wxe_util:call(?wxGraphicsContext_CreateMatrix,
<<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
-%% @spec (This::wxGraphicsContext()) -> wxGraphicsPath:wxGraphicsPath()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextcreatepath">external documentation</a>.
+-spec createPath(This) -> wxGraphicsPath:wxGraphicsPath() when
+ This::wxGraphicsContext().
createPath(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:call(?wxGraphicsContext_CreatePath,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Region::wxRegion:wxRegion()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextclip">external documentation</a>.
+-spec clip(This, Region) -> ok when
+ This::wxGraphicsContext(), Region::wxRegion:wxRegion().
clip(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RegionT,ref=RegionRef}) ->
?CLASS(ThisT,wxGraphicsContext),
?CLASS(RegionT,wxRegion),
wxe_util:cast(?wxGraphicsContext_Clip_1,
<<ThisRef:32/?UI,RegionRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), X::float(), Y::float(), W::float(), H::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextclip">external documentation</a>.
+-spec clip(This, X, Y, W, H) -> ok when
+ This::wxGraphicsContext(), X::float(), Y::float(), W::float(), H::float().
clip(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
when is_float(X),is_float(Y),is_float(W),is_float(H) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:cast(?wxGraphicsContext_Clip_4,
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F,W:64/?F,H:64/?F>>).
-%% @spec (This::wxGraphicsContext()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextresetclip">external documentation</a>.
+-spec resetClip(This) -> ok when
+ This::wxGraphicsContext().
resetClip(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:cast(?wxGraphicsContext_ResetClip,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Bmp::wxBitmap:wxBitmap(), X::float(), Y::float(), W::float(), H::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextdrawbitmap">external documentation</a>.
+-spec drawBitmap(This, Bmp, X, Y, W, H) -> ok when
+ This::wxGraphicsContext(), Bmp::wxBitmap:wxBitmap(), X::float(), Y::float(), W::float(), H::float().
drawBitmap(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BmpT,ref=BmpRef},X,Y,W,H)
when is_float(X),is_float(Y),is_float(W),is_float(H) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -175,16 +198,18 @@ drawBitmap(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BmpT,ref=BmpRef},X,Y,W,H
wxe_util:cast(?wxGraphicsContext_DrawBitmap,
<<ThisRef:32/?UI,BmpRef:32/?UI,X:64/?F,Y:64/?F,W:64/?F,H:64/?F>>).
-%% @spec (This::wxGraphicsContext(), X::float(), Y::float(), W::float(), H::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextdrawellipse">external documentation</a>.
+-spec drawEllipse(This, X, Y, W, H) -> ok when
+ This::wxGraphicsContext(), X::float(), Y::float(), W::float(), H::float().
drawEllipse(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
when is_float(X),is_float(Y),is_float(W),is_float(H) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:cast(?wxGraphicsContext_DrawEllipse,
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F,W:64/?F,H:64/?F>>).
-%% @spec (This::wxGraphicsContext(), Icon::wxIcon:wxIcon(), X::float(), Y::float(), W::float(), H::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextdrawicon">external documentation</a>.
+-spec drawIcon(This, Icon, X, Y, W, H) -> ok when
+ This::wxGraphicsContext(), Icon::wxIcon:wxIcon(), X::float(), Y::float(), W::float(), H::float().
drawIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef},X,Y,W,H)
when is_float(X),is_float(Y),is_float(W),is_float(H) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -192,15 +217,18 @@ drawIcon(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=IconT,ref=IconRef},X,Y,W,H
wxe_util:cast(?wxGraphicsContext_DrawIcon,
<<ThisRef:32/?UI,IconRef:32/?UI,X:64/?F,Y:64/?F,W:64/?F,H:64/?F>>).
-%% @spec (This::wxGraphicsContext(), N::integer(), Points::{X::float(), Y::float()}) -> ok
%% @equiv drawLines(This,N,Points, [])
+-spec drawLines(This, N, Points) -> ok when
+ This::wxGraphicsContext(), N::integer(), Points::{X::float(), Y::float()}.
+
drawLines(This,N,Points={PointsX,PointsY})
when is_record(This, wx_ref),is_integer(N),is_number(PointsX),is_number(PointsY) ->
drawLines(This,N,Points, []).
-%% @spec (This::wxGraphicsContext(), N::integer(), Points::{X::float(), Y::float()}, [Option]) -> ok
-%% Option = {fillStyle, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextdrawlines">external documentation</a>.
+-spec drawLines(This, N, Points, [Option]) -> ok when
+ This::wxGraphicsContext(), N::integer(), Points::{X::float(), Y::float()},
+ Option :: {fillStyle, integer()}.
drawLines(#wx_ref{type=ThisT,ref=ThisRef},N,{PointsX,PointsY}, Options)
when is_integer(N),is_number(PointsX),is_number(PointsY),is_list(Options) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -210,15 +238,18 @@ drawLines(#wx_ref{type=ThisT,ref=ThisRef},N,{PointsX,PointsY}, Options)
wxe_util:cast(?wxGraphicsContext_DrawLines,
<<ThisRef:32/?UI,N:32/?UI,PointsX:64/float,PointsY:64/float, BinOpt/binary>>).
-%% @spec (This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath()) -> ok
%% @equiv drawPath(This,Path, [])
+-spec drawPath(This, Path) -> ok when
+ This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath().
+
drawPath(This,Path)
when is_record(This, wx_ref),is_record(Path, wx_ref) ->
drawPath(This,Path, []).
-%% @spec (This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath(), [Option]) -> ok
-%% Option = {fillStyle, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextdrawpath">external documentation</a>.
+-spec drawPath(This, Path, [Option]) -> ok when
+ This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath(),
+ Option :: {fillStyle, integer()}.
drawPath(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PathT,ref=PathRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -229,24 +260,27 @@ drawPath(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PathT,ref=PathRef}, Option
wxe_util:cast(?wxGraphicsContext_DrawPath,
<<ThisRef:32/?UI,PathRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxGraphicsContext(), X::float(), Y::float(), W::float(), H::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextdrawrectangle">external documentation</a>.
+-spec drawRectangle(This, X, Y, W, H) -> ok when
+ This::wxGraphicsContext(), X::float(), Y::float(), W::float(), H::float().
drawRectangle(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
when is_float(X),is_float(Y),is_float(W),is_float(H) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:cast(?wxGraphicsContext_DrawRectangle,
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F,W:64/?F,H:64/?F>>).
-%% @spec (This::wxGraphicsContext(), X::float(), Y::float(), W::float(), H::float(), Radius::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextdrawroundedrectangle">external documentation</a>.
+-spec drawRoundedRectangle(This, X, Y, W, H, Radius) -> ok when
+ This::wxGraphicsContext(), X::float(), Y::float(), W::float(), H::float(), Radius::float().
drawRoundedRectangle(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H,Radius)
when is_float(X),is_float(Y),is_float(W),is_float(H),is_float(Radius) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:cast(?wxGraphicsContext_DrawRoundedRectangle,
<<ThisRef:32/?UI,0:32,X:64/?F,Y:64/?F,W:64/?F,H:64/?F,Radius:64/?F>>).
-%% @spec (This::wxGraphicsContext(), Str::string(), X::float(), Y::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextdrawtext">external documentation</a>.
+-spec drawText(This, Str, X, Y) -> ok when
+ This::wxGraphicsContext(), Str::string(), X::float(), Y::float().
drawText(#wx_ref{type=ThisT,ref=ThisRef},Str,X,Y)
when is_list(Str),is_float(X),is_float(Y) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -254,15 +288,11 @@ drawText(#wx_ref{type=ThisT,ref=ThisRef},Str,X,Y)
wxe_util:cast(?wxGraphicsContext_DrawText_3,
<<ThisRef:32/?UI,(byte_size(Str_UC)):32/?UI,(Str_UC)/binary, 0:(((8- ((0+byte_size(Str_UC)) band 16#7)) band 16#7))/unit:8,X:64/?F,Y:64/?F>>).
-%% @spec (This::wxGraphicsContext(),Str::string(),X::float(),Y::float(),X::float()|term()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextdrawtext">external documentation</a>.
-%% <br /> Alternatives:
-%% <p><c>
-%% drawText(This::wxGraphicsContext(), Str::string(), X::float(), Y::float(), Angle::float()) -> ok </c>
-%% </p>
-%% <p><c>
-%% drawText(This::wxGraphicsContext(), Str::string(), X::float(), Y::float(), BackgroundBrush::wxGraphicsBrush:wxGraphicsBrush()) -> ok </c>
-%% </p>
+-spec drawText(This, Str, X, Y, Angle) -> ok when
+ This::wxGraphicsContext(), Str::string(), X::float(), Y::float(), Angle::float();
+ (This, Str, X, Y, BackgroundBrush) -> ok when
+ This::wxGraphicsContext(), Str::string(), X::float(), Y::float(), BackgroundBrush::wxGraphicsBrush:wxGraphicsBrush().
drawText(#wx_ref{type=ThisT,ref=ThisRef},Str,X,Y,Angle)
when is_list(Str),is_float(X),is_float(Y),is_float(Angle) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -277,8 +307,9 @@ drawText(#wx_ref{type=ThisT,ref=ThisRef},Str,X,Y,#wx_ref{type=BackgroundBrushT,r
wxe_util:cast(?wxGraphicsContext_DrawText_4_1,
<<ThisRef:32/?UI,(byte_size(Str_UC)):32/?UI,(Str_UC)/binary, 0:(((8- ((0+byte_size(Str_UC)) band 16#7)) band 16#7))/unit:8,X:64/?F,Y:64/?F,BackgroundBrushRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Str::string(), X::float(), Y::float(), Angle::float(), BackgroundBrush::wxGraphicsBrush:wxGraphicsBrush()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextdrawtext">external documentation</a>.
+-spec drawText(This, Str, X, Y, Angle, BackgroundBrush) -> ok when
+ This::wxGraphicsContext(), Str::string(), X::float(), Y::float(), Angle::float(), BackgroundBrush::wxGraphicsBrush:wxGraphicsBrush().
drawText(#wx_ref{type=ThisT,ref=ThisRef},Str,X,Y,Angle,#wx_ref{type=BackgroundBrushT,ref=BackgroundBrushRef})
when is_list(Str),is_float(X),is_float(Y),is_float(Angle) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -287,15 +318,18 @@ drawText(#wx_ref{type=ThisT,ref=ThisRef},Str,X,Y,Angle,#wx_ref{type=BackgroundBr
wxe_util:cast(?wxGraphicsContext_DrawText_5,
<<ThisRef:32/?UI,(byte_size(Str_UC)):32/?UI,(Str_UC)/binary, 0:(((8- ((0+byte_size(Str_UC)) band 16#7)) band 16#7))/unit:8,X:64/?F,Y:64/?F,Angle:64/?F,BackgroundBrushRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath()) -> ok
%% @equiv fillPath(This,Path, [])
+-spec fillPath(This, Path) -> ok when
+ This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath().
+
fillPath(This,Path)
when is_record(This, wx_ref),is_record(Path, wx_ref) ->
fillPath(This,Path, []).
-%% @spec (This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath(), [Option]) -> ok
-%% Option = {fillStyle, integer()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextfillpath">external documentation</a>.
+-spec fillPath(This, Path, [Option]) -> ok when
+ This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath(),
+ Option :: {fillStyle, integer()}.
fillPath(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PathT,ref=PathRef}, Options)
when is_list(Options) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -306,23 +340,26 @@ fillPath(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PathT,ref=PathRef}, Option
wxe_util:cast(?wxGraphicsContext_FillPath,
<<ThisRef:32/?UI,PathRef:32/?UI, BinOpt/binary>>).
-%% @spec (This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextstrokepath">external documentation</a>.
+-spec strokePath(This, Path) -> ok when
+ This::wxGraphicsContext(), Path::wxGraphicsPath:wxGraphicsPath().
strokePath(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PathT,ref=PathRef}) ->
?CLASS(ThisT,wxGraphicsContext),
?CLASS(PathT,wxGraphicsPath),
wxe_util:cast(?wxGraphicsContext_StrokePath,
<<ThisRef:32/?UI,PathRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextgetnativecontext">external documentation</a>.
+-spec getNativeContext(This) -> ok when
+ This::wxGraphicsContext().
getNativeContext(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:cast(?wxGraphicsContext_GetNativeContext,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Text::string(), Widths::[float()]) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextgetpartialtextextents">external documentation</a>.
+-spec getPartialTextExtents(This, Text, Widths) -> ok when
+ This::wxGraphicsContext(), Text::string(), Widths::[float()].
getPartialTextExtents(#wx_ref{type=ThisT,ref=ThisRef},Text,Widths)
when is_list(Text),is_list(Widths) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -331,8 +368,10 @@ getPartialTextExtents(#wx_ref{type=ThisT,ref=ThisRef},Text,Widths)
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8,(length(Widths)):32/?UI,
0:32, (<< <<C:64/float>> || C <- Widths>>)/binary>>).
-%% @spec (This::wxGraphicsContext(), Text::string()) -> {Width::float(), Height::float(), Descent::float(), ExternalLeading::float()}
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextgettextextent">external documentation</a>.
+-spec getTextExtent(This, Text) -> Result when
+ Result ::{Width::float(), Height::float(), Descent::float(), ExternalLeading::float()},
+ This::wxGraphicsContext(), Text::string().
getTextExtent(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
?CLASS(ThisT,wxGraphicsContext),
@@ -340,55 +379,62 @@ getTextExtent(#wx_ref{type=ThisT,ref=ThisRef},Text)
wxe_util:call(?wxGraphicsContext_GetTextExtent,
<<ThisRef:32/?UI,(byte_size(Text_UC)):32/?UI,(Text_UC)/binary, 0:(((8- ((0+byte_size(Text_UC)) band 16#7)) band 16#7))/unit:8>>).
-%% @spec (This::wxGraphicsContext(), Angle::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextrotate">external documentation</a>.
+-spec rotate(This, Angle) -> ok when
+ This::wxGraphicsContext(), Angle::float().
rotate(#wx_ref{type=ThisT,ref=ThisRef},Angle)
when is_float(Angle) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:cast(?wxGraphicsContext_Rotate,
<<ThisRef:32/?UI,0:32,Angle:64/?F>>).
-%% @spec (This::wxGraphicsContext(), XScale::float(), YScale::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextscale">external documentation</a>.
+-spec scale(This, XScale, YScale) -> ok when
+ This::wxGraphicsContext(), XScale::float(), YScale::float().
scale(#wx_ref{type=ThisT,ref=ThisRef},XScale,YScale)
when is_float(XScale),is_float(YScale) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:cast(?wxGraphicsContext_Scale,
<<ThisRef:32/?UI,0:32,XScale:64/?F,YScale:64/?F>>).
-%% @spec (This::wxGraphicsContext(), Dx::float(), Dy::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontexttranslate">external documentation</a>.
+-spec translate(This, Dx, Dy) -> ok when
+ This::wxGraphicsContext(), Dx::float(), Dy::float().
translate(#wx_ref{type=ThisT,ref=ThisRef},Dx,Dy)
when is_float(Dx),is_float(Dy) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:cast(?wxGraphicsContext_Translate,
<<ThisRef:32/?UI,0:32,Dx:64/?F,Dy:64/?F>>).
-%% @spec (This::wxGraphicsContext()) -> wxGraphicsMatrix:wxGraphicsMatrix()
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextgettransform">external documentation</a>.
+-spec getTransform(This) -> wxGraphicsMatrix:wxGraphicsMatrix() when
+ This::wxGraphicsContext().
getTransform(#wx_ref{type=ThisT,ref=ThisRef}) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:call(?wxGraphicsContext_GetTransform,
<<ThisRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Matrix::wxGraphicsMatrix:wxGraphicsMatrix()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextsettransform">external documentation</a>.
+-spec setTransform(This, Matrix) -> ok when
+ This::wxGraphicsContext(), Matrix::wxGraphicsMatrix:wxGraphicsMatrix().
setTransform(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MatrixT,ref=MatrixRef}) ->
?CLASS(ThisT,wxGraphicsContext),
?CLASS(MatrixT,wxGraphicsMatrix),
wxe_util:cast(?wxGraphicsContext_SetTransform,
<<ThisRef:32/?UI,MatrixRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Matrix::wxGraphicsMatrix:wxGraphicsMatrix()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextconcattransform">external documentation</a>.
+-spec concatTransform(This, Matrix) -> ok when
+ This::wxGraphicsContext(), Matrix::wxGraphicsMatrix:wxGraphicsMatrix().
concatTransform(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=MatrixT,ref=MatrixRef}) ->
?CLASS(ThisT,wxGraphicsContext),
?CLASS(MatrixT,wxGraphicsMatrix),
wxe_util:cast(?wxGraphicsContext_ConcatTransform,
<<ThisRef:32/?UI,MatrixRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Brush::wxGraphicsBrush:wxGraphicsBrush() | wxBrush:wxBrush()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextsetbrush">external documentation</a>.
+-spec setBrush(This, Brush) -> ok when
+ This::wxGraphicsContext(), Brush::wxGraphicsBrush:wxGraphicsBrush() | wxBrush:wxBrush().
setBrush(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BrushT,ref=BrushRef}) ->
?CLASS(ThisT,wxGraphicsContext),
BrushOP = case ?CLASS_T(BrushT,wxGraphicsBrush) of
@@ -400,16 +446,18 @@ setBrush(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BrushT,ref=BrushRef}) ->
wxe_util:cast(BrushOP,
<<ThisRef:32/?UI,BrushRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Font::wxGraphicsFont:wxGraphicsFont()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextsetfont">external documentation</a>.
+-spec setFont(This, Font) -> ok when
+ This::wxGraphicsContext(), Font::wxGraphicsFont:wxGraphicsFont().
setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef}) ->
?CLASS(ThisT,wxGraphicsContext),
?CLASS(FontT,wxGraphicsFont),
wxe_util:cast(?wxGraphicsContext_SetFont_1,
<<ThisRef:32/?UI,FontRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), Font::wxFont:wxFont(), Colour::wx:colour()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextsetfont">external documentation</a>.
+-spec setFont(This, Font, Colour) -> ok when
+ This::wxGraphicsContext(), Font::wxFont:wxFont(), Colour::wx:wx_colour().
setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef},Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
?CLASS(ThisT,wxGraphicsContext),
@@ -417,8 +465,9 @@ setFont(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=FontT,ref=FontRef},Colour)
wxe_util:cast(?wxGraphicsContext_SetFont_2,
<<ThisRef:32/?UI,FontRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
-%% @spec (This::wxGraphicsContext(), Pen::wxPen:wxPen() | wxGraphicsPen:wxGraphicsPen()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextsetpen">external documentation</a>.
+-spec setPen(This, Pen) -> ok when
+ This::wxGraphicsContext(), Pen::wxPen:wxPen() | wxGraphicsPen:wxGraphicsPen().
setPen(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PenT,ref=PenRef}) ->
?CLASS(ThisT,wxGraphicsContext),
PenOP = case ?CLASS_T(PenT,wxPen) of
@@ -430,24 +479,27 @@ setPen(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PenT,ref=PenRef}) ->
wxe_util:cast(PenOP,
<<ThisRef:32/?UI,PenRef:32/?UI>>).
-%% @spec (This::wxGraphicsContext(), X1::float(), Y1::float(), X2::float(), Y2::float()) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextstrokeline">external documentation</a>.
+-spec strokeLine(This, X1, Y1, X2, Y2) -> ok when
+ This::wxGraphicsContext(), X1::float(), Y1::float(), X2::float(), Y2::float().
strokeLine(#wx_ref{type=ThisT,ref=ThisRef},X1,Y1,X2,Y2)
when is_float(X1),is_float(Y1),is_float(X2),is_float(Y2) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:cast(?wxGraphicsContext_StrokeLine,
<<ThisRef:32/?UI,0:32,X1:64/?F,Y1:64/?F,X2:64/?F,Y2:64/?F>>).
-%% @spec (This::wxGraphicsContext(), N::integer(), Points::{X::float(), Y::float()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextstrokelines">external documentation</a>.
+-spec strokeLines(This, N, Points) -> ok when
+ This::wxGraphicsContext(), N::integer(), Points::{X::float(), Y::float()}.
strokeLines(#wx_ref{type=ThisT,ref=ThisRef},N,{PointsX,PointsY})
when is_integer(N),is_number(PointsX),is_number(PointsY) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:cast(?wxGraphicsContext_StrokeLines_2,
<<ThisRef:32/?UI,N:32/?UI,PointsX:64/float,PointsY:64/float>>).
-%% @spec (This::wxGraphicsContext(), N::integer(), BeginPoints::{X::float(), Y::float()}, EndPoints::{X::float(), Y::float()}) -> ok
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextstrokelines">external documentation</a>.
+-spec strokeLines(This, N, BeginPoints, EndPoints) -> ok when
+ This::wxGraphicsContext(), N::integer(), BeginPoints::{X::float(), Y::float()}, EndPoints::{X::float(), Y::float()}.
strokeLines(#wx_ref{type=ThisT,ref=ThisRef},N,{BeginPointsX,BeginPointsY},{EndPointsX,EndPointsY})
when is_integer(N),is_number(BeginPointsX),is_number(BeginPointsY),is_number(EndPointsX),is_number(EndPointsY) ->
?CLASS(ThisT,wxGraphicsContext),