19#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1040 && defined(HAVE_PANGOCAIRO)
21static const void *memory_data_consumer_get_byte_pointer(
void *
info)
26CGDataProviderDirectCallbacks memory_data_provider_callbacks = {
28 memory_data_consumer_get_byte_pointer,
34static void quartz_format(
GVJ_t *job)
39 CGImageDestinationRef image_destination =
40 CGImageDestinationCreateWithDataConsumer(data_consumer,
44 const void *keys[] = {kCGImagePropertyDPIWidth, kCGImagePropertyDPIHeight};
45 const void *values[] = {
46 CFNumberCreate(
NULL, kCFNumberDoubleType, &job->
dpi.
x),
47 CFNumberCreate(
NULL, kCFNumberDoubleType, &job->
dpi.
y)
49 CFDictionaryRef dpi = CFDictionaryCreate(
NULL, keys, values,
50 sizeof(keys) /
sizeof(keys[0]),
51 &kCFTypeDictionaryKeyCallBacks,
52 &kCFTypeDictionaryValueCallBacks);
55 CGColorSpaceRef color_space = CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
56 CGImageRef
image = CGImageCreate (
63 kCGImageAlphaPremultipliedFirst|kCGBitmapByteOrder32Little,
67 kCGRenderingIntentDefault
69 CGImageDestinationAddImage(image_destination,
image, dpi);
70 CGImageDestinationFinalize(image_destination);
73 CGImageRelease(
image);
74 CGColorSpaceRelease(color_space);
75 CGDataProviderRelease(data_provider);
76 if (image_destination)
77 CFRelease(image_destination);
80 CGDataConsumerRelease(data_consumer);
98 {
FORMAT_BMP,
"bmp:cairo", 7, &quartz_engine, &device_features_quartz},
99 {
FORMAT_GIF,
"gif:cairo", 7, &quartz_engine, &device_features_quartz},
100 {
FORMAT_EXR,
"exr:cairo", 7, &quartz_engine, &device_features_quartz},
101 {
FORMAT_ICNS,
"icns:cairo", 7, &quartz_engine, &device_features_quartz},
102 {
FORMAT_ICO,
"ico:cairo", 7, &quartz_engine, &device_features_quartz},
103 {
FORMAT_JPEG,
"jpe:cairo", 7, &quartz_engine, &device_features_quartz},
104 {
FORMAT_JPEG,
"jpeg:cairo", 7, &quartz_engine, &device_features_quartz},
105 {
FORMAT_JPEG,
"jpg:cairo", 7, &quartz_engine, &device_features_quartz},
106 {
FORMAT_JPEG2000,
"jp2:cairo", 7, &quartz_engine, &device_features_quartz},
107 {
FORMAT_PICT,
"pct:cairo", 7, &quartz_engine, &device_features_quartz},
108 {
FORMAT_PICT,
"pict:cairo", 7, &quartz_engine, &device_features_quartz},
109 {
FORMAT_PNG,
"png:cairo", 7, &quartz_engine, &device_features_quartz},
110 {
FORMAT_PSD,
"psd:cairo", 7, &quartz_engine, &device_features_quartz},
111 {
FORMAT_SGI,
"sgi:cairo", 7, &quartz_engine, &device_features_quartz},
112 {
FORMAT_TIFF,
"tif:cairo", 7, &quartz_engine, &device_features_quartz},
113 {
FORMAT_TIFF,
"tiff:cairo", 7, &quartz_engine, &device_features_quartz},
114 {
FORMAT_TGA,
"tga:cairo", 7, &quartz_engine, &device_features_quartz},
Arithmetic helper functions.
#define GVDEVICE_DOES_TRUECOLOR
#define GVDEVICE_BINARY_FORMAT
CGDataConsumerCallbacks device_data_consumer_callbacks
static const int BITS_PER_COMPONENT
gvplugin_active_device_t device
unsigned char * imagedata
location of imagedata