]> Pileus Git - grits/blobdiff - src/objects/grits-tile.h
Move low level tile loading to GritsTile
[grits] / src / objects / grits-tile.h
index b13e1c346c62b9b0b86af471bbcc1c52b2e52a0e..fc87695ab3718f43de5dd5dde8c6963232930c3b 100644 (file)
@@ -57,6 +57,14 @@ struct _GritsTile {
 
        /* Projection used by tile data */
        GritsProj proj;
+
+       /* Internal data to the tile */
+       guint      tex;
+       GdkPixbuf *pixbuf;
+       guchar    *pixels;
+       gint       width;
+       gint       height;
+       gint       alpha;
 };
 
 struct _GritsTileClass {
@@ -125,6 +133,16 @@ void grits_tile_update(GritsTile *root, GritsPoint *eye,
                gdouble res, gint width, gint height,
                GritsTileLoadFunc load_func, gpointer user_data);
 
+/* Load tile data from pixel buffer */
+gboolean grits_tile_load_pixels(GritsTile *tile, guchar *pixels,
+               gint width, gint height, gint channels);
+
+/* Load tile data from a GdkPixbuf */
+gboolean grits_tile_load_pixbuf(GritsTile *tile, GdkPixbuf *pixbuf);
+
+/* Load tile data from an image file */
+gboolean grits_tile_load_file(GritsTile *tile, const gchar *file);
+
 /* Find the leaf tile containing lat-lon */
 GritsTile *grits_tile_find(GritsTile *root, gdouble lat, gdouble lon);