Graphviz
12.0.1~dev.20240716.0800
Loading...
Searching...
No Matches
glcomptextpng.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 <
glcomp/glcompfont.h
>
12
#include <
glcomp/glcomptextpng.h
>
13
#include <gtk/gtk.h>
14
#include <png.h>
15
16
unsigned
char
*
glCompLoadPng
(
char
*filename,
int
*imageWidth,
int
*imageHeight)
17
{
18
cairo_surface_t *surface = cairo_image_surface_create_from_png(filename);
19
if
(!surface)
return
0;
20
*imageWidth = cairo_image_surface_get_width(surface);
21
*imageHeight = cairo_image_surface_get_height(surface);
22
return
cairo_image_surface_get_data(surface);
23
}
glcompfont.h
glCompLoadPng
unsigned char * glCompLoadPng(char *filename, int *imageWidth, int *imageHeight)
Definition
glcomptextpng.c:16
glcomptextpng.h
lib
glcomp
glcomptextpng.c
Generated by
1.9.8