File: refresh_pixmap.c

package info (click to toggle)
garlic 1.6-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 4,516 kB
  • sloc: ansic: 52,465; makefile: 2,254
file content (52 lines) | stat: -rw-r--r-- 1,199 bytes parent folder | download | duplicates (6)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* Copyright (C) 2000 Damir Zucic */

/*=============================================================================

				refresh_pixmap.c

Purpose:
	Refresh pixmap (fill with given color).

Input:
	(1) Display structure pointer.
	(2) Pixmap ID.
	(3) Graphics context (GC).
	(4) Width of the area to be refreshed (left justified).
	(5) Height of the area to be refreshed (top justified).
	(6) Color ID.

Output:
	(1) Pixmap refreshed (filled with uniform color).
	(2) Return value.

Return value:
	(1) Always positive (trivial).

=============================================================================*/

#include <stdio.h>

#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xos.h>
#include <X11/Xatom.h>

#include "defines.h"
#include "typedefs.h"

/*======refresh pixmap (fill with given color):==============================*/

int RefreshPixmap_ (Display *displaySP, Pixmap pixmapID, GC theGC,
		    unsigned int width, unsigned int height,
		    unsigned long colorID)
{
XSetForeground (displaySP, theGC, colorID);

XFillRectangle (displaySP, pixmapID, theGC, 0, 0, width, height);

return 1;
}

/*===========================================================================*/