diff options
author | Dan Gudmundsson <[email protected]> | 2012-02-16 13:55:08 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2012-02-17 10:19:45 +0100 |
commit | 953ee650a80d863a85c99e82ef69501496db0ad6 (patch) | |
tree | 637e728152ec48479bc06275e0976250c47a1d23 /lib/wx/src/gen/wxGraphicsRenderer.erl | |
parent | 2e3260f90ce4cb595296a36fbd212578e10a7e94 (diff) | |
download | otp-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/wxGraphicsRenderer.erl')
-rw-r--r-- | lib/wx/src/gen/wxGraphicsRenderer.erl | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/wx/src/gen/wxGraphicsRenderer.erl b/lib/wx/src/gen/wxGraphicsRenderer.erl index b4b3e506e7..21082bde23 100644 --- a/lib/wx/src/gen/wxGraphicsRenderer.erl +++ b/lib/wx/src/gen/wxGraphicsRenderer.erl @@ -76,18 +76,18 @@ createBrush(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BrushT,ref=BrushRef}) - %% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsrenderer.html#wxgraphicsrenderercreatelineargradientbrush">external documentation</a>. -spec createLinearGradientBrush(This, X1, Y1, X2, Y2, C1, C2) -> wxGraphicsBrush:wxGraphicsBrush() when - This::wxGraphicsRenderer(), X1::float(), Y1::float(), X2::float(), Y2::float(), C1::wx:wx_colour(), C2::wx:wx_colour(). + This::wxGraphicsRenderer(), X1::number(), Y1::number(), X2::number(), Y2::number(), 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 -> + when is_number(X1),is_number(Y1),is_number(X2),is_number(Y2),tuple_size(C1) =:= 3; tuple_size(C1) =:= 4,tuple_size(C2) =:= 3; tuple_size(C2) =:= 4 -> ?CLASS(ThisT,wxGraphicsRenderer), wxe_util:call(?wxGraphicsRenderer_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>>). %% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsrenderer.html#wxgraphicsrenderercreateradialgradientbrush">external documentation</a>. -spec createRadialGradientBrush(This, Xo, Yo, Xc, Yc, Radius, OColor, CColor) -> wxGraphicsBrush:wxGraphicsBrush() when - This::wxGraphicsRenderer(), Xo::float(), Yo::float(), Xc::float(), Yc::float(), Radius::float(), OColor::wx:wx_colour(), CColor::wx:wx_colour(). + This::wxGraphicsRenderer(), Xo::number(), Yo::number(), Xc::number(), Yc::number(), Radius::number(), 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 -> + when is_number(Xo),is_number(Yo),is_number(Xc),is_number(Yc),is_number(Radius),tuple_size(OColor) =:= 3; tuple_size(OColor) =:= 4,tuple_size(CColor) =:= 3; tuple_size(CColor) =:= 4 -> ?CLASS(ThisT,wxGraphicsRenderer), wxe_util:call(?wxGraphicsRenderer_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>>). @@ -125,12 +125,12 @@ createMatrix(This) %% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicsrenderer.html#wxgraphicsrenderercreatematrix">external documentation</a>. -spec createMatrix(This, [Option]) -> wxGraphicsMatrix:wxGraphicsMatrix() when This::wxGraphicsRenderer(), - Option :: {a, float()} - | {b, float()} - | {c, float()} - | {d, float()} - | {tx, float()} - | {ty, float()}. + Option :: {a, number()} + | {b, number()} + | {c, number()} + | {d, number()} + | {tx, number()} + | {ty, number()}. createMatrix(#wx_ref{type=ThisT,ref=ThisRef}, Options) when is_list(Options) -> ?CLASS(ThisT,wxGraphicsRenderer), |