TCanvas.CopyRect方法中参数CopyMode的意义
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了TCanvas.CopyRect方法中参数CopyMode的意义相关的知识,希望对你有一定的参考价值。
首先看可能取值:
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的意义的主要内容,如果未能解决你的问题,请参考以下文章
属性readwrite,readonly,assign,retain,copy,nonatomic 各是什么作用,在哪种情况下用?