Graphviz
13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
gvtextlayout.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
/*
12
* textlayout engine wrapper
13
*/
14
15
#include "config.h"
16
17
#include <
common/const.h
>
18
#include <
gvc/gvplugin_textlayout.h
>
19
#include <
gvc/gvcint.h
>
20
#include <
gvc/gvcproc.h
>
21
#include <stdbool.h>
22
#include <stdio.h>
23
24
int
gvtextlayout_select
(
GVC_t
*
gvc
)
25
{
26
gvplugin_available_t
*plugin;
27
gvplugin_installed_t
*typeptr;
28
29
plugin =
gvplugin_load
(
gvc
, API_textlayout,
"textlayout"
,
NULL
);
30
if
(plugin) {
31
typeptr = plugin->
typeptr
;
32
gvc
->
textlayout
.
engine
= typeptr->
engine
;
33
return
GVRENDER_PLUGIN
;
/* FIXME - need more suitable success code */
34
}
35
return
NO_SUPPORT
;
36
}
37
38
bool
gvtextlayout
(
GVC_t
*
gvc
,
textspan_t
*span,
char
**fontpath)
39
{
40
gvtextlayout_engine_t
*gvte =
gvc
->
textlayout
.
engine
;
41
42
if
(gvte && gvte->
textlayout
)
43
return
gvte->
textlayout
(span, fontpath);
44
return
false
;
45
}
const.h
NO_SUPPORT
#define NO_SUPPORT
Definition
const.h:147
GVRENDER_PLUGIN
#define GVRENDER_PLUGIN
Definition
const.h:146
NULL
node NULL
Definition
grammar.y:163
gvc
static GVC_t * gvc
Definition
gv.cpp:23
gvcint.h
gvcproc.h
gvplugin_load
gvplugin_available_t * gvplugin_load(GVC_t *gvc, api_t api, const char *type, FILE *debug)
Definition
gvplugin.c:250
gvplugin_textlayout.h
gvtextlayout_select
int gvtextlayout_select(GVC_t *gvc)
Definition
gvtextlayout.c:24
gvtextlayout
bool gvtextlayout(GVC_t *gvc, textspan_t *span, char **fontpath)
Definition
gvtextlayout.c:38
GVC_s
Definition
gvcint.h:80
GVC_s::textlayout
gvplugin_active_textlayout_t textlayout
Definition
gvcint.h:108
gvplugin_active_textlayout_s::engine
gvtextlayout_engine_t * engine
Definition
gvcint.h:46
gvplugin_available_s
Definition
gvcint.h:59
gvplugin_available_s::typeptr
gvplugin_installed_t * typeptr
Definition
gvcint.h:65
gvplugin_installed_t
ingroup plugin_api
Definition
gvplugin.h:35
gvplugin_installed_t::engine
void * engine
Definition
gvplugin.h:46
gvtextlayout_engine_s
Definition
gvplugin_textlayout.h:26
gvtextlayout_engine_s::textlayout
bool(* textlayout)(textspan_t *span, char **fontpath)
Definition
gvplugin_textlayout.h:27
textspan_t
Definition
textspan.h:64
lib
gvc
gvtextlayout.c
Generated by
1.9.8