Guidance
指路人
g.yi.org
software / rapidq / Examples / QObject / Object / QLine.inc

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
'=======================================================
' Type Objet
' Classe QLine version 1.0
'=======================================================
     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

    '==============================
    ' Méthode affichage ligne
    '==============================
      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

    '==============================
    ' Evénement OnPaint
    '==============================
      EVENT OnPaint
       QLine.draw
      END EVENT

      CONSTRUCTOR
       width=2
       Height=2
      END CONSTRUCTOR
     END TYPE
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Sat 2023-2-4  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2003-04-15 10:27:26