summaryrefslogtreecommitdiff
path: root/common/drawable_desc.c
blob: a7e4237cd7a8fe854810979dd04cd6f5d58c385d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#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;
}