Freeciv-3.1: /fast/freeciv/nightly/S3_1/client/gui-gtk-3.0/canvas.h File Reference

Freeciv-3.1

Loading...
Searching...
No Matches
Data Structures | Macros | Functions
canvas.h File Reference
`#include <gtk/gtk.h>`
`#include "canvas_g.h"`

Go to the source code of this file.

## Data Structures

struct | canvas

## Macros

#define | FC_STATIC_CANVAS_INIT { NULL, NULL, 1.0 }

## Functions

void | surface_put_text (cairo_t *cr, int x, int y, float zoom, enum client_font font, struct color *pcolor, const char *text)

## Macro Definition Documentation

## ◆ FC_STATIC_CANVAS_INIT

#define FC_STATIC_CANVAS_INIT { NULL, NULL, 1.0 }

Definition at line 27 of file canvas.h.

## Function Documentation

## ◆ surface_put_text()

void surface_put_text | ( | cairo_t * | cr,
|  | int | x,
|  | int | y,
|  | float | zoom,
|  | enum client_font | font,
|  | struct color * | pcolor,
|  | const char * | text
| ) |  |

Draw the text onto the surface in the given color and font. The position does not account for the ascent of the text; this function must take care of this manually. The text may not be NULL but may be empty.

Definition at line 405 of file canvas.c.