[xiph-commits] r12476 - trunk/sushivision
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Thu Feb 15 15:38:30 PST 2007
Author: xiphmont
Date: 2007-02-15 15:38:28 -0800 (Thu, 15 Feb 2007)
New Revision: 12476
Modified:
trunk/sushivision/internal.h
trunk/sushivision/panel-2d.c
trunk/sushivision/panel.c
trunk/sushivision/sushivision.h
Log:
Over/undersample support for 2-d panels
Modified: trunk/sushivision/internal.h
===================================================================
--- trunk/sushivision/internal.h 2007-02-15 23:07:39 UTC (rev 12475)
+++ trunk/sushivision/internal.h 2007-02-15 23:38:28 UTC (rev 12476)
@@ -86,6 +86,9 @@
time_t last_map_throttle;
+ int oversample_n;
+ int oversample_d;
+
// function bundles
void (*realize)(sushiv_panel_t *p);
int (*map_action)(sushiv_panel_t *p);
Modified: trunk/sushivision/panel-2d.c
===================================================================
--- trunk/sushivision/panel-2d.c 2007-02-15 23:07:39 UTC (rev 12475)
+++ trunk/sushivision/panel-2d.c 2007-02-15 23:38:28 UTC (rev 12476)
@@ -1115,7 +1115,7 @@
_sushiv_dimension_scales(p2->x_d,
p2->x_d->bracket[0],
p2->x_d->bracket[1],
- pw,pw,// over/undersample will go here
+ pw,pw * p->private->oversample_n / p->private->oversample_d,
plot->scalespacing,
p2->x_d->name,
&sx,
@@ -1124,7 +1124,7 @@
_sushiv_dimension_scales(p2->y_d,
p2->y_d->bracket[1],
p2->y_d->bracket[0],
- ph,ph,// over/undersample will go here
+ ph,ph * p->private->oversample_n / p->private->oversample_d,
plot->scalespacing,
p2->y_d->name,
&sy,
Modified: trunk/sushivision/panel.c
===================================================================
--- trunk/sushivision/panel.c 2007-02-15 23:07:39 UTC (rev 12475)
+++ trunk/sushivision/panel.c 2007-02-15 23:38:28 UTC (rev 12476)
@@ -142,6 +142,21 @@
gdk_threads_leave ();
}
+extern int sushiv_panel_oversample(sushiv_instance_t *s,
+ int number,
+ int numer,
+ int denom){
+
+ sushiv_panel_t *p = s->panel_list[number];
+ sushiv_panel_internal_t *pi = p->private;
+
+ if(denom == 0)return -EINVAL;
+
+ pi->oversample_n = numer;
+ pi->oversample_d = denom;
+ return 0;
+}
+
int _sushiv_new_panel(sushiv_instance_t *s,
int number,
const char *name,
@@ -180,6 +195,8 @@
p->sushi = s;
p->private = calloc(1, sizeof(*p->private));
p->private->spinner = spinner_new();
+ p->private->oversample_n = 1;
+ p->private->oversample_d = 1;
i=0;
while(objectives && objectives[i]>=0)i++;
Modified: trunk/sushivision/sushivision.h
===================================================================
--- trunk/sushivision/sushivision.h 2007-02-15 23:07:39 UTC (rev 12475)
+++ trunk/sushivision/sushivision.h 2007-02-15 23:38:28 UTC (rev 12476)
@@ -247,6 +247,10 @@
int *dimensions,
unsigned flags);
+extern int sushiv_panel_oversample(sushiv_instance_t *s,
+ int number,
+ int numer,
+ int denom);
extern int sushiv_submain(int argc, char *argv[]);
extern int sushiv_atexit(void);
More information about the commits
mailing list