Align  (Alinhamento)


Align determina como esse componente se alinha dentro do componente parent.

alNone = 0    
alTop = 1      
alBottom = 2
alLeft = 3      
alRight = 4   
                                                    alClient = 5  
'-- Expande  se ajustando ao cliente






















CopyMode

 
                                                       cmBlackness = 0   'Preenche o retângulo destino
                                                                               no canvas com prêto

                                                       cmDstInvert = 1
cmMergeCopy = 2 
cmMergePaint = 3 
cmNotSrcCopy = 4
cmNotSrcErase = 5
cmPatCopy = 6     
cmPatInvert = 7     
cmPatPaint = 8     
cmSrcAnd = 9       
                                              cmSrcCopy = 10   '
Copia a imagem fonte no canvas
cmSrcErase = 11  
cmSrcInvert = 12   
cmSrcPaint = 13   
                                                cmWhiteness = 14
'Preenche o retângulo de destino
                                                             no canvas com branco
















Cursor

                         crDefault = 0        ' Ponteiro normal
crNone = -1        
crArrow = -2       
crCross = -3       
crIBeam = -4      
crSize = -5         
crSizeNESW = -6
crSizeNS = -7    
crSizeNWSE = -8
crSizeWE = -9    
crUpArrow = -10  
crHourGlass = -11
crDrag = -12        
  crNoDrop = -13     
   crHSplit = -14        
crVSplit = -15     
crMultiDrag = -16
crSQLWait = -17
crNo = -18         
crAppStart = -19 
crHelp = -20       
crHandPoint = -21















CopyRect

Exemplo (copia QIMAGE para o canvas em 10,10):

DIM Destination AS QRECT
DIM Source AS QRECT     
DIM Image AS QIMAGE    
   Image.BMP = "whatever.bmp"

                    SUB CanvasPaint (Sender AS QCANVAS)
WITH Destination
.   Top = 10      
.   Left = 10     
.                       Right = .Left+Image.Width
.                          Bottom = .Top+Image.Height
END WITH        
    WITH Source        
.   Top = 0       
.   Left = 0      
.                      Right = Image.Width     
.                          Bottom = Image.Height     
END WITH      
                                                  Sender.CopyRect(Destination, image, Source)    
  END SUB                          

DIM Canvas AS QCANVAS
     Canvas.OnPaint = CanvasPaint
















          
Draw


BMP  pode ser qualquer propriedade BMP, de QBitmap, QImage, QImageList, etc.
Qualquer componente com a propriedade BMP está ok.

Exemplo:

DIM Image1 AS QIMAGE       
Image1.BMP = "whatever.bmp"
DIM Image2 AS QBITMAP     
Image2.BMP = "whatever.bmp"

                SUB CanvasPaint (Sender AS QCANVAS)
          Sender.Draw(0,               Sender.Draw(50, 50, Image2.BMP)
END SUB                               

DIM Canvas AS QCANVA      S

       Canvas.OnPaint = CanvasPaint