blob: 92d4bb8ee10908fe4e7eaee093937bec1f667e95 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#include <sys/types.h>
#include <dirent.h>
#include <sys/stat.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include "ximtool.h"
#include "logo.h"
xim_displayLogo (xim)
register XimDataPtr xim;
{
register int i;
unsigned char r[256], g[256], b[256];
if (!xim || !xim->gt)
return;
/* Create the default colormap.
*/
for (i=0; i < 200; i++)
r[i] = g[i] = b[i] = (float)i / (float)(LOGO_NCOLORS) * 255;
/* Set the logical resolution of the display.
*/
GtSetLogRes (xim->gt, LOGO_XDIM, LOGO_YDIM);
if (xim_writeDisplay (xim, 1, "logo", logo_data,
LOGO_XDIM, LOGO_YDIM, r, g, b, LOGO_NCOLORS) < 0)
return;
}
|