[libgis] Use 2^x textures for GisMarker
- From: Andy Spencer <andys src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgis] Use 2^x textures for GisMarker
- Date: Fri, 10 Sep 2010 03:17:09 +0000 (UTC)
commit ad122fbc44250cabc22e81f99a7ea1f376766ca6
Author: Andy Spencer <andy753421 gmail com>
Date: Mon May 3 01:10:45 2010 +0000
Use 2^x textures for GisMarker
examples/info/info.c | 6 ++++++
src/gis-test.c | 8 ++++----
src/objects/gis-marker.c | 10 +++++-----
3 files changed, 15 insertions(+), 9 deletions(-)
---
diff --git a/examples/info/info.c b/examples/info/info.c
index cd4fe71..a00f217 100644
--- a/examples/info/info.c
+++ b/examples/info/info.c
@@ -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},
diff --git a/src/gis-test.c b/src/gis-test.c
index 1146f41..3423af5 100644
--- a/src/gis-test.c
+++ b/src/gis-test.c
@@ -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();
diff --git a/src/objects/gis-marker.c b/src/objects/gis-marker.c
index 33caab0..f02da47 100644
--- a/src/objects/gis-marker.c
+++ b/src/objects/gis-marker.c
@@ -47,10 +47,10 @@
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]