17#include <TargetConditionals.h>
20#if !TARGET_OS_IPHONE && defined(HAVE_PANGOCAIRO)
22static const void *memory_data_consumer_get_byte_pointer(
void *
info)
27CGDataProviderDirectCallbacks memory_data_provider_callbacks = {
29 memory_data_consumer_get_byte_pointer,
35static void quartz_format(
GVJ_t *job)
40 CGImageDestinationRef image_destination =
41 CGImageDestinationCreateWithDataConsumer(data_consumer,
45 CFStringRef keys[] = {kCGImagePropertyDPIWidth, kCGImagePropertyDPIHeight};
46 CFNumberRef values[] = {
47 CFNumberCreate(
NULL, kCFNumberDoubleType, &job->
dpi.
x),
48 CFNumberCreate(
NULL, kCFNumberDoubleType, &job->
dpi.
y)
50 CFDictionaryRef dpi = CFDictionaryCreate(
NULL, (
const void **)keys,
51 (
const void **)values,
52 sizeof(keys) /
sizeof(keys[0]),
53 &kCFTypeDictionaryKeyCallBacks,
54 &kCFTypeDictionaryValueCallBacks);
57 CGColorSpaceRef color_space = CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
58 CGImageRef
image = CGImageCreate (
65 kCGImageAlphaPremultipliedFirst|kCGBitmapByteOrder32Little,
69 kCGRenderingIntentDefault
71 CGImageDestinationAddImage(image_destination,
image, dpi);
72 CGImageDestinationFinalize(image_destination);
75 CGImageRelease(
image);
76 CGColorSpaceRelease(color_space);
77 CGDataProviderRelease(data_provider);
78 if (image_destination)
79 CFRelease(image_destination);
82 CGDataConsumerRelease(data_consumer);
Arithmetic helper functions.
#define GVDEVICE_DOES_TRUECOLOR
#define GVDEVICE_BINARY_FORMAT
gvplugin_installed_t gvdevice_quartz_types_for_cairo
CGDataConsumerCallbacks device_data_consumer_callbacks
CFStringRef format_to_uti(format_type format)
static const int BITS_PER_COMPONENT
static gvdevice_features_t device_features_quartz
gvplugin_active_device_t device
unsigned char * imagedata
location of imagedata