DECLARE FUNCTION DrawLine LIB "user32" ALIAS "DrawEdge" (hdc AS LONG,qrc AS QRECT,edge AS LONG,grfFlags AS LONG) AS LONG
TYPE QLine EXTENDS QCANVAS
PRIVATE:
r AS QRECT
SUB draw
IF (QLine.Align=0 AND QLine.Height>QLine.width) OR (QLine.Align=3) OR (QLine.Align=4) THEN
QLine.r.Left=0
QLine.r.Top=-1
QLine.r.Right=2
QLine.r.Bottom=QLine.Height
QLine.width=2
ELSEIF (QLine.Align=0 AND QLine.width>QLine.Height) OR (QLine.Align=1) OR (QLine.Align=2) THEN
QLine.r.Left=-1
QLine.r.Top=0
QLine.r.Right=QLine.width
QLine.r.Bottom=2
QLine.Height=2
END IF
DrawLine(QLine.handle,QLine.r,&h6,&h3)
END SUB
EVENT OnPaint
QLine.draw
END EVENT
CONSTRUCTOR
width=2
Height=2
END CONSTRUCTOR
END TYPE
|