summaryrefslogtreecommitdiff
path: root/common/drawable_desc.c
blob: 2813ebfd6d6335a07ed6474d7f4a7e8937ff03ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <stdio.h>

#include "pixmaputil.h"

char *drawable_desc(DrawablePtr pDraw, char *str, size_t n)
{
	if (!pDraw)
		snprintf(str, n, "None");
	else
		snprintf(str, n, "%p: %d (%dx%d+%d+%d)",
			 pDraw, pDraw->bitsPerPixel,
			 pDraw->width, pDraw->height, pDraw->x, pDraw->y);

	return str;
}