Display the numeric information in the window
The code in Listing 5:
Listing 5. Display the numeric information in the window.
//Display the width and height of the bitmap and the
// window in the upper-left corner of the window.
char charArray[20];
sprintf(charArray, "%d", width);
textout_ex(screen,font,charArray,10,10,
makecol(255,255,255),-1);
sprintf(charArray, "%d", height);
textout_ex(screen,font,charArray,10,20,
makecol(255,255,255),-1);
sprintf(charArray, "%d", windowWidth);
textout_ex(screen,font,charArray,10,30,
makecol(255,255,255),-1);
sprintf(charArray, "%d", windowHeight);
textout_ex(screen,font,charArray,10,40,
makecol(255,255,255),-1);
|