Graphviz
2.41.20171026.1811
Main Page
Data Structures
Files
File List
Globals
lib
gvc
gvtextlayout.c
Go to the documentation of this file.
1
/* $Id$ $Revision$ */
2
/* vim:set shiftwidth=4 ts=8: */
3
4
/*************************************************************************
5
* Copyright (c) 2011 AT&T Intellectual Property
6
* All rights reserved. This program and the accompanying materials
7
* are made available under the terms of the Eclipse Public License v1.0
8
* which accompanies this distribution, and is available at
9
* http://www.eclipse.org/legal/epl-v10.html
10
*
11
* Contributors: See CVS logs. Details at http://www.graphviz.org/
12
*************************************************************************/
13
14
/*
15
* textlayout engine wrapper
16
*/
17
18
#include "config.h"
19
20
#include "
const.h
"
21
#include "
gvplugin_textlayout.h
"
22
#include "
gvcint.h
"
23
#include "
gvcproc.h
"
24
25
int
gvtextlayout_select
(
GVC_t
*
gvc
)
26
{
27
gvplugin_available_t
*plugin;
28
gvplugin_installed_t
*typeptr;
29
30
plugin =
gvplugin_load
(gvc, API_textlayout,
"textlayout"
);
31
if
(plugin) {
32
typeptr = plugin->
typeptr
;
33
gvc->
textlayout
.
engine
= (
gvtextlayout_engine_t
*) (typeptr->
engine
);
34
return
GVRENDER_PLUGIN
;
/* FIXME - need more suitable success code */
35
}
36
return
NO_SUPPORT
;
37
}
38
39
boolean
gvtextlayout
(
GVC_t
*
gvc
,
textspan_t
*span,
char
**fontpath)
40
{
41
gvtextlayout_engine_t
*gvte = gvc->
textlayout
.
engine
;
42
43
if
(gvte && gvte->
textlayout
)
44
return
gvte->
textlayout
(span, fontpath);
45
return
FALSE
;
46
}
gvtextlayout
boolean gvtextlayout(GVC_t *gvc, textspan_t *span, char **fontpath)
Definition:
gvtextlayout.c:39
gvcint.h
GVRENDER_PLUGIN
#define GVRENDER_PLUGIN
Definition:
const.h:150
gvplugin_load
gvplugin_available_t * gvplugin_load(GVC_t *gvc, api_t api, const char *type)
Definition:
gvplugin.c:262
NO_SUPPORT
#define NO_SUPPORT
Definition:
const.h:151
GVC_s::textlayout
gvplugin_active_textlayout_t textlayout
Definition:
gvcint.h:97
gvtextlayout_engine_s
Definition:
gvplugin_textlayout.h:26
gvplugin_installed_t::engine
void * engine
Definition:
gvplugin.h:44
gvplugin_available_s
Definition:
gvcint.h:49
GVC_s
Definition:
gvcint.h:70
gvplugin_installed_t
Definition:
gvplugin.h:33
textspan_t
Definition:
textspan.h:58
gvplugin_active_textlayout_s::engine
gvtextlayout_engine_t * engine
Definition:
gvcint.h:36
gvtextlayout_select
int gvtextlayout_select(GVC_t *gvc)
Definition:
gvtextlayout.c:25
const.h
gvcproc.h
gvc
GVC_t * gvc
Definition:
htmlparse.c:87
gvplugin_textlayout.h
gvplugin_available_s::typeptr
gvplugin_installed_t * typeptr
Definition:
gvcint.h:55
FALSE
#define FALSE
Definition:
cgraph.h:35
gvtextlayout_engine_s::textlayout
boolean(* textlayout)(textspan_t *span, char **fontpath)
Definition:
gvplugin_textlayout.h:27
Generated by
1.8.5