w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

aptex-cairo-visual-debug.c
Go to the documentation of this file.
1 /*
2  Copyright 2017, 2018, 2021 Clerk Ma
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful, but
10  WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  02110-1301 USA.
18 */
19 
20 #include <stdio.h>
21 #include <stdint.h>
22 
23 #include "cairo.h"
24 
25 #if CAIRO_HAS_PDF_SURFACE
26 #include "cairo-pdf.h"
27 #endif
28 
31 
32 void aptex_vdbg_ship_open (const char * out_name)
33 {
34 #if CAIRO_HAS_PDF_SURFACE
37 
38 #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1,16,0)
41 #endif
42 
43 #endif
44 }
45 
47 {
48 #if CAIRO_HAS_PDF_SURFACE
51 #endif
52 }
53 
54 void aptex_vdbg_bop (double w, double h, double x, double y)
55 {
56 #if CAIRO_HAS_PDF_SURFACE
58  cairo_scale(aptex_cairo_visual_debug, 1 / 65536.0, 1 / 65536.0);
60  cairo_pdf_surface_set_size(aptex_cairo_surface, w / 65536.0, h / 65536.0);
61 #endif
62 }
63 
64 void aptex_vdbg_eop (void)
65 {
66 #if CAIRO_HAS_PDF_SURFACE
69 #endif
70 }
71 
73 {
74 #if CAIRO_HAS_PDF_SURFACE
86 #endif
87 }
88 
90 {
91 #if CAIRO_HAS_PDF_SURFACE
97 #endif
98 }
99 
static cairo_surface_t * aptex_cairo_surface
void aptex_vdbg_ship_open(const char *out_name)
void aptex_vdbg_bop(double w, double h, double x, double y)
void aptex_vdbg_node_char(int32_t dir, int32_t x, int32_t y, int32_t w, int32_t h, int32_t d)
void aptex_vdbg_node_rule(int32_t dir, int32_t x, int32_t y, int32_t w, int32_t h)
static cairo_t * aptex_cairo_visual_debug
void aptex_vdbg_ship_close(void)
void aptex_vdbg_eop(void)
cairo_surface_t * cairo_pdf_surface_create(char *filename, double width_in_points, double height_in_points)
void cairo_pdf_surface_set_size(cairo_surface_t *surface, double width_in_points, double height_in_points)
void cairo_pdf_surface_set_metadata(cairo_surface_t *surface, cairo_pdf_metadata_t metadata, char *utf8)
@ CAIRO_PDF_METADATA_SUBJECT
Definition: cairo-pdf.h:134
@ CAIRO_PDF_METADATA_CREATOR
Definition: cairo-pdf.h:136
void cairo_surface_destroy(cairo_surface_t *surface)
void cairo_rectangle(cairo_t *cr, double x, double y, double width, double height)
Definition: cairo.c:2078
void cairo_translate(cairo_t *cr, double tx, double ty)
Definition: cairo.c:1409
void cairo_scale(cairo_t *cr, double sx, double sy)
Definition: cairo.c:1436
void cairo_set_line_width(cairo_t *cr, double width)
Definition: cairo.c:1172
void cairo_line_to(cairo_t *cr, double x, double y)
Definition: cairo.c:1736
void cairo_stroke(cairo_t *cr)
Definition: cairo.c:2360
cairo_t * cairo_create(cairo_surface_t *target)
Definition: cairo.c:446
void cairo_fill(cairo_t *cr)
Definition: cairo.c:2415
void cairo_save(cairo_t *cr)
Definition: cairo.c:624
void cairo_show_page(cairo_t *cr)
Definition: cairo.c:2494
void cairo_set_source_rgb(cairo_t *cr, double red, double green, double blue)
Definition: cairo.c:893
void cairo_restore(cairo_t *cr)
Definition: cairo.c:648
void cairo_move_to(cairo_t *cr, double x, double y)
Definition: cairo.c:1706
void cairo_destroy(cairo_t *cr)
Definition: cairo.c:519
int w
Definition: dviconv.c:26
int h
Definition: dviconv.c:9
#define d(n)
Definition: gpos-common.c:151
kerning y
Definition: ttdriver.c:212
signed int int32_t
Definition: stdint.h:77
float x
Definition: cordic.py:15
#define dir
const char * out_name
Definition: tex4ht.c:7489