]> Pileus Git - grits/commitdiff
Use 2^x textures for GisMarker
authorAndy Spencer <andy753421@gmail.com>
Mon, 3 May 2010 01:10:45 +0000 (01:10 +0000)
committerAndy Spencer <andy753421@gmail.com>
Mon, 3 May 2010 01:10:45 +0000 (01:10 +0000)
examples/info/info.c
src/gis-test.c
src/objects/gis-marker.c

index cd4fe71d8161ec510efbd40101aec65e3eff34ed..a00f21713c71b334a49be92a3e6c950206e467a2 100644 (file)
@@ -41,6 +41,7 @@ int main(int argc, char **argv)
        /* Test extensions */
        const char *exts[] = {
                "GL_ARB_texture_rectangle",
+               "GL_ARB_texture_non_power_of_two",
                "GL_ARB_does_not_exist",
        };
        printf("\nChecking some extensions...\n");
@@ -52,6 +53,11 @@ int main(int argc, char **argv)
 
        /* Test sample image */
        GLint sizes[][2] = {
+               { 120,   40},
+               { 120,  120},
+               { 128,   32},
+               { 128,   64},
+               { 128,  128},
                {3400, 1600},
                {1024, 1024},
                {4096, 4096},
index 1146f41215731d985502e1ba411d4871ed60114f..3423af5a389f665c6bdd0f587f33c7fef451d62e 100644 (file)
@@ -88,12 +88,12 @@ int main(int argc, char **argv)
 
        /* Configurable stuff */
        gis_viewer_set_offline(viewer, TRUE);
-       load_plugin(plugins, "elev",  viewer, prefs, GTK_NOTEBOOK(config));
-       load_plugin(plugins, "env",   viewer, prefs, GTK_NOTEBOOK(config));
+       //load_plugin(plugins, "elev",  viewer, prefs, GTK_NOTEBOOK(config));
+       //load_plugin(plugins, "env",   viewer, prefs, GTK_NOTEBOOK(config));
        //load_plugin(plugins, "map",   viewer, prefs, GTK_NOTEBOOK(config));
        load_plugin(plugins, "sat",   viewer, prefs, GTK_NOTEBOOK(config));
-       //load_plugin(plugins, "test",  viewer, prefs, GTK_NOTEBOOK(config));
-       load_plugin(plugins, "radar", viewer, prefs, GTK_NOTEBOOK(config));
+       load_plugin(plugins, "test",  viewer, prefs, GTK_NOTEBOOK(config));
+       //load_plugin(plugins, "radar", viewer, prefs, GTK_NOTEBOOK(config));
 
        gtk_widget_show_all(config);
        gtk_main();
index 33caab00b1d43b85242cd7e7bd516f292452a820..f02da47d7a9f2e8e8194d2a2bf5a0eb7a75124a9 100644 (file)
 GisMarker *gis_marker_new(const gchar *label)
 {
        //g_debug("GisMarker: new - %s", label);
-       static const gint OUTLINE =   2;
-       static const gint RADIUS  =   4;
-       static const gint WIDTH   = 120;
-       static const gint HEIGHT  =  40;
+       static const gdouble OUTLINE =   2;
+       static const gdouble RADIUS  =   3;
+       static const gdouble WIDTH   = 128;
+       static const gdouble HEIGHT  =  32;
 
        GisMarker *marker = g_object_new(GIS_TYPE_MARKER, NULL);
        marker->xoff  = RADIUS+OUTLINE;
@@ -61,7 +61,7 @@ GisMarker *gis_marker_new(const gchar *label)
 
        cairo_select_font_face(marker->cairo, "sans-serif",
                        CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
-       cairo_set_font_size(marker->cairo, 14);
+       cairo_set_font_size(marker->cairo, 13);
 
        /* Draw outline */
        cairo_set_source_rgba(marker->cairo, 0, 0, 0, 1);