Intermec ck1 Reference Guide
Chapter 5 — Nano-X APIs
266
CK1 SDK Programmer’s Reference Manual
GrDrawImageFromFile () (continued)
Parameters: id
Identification of the drawable to draw the image on
gc
Identification of the graphics context to use when drawing the
image
image
x
X coordinate to draw the image at relative to the drawable
y
Y coordinate to draw the image at relative to the drawable
width Maximum image width
height Maximum image height
path
String containing the file name of the image to load
flags
Flags specific to the particular image loader
GrLoadImageFromFile ()
Purpose: Load the specified image file into a newly created server image buffer and
return the identification of the buffer. The image type is automatically
detected using the magic numbers in the image header (i.e., the filename
extension is irrelevant). The currently supported image types include GIF,
JPEG, Windows BMP, PNG, XPM, and both ASCII and binary variants
of PBM, PGM, and PPM. However the image types supported by a
particular server depend on which image types were enabled in the server
configuration at build time.
detected using the magic numbers in the image header (i.e., the filename
extension is irrelevant). The currently supported image types include GIF,
JPEG, Windows BMP, PNG, XPM, and both ASCII and binary variants
of PBM, PGM, and PPM. However the image types supported by a
particular server depend on which image types were enabled in the server
configuration at build time.
Syntax:
GR_IMAGE_ID GrLoadImageFromFile (char *path,
int flags);
Parameters: path String containing the filename of the image to load
flags Flags specific to the particular image loader
Returns: Identification of the image buffer the image was loaded into
GrDrawImageToFit ()
Purpose: Draw the image from the specified image buffer at the specified position
on the specified drawable using the specified graphics context. The width
and height values specify the size of the image to draw. If the actual image
is a different size, it is scaled to fit.
and height values specify the size of the image to draw. If the actual image
is a different size, it is scaled to fit.
Syntax:
void GrDrawImageToFit (GR_DRAW_ID id,
GR_GC_ID gc,
GR_COORD x,
GR_COORD y,
GR_SIZE width,
GR_SIZE height,
GR_IMAGE_ID imageid);
GR_COORD x,
GR_COORD y,
GR_SIZE width,
GR_SIZE height,
GR_IMAGE_ID imageid);
Parameters: id
Identification of the drawable to draw the image on