bounds:Returns the TRect for a rectangle of given dimensions.function Bounds(ALeft, ATop, AWidth, AHeight: Integer): TRect;DescriptionCall Bounds to obtain a TRect for a rectangle with upper left corner at the point (ALeft, ATop) with width AWidth and height AHeight.
判断的应该是pbitmap指向的不为空则往pcanvas中画图
相当于
if(NULL!=pbitmap){...}if(pbitmap)是判断啥的啊?
判断pbitmap是否为不空的指针bounds()是啥?
bounds()是把四个整型数合成一个TRect类型的值,呀呀,不知道在BCB中是怎么定义的。请问pcanvas->brushcopy()这方法是怎么定义的啊,啥用?
TCanvas::BrushCopy()在Delphi中叫TCanvas.BrushCopy:
procedure BrushCopy(const Dest: TRect; Bitmap: TBitmap; const Source: TRect; Color: TColor);
void BrushCopy( const TRect &Dest, TBitmap &Bitmap, cosnt TRect &Source, TColor Color ); // 在BCB中是不是这样定义的,我只是瞎猜的,猜不对不要打我,我会解释Delphi版本的。
从位图Bitmap的一个矩形范围(Source)中复制到这个Canvas的一个矩形范围(Dest),其中在Bitmap中颜色值为Color的象素将会用这个Canvas的Brush(画刷)来代替。就是说用Canvas.Brush来画颜色值等于Color参数的值的部分,当然仅仅在Dest矩形块中。