 |
Crossfire Client, Trunk
|
Go to the documentation of this file.
53 #define MAX_ICON_SPACES 10
77 #define ROTATE_RIGHT(c) if ((c) & 01) (c) = ((c) >>1) + 0x80000000; else (c) >>= 1;
144 int nx, ny, iscale, factor;
310 int x, y, wx, wy, w, h;
313 pbar = gtk_progress_bar_new();
320 gtk_widget_show(
pbar);
322 }
else if (start == total) {
329 gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(
pbar), (
float)start / end);
330 while (gtk_events_pending()) {
331 gtk_main_iteration();
int create_and_rescale_image_from_data(Cache_Entry *ce, int pixmap_num, guint8 *rgba_data, int width, int height)
Takes the pixmap to put the data into, as well as the rgba data (ie, already loaded with png_to_data)...
static void create_map_image(guint8 *data, PixmapInfo *pi)
Helper function to make the code more readable.
static void create_icon_image(guint8 *data, PixmapInfo *pi)
Helper function to make the code more readable.
Used mostly in the cache.c file, however, it can be returned to the graphic side of things so that th...
GdkPixbuf * full_icon_image
void reset_image_data(void)
Connecting to different servers, try to clear out any old images.
PixmapInfo * pixmaps[MAXPIXMAPNUM]
static void free_pixmap(PixmapInfo *pi)
Memory management.
static void create_full_icon_image(guint8 *data, PixmapInfo *pi)
#define DEFAULT_IMAGE_SIZE
void get_map_image_size(int face, guint8 *w, guint8 *h)
void reset_image_cache_data(void)
We can now connect to different servers, so we need to clear out any old images.
int associate_cache_entry(Cache_Entry *ce, int pixnum)
This functions associates image_data in the cache entry with the specific pixmap number.
guint16 smooth_face
A face used for smoothing with this face.
void do_new_image(guint8 *data, PixmapInfo *pi)
Wrapper for accessing outside this file.
void get_window_coord(GtkWidget *win, int *x, int *y, int *wx, int *wy, int *w, int *h)
Gets the coordinates of a specified window.
gint16 want_config[CONFIG_NUMS]
static const int icon_rescale_factor[MAX_ICON_SPACES]
void addsmooth(guint16 face, guint16 smooth_face)
Referenced from common/commands.c.
void init_image_cache_data(void)
Initializes the data for image caching Create question mark to display in each supported rendering mo...
cairo_surface_t * rgba_to_cairo_surface(guint8 *data, int width, int height)
Create a Cairo surface for the given RGBA data.
void init_common_cache_data(void)
void image_update_download_status(int start, int end, int total)
Draws a status bar showing where we our in terms of downloading all the image data.
gint16 use_config[CONFIG_NUMS]
GdkPixbuf * rgba_to_gdkpixbuf(guint8 *data, int width, int height)
Create a GdkPixbuf for the given RGBA data.
GtkWidget * window_root
In main.c.
guint8 * rescale_rgba_data(guint8 *data, int *width, int *height, int scale)
Takes png data and scales it accordingly.
static GtkWidget * pbar_window
#define CONFIG_DISPLAYMODE