标签:
首先看可能取值:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
cmBlackness = BLACKNESS; cmDstInvert = DSTINVERT; cmMergeCopy = MERGECOPY; cmMergePaint = MERGEPAINT; cmNotSrcCopy = NOTSRCCOPY; cmNotSrcErase = NOTSRCERASE; cmPatCopy = PATCOPY; cmPatInvert = PATINVERT; cmPatPaint = PATPAINT; cmSrcAnd = SRCAND; cmSrcCopy = SRCCOPY; cmSrcErase = SRCERASE; cmSrcInvert = SRCINVERT; cmSrcPaint = SRCPAINT; cmWhiteness = WHITENESS; |
看效果.来点儿代码试一下:
1
2
3
4
5
6
7
8
9
10
11
12
|
procedure TForm3 . Button1Click(Sender: TObject); var RC1,RC2:TRect; begin RC1:=Rect( 0 , 0 ,img1 . Width,img1 . Height); RC2:=Rect( 0 , 0 ,img2 . Width,img2 . Height); with img2 . Canvas do begin CopyMode:=cmBlackness; //就改这个 CopyRect(RC1,img1 . Canvas,RC2); end ; end ; |
好.Bye
http://www.cnblogs.com/huangjacky/archive/2010/02/27/1674653.html
TCanvas.CopyRect方法中参数CopyMode的意义
标签:
原文地址:http://www.cnblogs.com/findumars/p/5185243.html