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.erl145
1 files changed, 72 insertions, 73 deletions
diff --git a/lib/wx/src/gen/wxGraphicsContext.erl b/lib/wx/src/gen/wxGraphicsContext.erl
index ddbfc92157..e786f8e368 100644
--- a/lib/wx/src/gen/wxGraphicsContext.erl
+++ b/lib/wx/src/gen/wxGraphicsContext.erl
@@ -29,13 +29,13 @@
-include("wxe.hrl").
-export([clip/2,clip/5,concatTransform/2,create/0,create/1,createBrush/2,createFont/2,
createFont/3,createLinearGradientBrush/7,createMatrix/1,createMatrix/2,
- createPath/1,createPen/2,createRadialGradientBrush/8,drawBitmap/6,
- drawEllipse/5,drawIcon/6,drawLines/3,drawLines/4,drawPath/2,drawPath/3,
+ createPath/1,createPen/2,createRadialGradientBrush/8,destroy/1,drawBitmap/6,
+ drawEllipse/5,drawIcon/6,drawLines/2,drawLines/3,drawPath/2,drawPath/3,
drawRectangle/5,drawRoundedRectangle/6,drawText/4,drawText/5,drawText/6,
fillPath/2,fillPath/3,getNativeContext/1,getPartialTextExtents/3,
getTextExtent/2,getTransform/1,resetClip/1,rotate/2,scale/3,setBrush/2,
- setFont/2,setFont/3,setPen/2,setTransform/2,strokeLine/5,strokeLines/3,
- strokeLines/4,strokePath/2,translate/3]).
+ setFont/2,setFont/3,setPen/2,setTransform/2,strokeLine/5,strokeLines/2,
+ strokePath/2,translate/3]).
%% inherited exports
-export([getRenderer/1,isNull/1,parent_class/1]).
@@ -85,18 +85,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_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().
+ This::wxGraphicsContext(), 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,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>>).
%% @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().
+ This::wxGraphicsContext(), 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,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>>).
@@ -134,12 +134,12 @@ createMatrix(This)
%% @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()}.
+ 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,wxGraphicsContext),
@@ -173,9 +173,9 @@ clip(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=RegionT,ref=RegionRef}) ->
%% @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().
+ This::wxGraphicsContext(), X::number(), Y::number(), W::number(), H::number().
clip(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
- when is_float(X),is_float(Y),is_float(W),is_float(H) ->
+ when is_number(X),is_number(Y),is_number(W),is_number(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>>).
@@ -190,9 +190,9 @@ resetClip(#wx_ref{type=ThisT,ref=ThisRef}) ->
%% @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().
+ This::wxGraphicsContext(), Bmp::wxBitmap:wxBitmap(), X::number(), Y::number(), W::number(), H::number().
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) ->
+ when is_number(X),is_number(Y),is_number(W),is_number(H) ->
?CLASS(ThisT,wxGraphicsContext),
?CLASS(BmpT,wxBitmap),
wxe_util:cast(?wxGraphicsContext_DrawBitmap,
@@ -200,43 +200,44 @@ drawBitmap(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=BmpT,ref=BmpRef},X,Y,W,H
%% @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().
+ This::wxGraphicsContext(), X::number(), Y::number(), W::number(), H::number().
drawEllipse(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
- when is_float(X),is_float(Y),is_float(W),is_float(H) ->
+ when is_number(X),is_number(Y),is_number(W),is_number(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>>).
%% @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().
+ This::wxGraphicsContext(), Icon::wxIcon:wxIcon(), X::number(), Y::number(), W::number(), H::number().
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) ->
+ when is_number(X),is_number(Y),is_number(W),is_number(H) ->
?CLASS(ThisT,wxGraphicsContext),
?CLASS(IconT,wxIcon),
wxe_util:cast(?wxGraphicsContext_DrawIcon,
<<ThisRef:32/?UI,IconRef:32/?UI,X:64/?F,Y:64/?F,W:64/?F,H:64/?F>>).
-%% @equiv drawLines(This,N,Points, [])
--spec drawLines(This, N, Points) -> ok when
- This::wxGraphicsContext(), N::integer(), Points::{X::float(), Y::float()}.
+%% @equiv drawLines(This,Points, [])
+-spec drawLines(This, Points) -> ok when
+ This::wxGraphicsContext(), 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, []).
+drawLines(This,Points)
+ when is_record(This, wx_ref),is_list(Points) ->
+ drawLines(This,Points, []).
%% @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()},
+-spec drawLines(This, Points, [Option]) -> ok when
+ This::wxGraphicsContext(), 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) ->
+drawLines(#wx_ref{type=ThisT,ref=ThisRef},Points, Options)
+ when is_list(Points),is_list(Options) ->
?CLASS(ThisT,wxGraphicsContext),
MOpts = fun({fillStyle, FillStyle}, Acc) -> [<<1:32/?UI,FillStyle:32/?UI>>|Acc];
(BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
wxe_util:cast(?wxGraphicsContext_DrawLines,
- <<ThisRef:32/?UI,N:32/?UI,PointsX:64/float,PointsY:64/float, BinOpt/binary>>).
+ <<ThisRef:32/?UI,(length(Points)):32/?UI,
+ (<< <<X:64/?F,Y:64/?F>> || {X,Y} <- Points>>)/binary, BinOpt/binary>>).
%% @equiv drawPath(This,Path, [])
-spec drawPath(This, Path) -> ok when
@@ -262,27 +263,27 @@ drawPath(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PathT,ref=PathRef}, Option
%% @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().
+ This::wxGraphicsContext(), X::number(), Y::number(), W::number(), H::number().
drawRectangle(#wx_ref{type=ThisT,ref=ThisRef},X,Y,W,H)
- when is_float(X),is_float(Y),is_float(W),is_float(H) ->
+ when is_number(X),is_number(Y),is_number(W),is_number(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>>).
%% @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().
+ This::wxGraphicsContext(), X::number(), Y::number(), W::number(), H::number(), Radius::number().
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) ->
+ when is_number(X),is_number(Y),is_number(W),is_number(H),is_number(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>>).
%% @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().
+ This::wxGraphicsContext(), Str::string(), X::number(), Y::number().
drawText(#wx_ref{type=ThisT,ref=ThisRef},Str,X,Y)
- when is_list(Str),is_float(X),is_float(Y) ->
+ when is_list(Str),is_number(X),is_number(Y) ->
?CLASS(ThisT,wxGraphicsContext),
Str_UC = unicode:characters_to_binary([Str,0]),
wxe_util:cast(?wxGraphicsContext_DrawText_3,
@@ -290,17 +291,17 @@ drawText(#wx_ref{type=ThisT,ref=ThisRef},Str,X,Y)
%% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxgraphicscontext.html#wxgraphicscontextdrawtext">external documentation</a>.
-spec drawText(This, Str, X, Y, Angle) -> ok when
- This::wxGraphicsContext(), Str::string(), X::float(), Y::float(), Angle::float();
+ This::wxGraphicsContext(), Str::string(), X::number(), Y::number(), Angle::number();
(This, Str, X, Y, BackgroundBrush) -> ok when
- This::wxGraphicsContext(), Str::string(), X::float(), Y::float(), BackgroundBrush::wxGraphicsBrush:wxGraphicsBrush().
+ This::wxGraphicsContext(), Str::string(), X::number(), Y::number(), 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) ->
+ when is_list(Str),is_number(X),is_number(Y),is_number(Angle) ->
?CLASS(ThisT,wxGraphicsContext),
Str_UC = unicode:characters_to_binary([Str,0]),
wxe_util:cast(?wxGraphicsContext_DrawText_4_0,
<<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>>);
drawText(#wx_ref{type=ThisT,ref=ThisRef},Str,X,Y,#wx_ref{type=BackgroundBrushT,ref=BackgroundBrushRef})
- when is_list(Str),is_float(X),is_float(Y) ->
+ when is_list(Str),is_number(X),is_number(Y) ->
?CLASS(ThisT,wxGraphicsContext),
Str_UC = unicode:characters_to_binary([Str,0]),
?CLASS(BackgroundBrushT,wxGraphicsBrush),
@@ -309,9 +310,9 @@ drawText(#wx_ref{type=ThisT,ref=ThisRef},Str,X,Y,#wx_ref{type=BackgroundBrushT,r
%% @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().
+ This::wxGraphicsContext(), Str::string(), X::number(), Y::number(), Angle::number(), 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) ->
+ when is_list(Str),is_number(X),is_number(Y),is_number(Angle) ->
?CLASS(ThisT,wxGraphicsContext),
Str_UC = unicode:characters_to_binary([Str,0]),
?CLASS(BackgroundBrushT,wxGraphicsBrush),
@@ -359,18 +360,18 @@ getNativeContext(#wx_ref{type=ThisT,ref=ThisRef}) ->
%% @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()].
+ This::wxGraphicsContext(), Text::string(), Widths::[number()].
getPartialTextExtents(#wx_ref{type=ThisT,ref=ThisRef},Text,Widths)
when is_list(Text),is_list(Widths) ->
?CLASS(ThisT,wxGraphicsContext),
Text_UC = unicode:characters_to_binary([Text,0]),
wxe_util:cast(?wxGraphicsContext_GetPartialTextExtents,
<<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>>).
+0:32, (<< <<C:64/?F>> || C <- Widths>>)/binary>>).
%% @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()},
+ Result ::{Width::number(), Height::number(), Descent::number(), ExternalLeading::number()},
This::wxGraphicsContext(), Text::string().
getTextExtent(#wx_ref{type=ThisT,ref=ThisRef},Text)
when is_list(Text) ->
@@ -381,27 +382,27 @@ getTextExtent(#wx_ref{type=ThisT,ref=ThisRef},Text)
%% @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().
+ This::wxGraphicsContext(), Angle::number().
rotate(#wx_ref{type=ThisT,ref=ThisRef},Angle)
- when is_float(Angle) ->
+ when is_number(Angle) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:cast(?wxGraphicsContext_Rotate,
<<ThisRef:32/?UI,0:32,Angle:64/?F>>).
%% @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().
+ This::wxGraphicsContext(), XScale::number(), YScale::number().
scale(#wx_ref{type=ThisT,ref=ThisRef},XScale,YScale)
- when is_float(XScale),is_float(YScale) ->
+ when is_number(XScale),is_number(YScale) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:cast(?wxGraphicsContext_Scale,
<<ThisRef:32/?UI,0:32,XScale:64/?F,YScale:64/?F>>).
%% @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().
+ This::wxGraphicsContext(), Dx::number(), Dy::number().
translate(#wx_ref{type=ThisT,ref=ThisRef},Dx,Dy)
- when is_float(Dx),is_float(Dy) ->
+ when is_number(Dx),is_number(Dy) ->
?CLASS(ThisT,wxGraphicsContext),
wxe_util:cast(?wxGraphicsContext_Translate,
<<ThisRef:32/?UI,0:32,Dx:64/?F,Dy:64/?F>>).
@@ -481,31 +482,29 @@ setPen(#wx_ref{type=ThisT,ref=ThisRef},#wx_ref{type=PenT,ref=PenRef}) ->
%% @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().
+ This::wxGraphicsContext(), X1::number(), Y1::number(), X2::number(), Y2::number().
strokeLine(#wx_ref{type=ThisT,ref=ThisRef},X1,Y1,X2,Y2)
- when is_float(X1),is_float(Y1),is_float(X2),is_float(Y2) ->
+ when is_number(X1),is_number(Y1),is_number(X2),is_number(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>>).
%% @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>>).
-
-%% @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),
- wxe_util:cast(?wxGraphicsContext_StrokeLines_3,
- <<ThisRef:32/?UI,N:32/?UI,BeginPointsX:64/float,BeginPointsY:64/float,EndPointsX:64/float,EndPointsY:64/float>>).
-
+-spec strokeLines(This, Points) -> ok when
+ This::wxGraphicsContext(), Points::[{X::float(), Y::float()}].
+strokeLines(#wx_ref{type=ThisT,ref=ThisRef},Points)
+ when is_list(Points) ->
+ ?CLASS(ThisT,wxGraphicsContext),
+ wxe_util:cast(?wxGraphicsContext_StrokeLines,
+ <<ThisRef:32/?UI,(length(Points)):32/?UI,
+ (<< <<X:64/?F,Y:64/?F>> || {X,Y} <- Points>>)/binary>>).
+
+%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxGraphicsContext) -> ok.
+destroy(Obj=#wx_ref{type=Type}) ->
+ ?CLASS(Type,wxGraphicsContext),
+ wxe_util:destroy(?DESTROY_OBJECT,Obj),
+ ok.
%% From wxGraphicsObject
%% @hidden
isNull(This) -> wxGraphicsObject:isNull(This).