Graphviz 13.0.0~dev.20250424.1043
Loading...
Searching...
No Matches
gvplugin_quartz.c
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (c) 2011 AT&T Intellectual Property
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * https://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors: Details at https://graphviz.org
9 *************************************************************************/
10
11#include "config.h"
12
13#include <common/types.h>
14#include <gvc/gvplugin.h>
15#include "gvplugin_quartz.h"
16#include <gvc/gvio.h>
17#include <TargetConditionals.h>
18
23
24#if !TARGET_OS_IPHONE
26#endif
27/* data consumer backed by the gvdevice */
28
29static size_t device_data_consumer_put_bytes (void *info, const void *buffer, size_t count)
30{
31 return gvwrite(info, buffer, count);
32}
33
38
40{
41 switch (format) {
42 case FORMAT_BMP:
43 return CFSTR("com.microsoft.bmp");
44 case FORMAT_EXR:
45 return CFSTR("com.ilm.openexr-image");
46 case FORMAT_GIF:
47 return CFSTR("com.compuserve.gif");
48 case FORMAT_ICNS:
49 return CFSTR("com.apple.icns");
50 case FORMAT_ICO:
51 return CFSTR("com.microsoft.ico");
52 case FORMAT_JPEG:
53 return CFSTR("public.jpeg");
54 case FORMAT_JPEG2000:
55 return CFSTR("public.jpeg-2000");
56 case FORMAT_PICT:
57 return CFSTR("com.apple.pict");
58 case FORMAT_PNG:
59 return CFSTR("public.png");
60 case FORMAT_PSD:
61 return CFSTR("com.adobe.photoshop-image");
62 case FORMAT_SGI:
63 return CFSTR("com.sgi.sgi-image");
64 case FORMAT_TIFF:
65 return CFSTR("public.tiff");
66 case FORMAT_TGA:
67 return CFSTR("com.truevision.tga-image");
68 default:
69 return NULL;
70 }
71}
72
73static gvplugin_api_t apis[] = {
74 {API_render, &gvrender_quartz_types},
75 {API_textlayout, &gvtextlayout_quartz_types},
76 {API_loadimage, &gvloadimage_quartz_types},
77 {API_device, &gvdevice_quartz_types},
78#if !TARGET_OS_IPHONE && defined(HAVE_PANGOCAIRO)
80#endif
81 {(api_t)0, 0},
82};
83
node NULL
Definition grammar.y:163
api_t
Definition gvcext.h:32
size_t gvwrite(GVJ_t *job, const char *s, size_t len)
Definition gvdevice.c:182
GVIO_API const char * format
Definition gvio.h:51
@ FORMAT_TIFF
@ FORMAT_BMP
static size_t device_data_consumer_put_bytes(void *info, const void *buffer, size_t count)
gvplugin_installed_t gvtextlayout_quartz_types
gvplugin_installed_t gvdevice_quartz_types_for_cairo
gvplugin_installed_t gvloadimage_quartz_types
gvplugin_installed_t gvrender_quartz_types
gvplugin_installed_t gvdevice_quartz_types
static gvplugin_api_t apis[]
gvplugin_library_t gvplugin_quartz_LTX_library
CGDataConsumerCallbacks device_data_consumer_callbacks
CFStringRef format_to_uti(format_type format)
@ FORMAT_ICO
@ FORMAT_PICT
@ FORMAT_EXR
@ FORMAT_JPEG2000
@ FORMAT_TGA
@ FORMAT_ICNS
@ FORMAT_PSD
@ FORMAT_SGI
format_type
@ FORMAT_JPEG
Definition gvrender_gd.c:37
@ FORMAT_GIF
Definition gvrender_gd.c:36
@ FORMAT_PNG
Definition gvrender_gd.c:38
ingroup plugin_api
Definition gvplugin.h:35
graphs, nodes and edges info: Agraphinfo_t, Agnodeinfo_t and Agedgeinfo_t