LineDDA的乙個例子

2021-03-31 08:56:59 字數 852 閱讀 2646

unit unit1;

inte***ce

uses

windows, messages, sysutils, variants, classes, graphics, controls, forms,

dialogs, extctrls, stdctrls, buttons;

type

tfmmain = class(tform)

procedure formpaint(sender: tobject);

end;

varfmmain: tfmmain;

a: byte;

implementation

uses math;

procedure c(x,y:integer; acanvas:tcanvas);stdcall;

begin

inc(a,2);

acanvas.pen.width := 5;

if odd(a mod 31) then

acanvas.pen.color := clwhite

else

acanvas.pen.color := clblack;

acanvas.moveto(x,y);

acanvas.li***o(x,y);

end;

procedure tfmmain.formpaint(sender: tobject);

begin

linedda(0,20,width,20,@c,longint(canvas));

linedda(0,0,width,height,@c,longint(canvas));

end;

end.

SQL GROUP CONCAT的乙個例子

我有乙個這樣的資料庫 user info 現在有乙個需求是把這樣 9 條記錄按照 username 來 group 成3條記錄 目標 shu female 201 lee male 202 yuki female 181 如果用select from user info group by usern...

explode的乙個例子

select level as level,explode split 1,2,3 as value 可以生成結果 level value level 1 level 2 level 3 lateral view 1.lateral view 用於和udtf函式 explode,split 結合來使...

row number over簡單的乙個例子

declare t table id int,tac varchar 2 tbc varchar 2 insert into t select 001,a b union all select 001,c m union all select 001,a c union all select 002...