mirror of
https://salsa.debian.org/xorg-team/lib/pixman
synced 2025-09-02 03:38:55 +00:00

The Microsoft C compiler cannot handle subobject initialization and Win32 does not provide snprintf. Work around these limitations by using normal struct initialization and using sprintf (a manual check shows that the buffer size is sufficient).
28 lines
424 B
C
28 lines
424 B
C
#include <stdlib.h>
|
|
#include <pixman.h>
|
|
|
|
int
|
|
main()
|
|
{
|
|
pixman_image_t *dst;
|
|
pixman_trapezoid_t traps[1] = {
|
|
{
|
|
2147483646,
|
|
2147483647,
|
|
{
|
|
{ 0, 0 },
|
|
{ 0, 2147483647 }
|
|
},
|
|
{
|
|
{ 65536, 0 },
|
|
{ 0, 2147483647 }
|
|
}
|
|
},
|
|
};
|
|
|
|
dst = pixman_image_create_bits (PIXMAN_a8, 1, 1, NULL, -1);
|
|
|
|
pixman_add_trapezoids (dst, 0, 0, sizeof (traps)/sizeof (traps[0]), traps);
|
|
return (0);
|
|
}
|