华
华夏英才
Unregistered / Unconfirmed
GUEST, unregistred user!
如何定制pen.style的参数,使得线段端头呈方形,而不是圆形!且焦点呈斜角连接!
我是利用ExtCreatePen函数编程,但结果还是呈圆形!
procedure TMainForm.SetPenDefaults;
var mybrush:taglogbrush;
begin
mybrush.lbstyle:=BS_SOLID;
mybrush.lbColor:=DIB_PAL_COLORS;
mybrush.lbHatch:=HS_BDIAGONAL;
canvas.pen.Handle:=ExtCreatePen(PS_GEOMETRIC or 0 or PS_SOLID or PS_JOIN_BEVEL,
5,mybrush,0,nil);
with Canvas do
begin
MoveTo(100, yPos);
LineTo(ClientWidth, yPos);
end;
end;
高手最好能给我讲解一下此函数的冷僻参数用法,如SetMiterLimit 。
我是利用ExtCreatePen函数编程,但结果还是呈圆形!
procedure TMainForm.SetPenDefaults;
var mybrush:taglogbrush;
begin
mybrush.lbstyle:=BS_SOLID;
mybrush.lbColor:=DIB_PAL_COLORS;
mybrush.lbHatch:=HS_BDIAGONAL;
canvas.pen.Handle:=ExtCreatePen(PS_GEOMETRIC or 0 or PS_SOLID or PS_JOIN_BEVEL,
5,mybrush,0,nil);
with Canvas do
begin
MoveTo(100, yPos);
LineTo(ClientWidth, yPos);
end;
end;
高手最好能给我讲解一下此函数的冷僻参数用法,如SetMiterLimit 。