int PlotBitmap (int panelHandle, int controlID, double x, double y, double width, double height, char filename[]);
Plots a bitmapped image from a file onto a graph control.
The origin of the image is expressed in terms of the x and y coordinates of the graph. The origin pinpoints the lower left corner of the image.
Input | ||
Name | Type | Description |
panelHandle | integer | Specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel. |
controlID | integer | The defined constant, located in the .uir header file, that you assigned to the control in the User Interface Editor, or the ID returned by NewCtrl or DuplicateCtrl. |
x | double-precision | X-coordinate of the lower left corner of the bitmapped image. |
y | double-precision | Y-coordinate of the lower left corner of the bitmapped image. |
width | double-precision | Width, in graph units, of the area in which to fit the bitmapped image. If zero, then the width is the width of the image. If nonzero, the image stretches or shrinks to fit. When nonzero, width should be positive. If width is negative, the function interprets x as applying to the right edge instead of the left edge of the image. |
height | double-precision | Height, in graph units, of the area in which to fit the bitmap image. If zero, then the height is the height of the image. If nonzero, the image stretches or shrinks to fit. When nonzero, height should be positive. If height is negative, the function interprets y as applying to the top edge instead of the bottom edge of the image. |
filename | string | Name of the file that contains the image. filename can be a complete pathname or a simple filename. For simple filenames that contain no directory path, the file is loaded from the directory that contains the executable. Valid image types are .pcx, .bmp, .dib, .rle, .ico, .jpg, .png, .wmf, and .emf. Linux Valid image types are .pcx, .jpg, and .xwd. You can pass NULL or an empty string for filename. This capability is useful when you want to define the image at a later point in your program by calling SetCtrlBitmap on the plot handle this function returns. The plot is not visible until you specify a valid image. |
Name | Type | Description | ||||||
plotHandle | integer | The handle of the new plot that you can use in subsequent function calls to reference the plot. If the handle is positive, the new plot was successfully added to the graph. Negative values indicate that an error occurred.
|