Method XbpBitmap():draw() Foundation
Displays a bitmap.
:draw( [<oTargetPS>] , ;
<aTargetRect> , ;
[<aSourceRect>], ;
[<nRasterOP>] , ;
[<nCompress>] , ;
[<nState>] ) --> lSuccess
Constant | Description |
---|---|
XBP_STATE_NORMAL *) | Normal state; bitmap is drawn as saved on disk |
XBP_STATE_DISABLED | Bitmap is drawn shaded to signify disabled state |
|
This method returns .T. (true) when the bitmap could be displayed, otherwise it returns .F. (false).
The :draw() method displays a raster image in the specified presentation space. The section of the image that is displayed can be set using the parameter <aSourceRect>. If <aTargetRect> is an array with only two elements, it specifies the position of the lower left corner of the bitmap. If it is an array containing four elements, the raster image is displayed in this area. If the size of the <aSourceRect> and <aTargetRect> areas are different, the bitmap is scaled.
The :draw() method accounts for a transparent color specified in the :transparentClr instance variable. If this contains a valid color, parts of the image that use this color are replaced with information from the underlying background. In addition, a blend operation with the background is performed, whenever member :transparency contains a value other than 0 (opaque).
A transparent color specified in the :transparentClr instance variable is ignored if the presentation space passed in <oTargetPS>is connected to a printer or file device context. The same applies if a graphical segment is currently open in the PS.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.