Method XbpIcon():draw() Foundation
Displays an icon.
:draw( [<oTargetPS>] , ;
<aTargetRect> , ;
[<nState>] ) --> lSuccess
Constant | Description |
---|---|
XBP_STATE_NORMAL *) | Normal state; icon is drawn as saved on disk |
XBP_STATE_DISABLED | Icon is drawn shaded to indicate disabled state |
|
This method returns .T. (true) when the icon could be displayed, otherwise it returns .F. (false).
The :draw() method displays the an icon image in the specified presentation space. The area the image is displayed in can be set using the parameter <aTargetRect>. If the size of the area specified differs from the icon dimensions in members :xSize and :ySize, the icon is scaled.
Most icons use an internal mask to define transparent areas within the image. Method :draw() uses this information so that those areas are replaced with information from the underlying background.
Printing icons, using in segments: Printing icons is not supported under Windows. The same is true for rendering icons into graphical segments. If the presentation space in parameter <oTargetPS> is associated with an XbpPrinter object, or if a graphical segment is opened using function GraSegOpen(), method :draw() may produce undesired effects. Transparent areas in the icon may appear black, for example. A work-around for these limitation is suggested in the example below.
Example - 1
// Example for printing an icon
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.