Freeciv-3.3
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    { .surface = NULL, .drawable = NULL, .zoom = 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    { .surface = NULL, .drawable = NULL, .zoom = 1.0 }

Definition at line 28 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 396 of file canvas.c.