Freeciv-3.1
Loading...
Searching...
No Matches
canvas_g.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996-2005 - Freeciv Development Team
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13#ifndef FC__CANVAS_G_H
14#define FC__CANVAS_G_H
15
16#include "support.h" /* bool type */
17
19
20struct color;
21struct sprite;
22
23struct canvas; /* Opaque type, real type is gui-dep */
24
28
29/* Creator and destructor */
31GUI_FUNC_PROTO(void, canvas_free, struct canvas *store)
32
33GUI_FUNC_PROTO(void, canvas_set_zoom, struct canvas *store, float zoom)
35
37
38/* Drawing functions */
39GUI_FUNC_PROTO(void, canvas_copy, struct canvas *dest, struct canvas *src,
40 int src_x, int src_y, int dest_x, int dest_y,
41 int width, int height)
43 int canvas_x, int canvas_y, struct sprite *sprite,
44 int offset_x, int offset_y, int width, int height);
46 int canvas_x, int canvas_y,
47 struct sprite *sprite)
49 int canvas_x, int canvas_y,
50 struct sprite *psprite,
51 bool fog, int fog_x, int fog_y)
53 struct color *pcolor,
54 int canvas_x, int canvas_y, int width, int height)
56 struct sprite *psprite,
57 struct color *pcolor,
58 int canvas_x, int canvas_y)
60 struct color *pcolor,
61 enum line_type ltype, int start_x, int start_y,
62 int dx, int dy)
64 struct color *pcolor,
65 enum line_type ltype, int start_x, int start_y,
66 int dx, int dy)
67
68/* Text drawing functions */
69enum client_font {
73 FONT_COUNT
74};
76 enum client_font font, const char *text)
78 int canvas_x, int canvas_y, enum client_font font,
79 struct color *pcolor, const char *text)
80
81#endif /* FC__CANVAS_G_H */
struct canvas int int struct sprite bool int int fog_y canvas_fill_sprite_area
Definition canvas_g.h:55
struct canvas int int struct sprite int int int int height
Definition canvas_g.h:44
struct canvas int int struct sprite bool int int fog_y struct canvas struct sprite struct color * pcolor
Definition canvas_g.h:57
struct canvas int int struct sprite bool int fog_x
Definition canvas_g.h:51
FONT_REQTREE_TEXT
Definition canvas_g.h:72
struct canvas int int canvas_y
Definition canvas_g.h:43
canvas_put_sprite_fogged
Definition canvas_g.h:48
struct canvas int canvas_x
Definition canvas_g.h:43
struct canvas int int struct sprite bool int int fog_y struct canvas struct sprite struct color int int canvas_y canvas_put_curved_line
Definition canvas_g.h:63
FONT_CITY_NAME
Definition canvas_g.h:70
canvas_put_sprite
Definition canvas_g.h:42
FONT_CITY_PROD
Definition canvas_g.h:71
struct canvas int int struct sprite bool int int fog_y struct canvas struct sprite struct color int int canvas_y struct canvas struct color enum line_type ltype int start_x int start_y int dx int dy enum client_font
Definition canvas_g.h:69
struct canvas int int struct sprite int int int width
Definition canvas_g.h:44
struct canvas * pcanvas
Definition canvas_g.h:42
struct canvas int int struct sprite * psprite
Definition canvas_g.h:50
canvas_put_text
Definition canvas_g.h:77
struct canvas int int struct sprite int int offset_y
Definition canvas_g.h:44
struct canvas int int struct sprite int offset_x
Definition canvas_g.h:44
line_type
Definition canvas_g.h:25
@ LINE_SELECT_RECT
Definition canvas_g.h:26
@ LINE_GOTO
Definition canvas_g.h:26
@ LINE_TILE_FRAME
Definition canvas_g.h:26
@ LINE_BORDER
Definition canvas_g.h:26
@ LINE_NORMAL
Definition canvas_g.h:26
struct canvas int int struct sprite bool fog
Definition canvas_g.h:51
void canvas_put_rectangle(struct canvas *pcanvas, struct color *pcolor, int canvas_x, int canvas_y, int width, int height)
Definition canvas.c:176
void canvas_put_sprite_full(struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *sprite)
Definition canvas.c:148
void canvas_set_zoom(struct canvas *store, float zoom)
Definition canvas.c:53
void canvas_mapview_init(struct canvas *store)
Definition canvas.c:69
void get_text_size(int *width, int *height, enum client_font font, const char *text)
Definition canvas.c:347
void canvas_free(struct canvas *store)
Definition canvas.c:44
bool has_zoom_support(void)
Definition canvas.c:61
void canvas_put_line(struct canvas *pcanvas, struct color *pcolor, enum line_type ltype, int start_x, int start_y, int dx, int dy)
Definition canvas.c:223
void canvas_copy(struct canvas *dest, struct canvas *src, int src_x, int src_y, int dest_x, int dest_y, int width, int height)
Definition canvas.c:76
struct canvas * canvas_create(int width, int height)
Definition canvas.c:28
#define GUI_FUNC_PROTO(_type, _func,...)
float zoom
Definition canvas.h:24
Definition colors.h:20