Freeciv-3.1: /fast/freeciv/nightly/S3_1/client/gui-gtk-3.22/sprite.h Source File

Freeciv-3.1

Loading...
Searching...
No Matches
sprite.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__SPRITE_H
14#define FC__SPRITE_H
15
16#include <gtk/gtk.h>
17
18/* client */
19#include "sprite_g.h"
20
21struct sprite
22{
23 cairo_surface_t *surface;
24};
25
26struct sprite *sprite_scale(struct sprite *src, int new_w, int new_h);
27void sprite_get_bounding_box(struct sprite *sprite, int *start_x,
28 int *start_y, int *end_x, int *end_y);
29struct sprite *crop_blankspace(struct sprite *s);
30
31/********************************************************************
32 Note: a sprite cannot be changed after these functions are called!
33********************************************************************/
34GdkPixbuf *sprite_get_pixbuf(struct sprite *sprite);
35GdkPixbuf *surface_get_pixbuf(cairo_surface_t *surf, int width, int height);
36
37GdkPixbuf *create_extra_pixbuf(const struct extra_type *pextra);
38
39#endif /* FC__SPRITE_H */
height
struct canvas int int struct sprite int int int int height
Definition canvas_g.h:44
width
struct canvas int int struct sprite int int int width
Definition canvas_g.h:44
sprite_scale
struct sprite * sprite_scale(struct sprite *src, int new_w, int new_h)
Definition sprite.c:291
surface_get_pixbuf
GdkPixbuf * surface_get_pixbuf(cairo_surface_t *surf, int width, int height)
Definition sprite.c:418
sprite_get_pixbuf
GdkPixbuf * sprite_get_pixbuf(struct sprite *sprite)
Definition sprite.c:402
create_extra_pixbuf
GdkPixbuf * create_extra_pixbuf(const struct extra_type *pextra)
Definition sprite.c:494
sprite_get_bounding_box
void sprite_get_bounding_box(struct sprite *sprite, int *start_x, int *start_y, int *end_x, int *end_y)
Definition sprite.c:321
crop_blankspace
struct sprite * crop_blankspace(struct sprite *s)
Definition sprite.c:386
sprite_g.h
extra_type
Definition extras.h:85
sprite
Definition sprite.h:22
sprite::surface
cairo_surface_t * surface
Definition sprite.h:23