Graphviz 12.0.1~dev.20240716.0800
Loading...
Searching...
No Matches
gvplugin_quartz.h
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#pragma once
12
13#include <Availability.h>
14
15#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
16#include <CoreGraphics/CoreGraphics.h>
17#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
18#include <ApplicationServices/ApplicationServices.h>
19#endif
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
43
44static const int BYTE_ALIGN = 15; /* align to 16 bytes */
45static const int BITS_PER_COMPONENT = 8; /* bits per color component */
46static const int BYTES_PER_PIXEL = 4; /* bytes per pixel */
47
48#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1040 || __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 40000
49CFStringRef format_to_uti(format_type format);
50#endif
51
52extern CGDataConsumerCallbacks device_data_consumer_callbacks;
53
54/* gvtextlayout_quartz.c in Mac OS X: layout is a CoreText CTLineRef */
55/* GVTextLayout.m in iPhoneOS: layout is a custom Objective-C GVTextLayout */
56
57void *quartz_new_layout(char* fontname, double fontsize, char* text);
58void quartz_size_layout(void *layout, double* width, double* height, double* yoffset_layout);
59void quartz_draw_layout(void *layout, CGContextRef context, CGPoint position);
61
62#ifdef __cplusplus
63}
64#endif
GVIO_API const char * format
Definition gvio.h:51
format_type
void quartz_draw_layout(void *layout, CGContextRef context, CGPoint position)
void * quartz_new_layout(char *fontname, double fontsize, char *text)
static const int BYTES_PER_PIXEL
static const int BYTE_ALIGN
void quartz_size_layout(void *layout, double *width, double *height, double *yoffset_layout)
static const int BITS_PER_COMPONENT
format_type
@ FORMAT_ICO
@ FORMAT_JPEG
@ FORMAT_PICT
@ FORMAT_TIFF
@ FORMAT_CGIMAGE
@ FORMAT_EXR
@ FORMAT_JPEG2000
@ FORMAT_NONE
@ FORMAT_PDF
@ FORMAT_BMP
@ FORMAT_TGA
@ FORMAT_GIF
@ FORMAT_ICNS
@ FORMAT_PSD
@ FORMAT_SGI
@ FORMAT_PNG
void quartz_free_layout(void *layout)
CGDataConsumerCallbacks device_data_consumer_callbacks
static int layout(graph_t *g, layout_info *infop)
Definition layout.c:809