[xiph-commits] r12254 - trunk/sushivision
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Thu Dec 28 12:41:26 PST 2006
Author: xiphmont
Date: 2006-12-28 12:41:25 -0800 (Thu, 28 Dec 2006)
New Revision: 12254
Modified:
trunk/sushivision/panel-1d.c
trunk/sushivision/undo.c
Log:
Kill off a range plotting bug when axes are flipped
Modified: trunk/sushivision/panel-1d.c
===================================================================
--- trunk/sushivision/panel-1d.c 2006-12-28 20:13:10 UTC (rev 12253)
+++ trunk/sushivision/panel-1d.c 2006-12-28 20:41:25 UTC (rev 12254)
@@ -63,7 +63,7 @@
if(plot){
int xi,i;
int dw = p1->data_size;
- double r = (p1->flip?p1->panel_w:p1->panel_h);
+ double h = p1->panel_h;
scalespace sx = (p1->flip?p1->y:p1->x);
scalespace sy = (p1->flip?p1->x:p1->y);
@@ -112,11 +112,11 @@
if(!isnan(ypixel) && !isnan(yprev)){
if(p1->flip){
- cairo_move_to(c,yprev,r-xprev);
- cairo_line_to(c,ypixel,r-xpixel);
+ cairo_move_to(c,yprev,h-xprev);
+ cairo_line_to(c,ypixel,h-xpixel);
}else{
- cairo_move_to(c,xprev,r-yprev);
- cairo_line_to(c,xpixel,r-ypixel);
+ cairo_move_to(c,xprev,h-yprev);
+ cairo_line_to(c,xpixel,h-ypixel);
}
cairo_stroke(c);
}
Modified: trunk/sushivision/undo.c
===================================================================
--- trunk/sushivision/undo.c 2006-12-28 20:13:10 UTC (rev 12253)
+++ trunk/sushivision/undo.c 2006-12-28 20:41:25 UTC (rev 12254)
@@ -111,7 +111,9 @@
_sushiv_panel_undo_log(p);
// realloc stack
- p->sushi->private->undo_stack = realloc(p->sushi->private->undo_stack,(p->sushi->private->undo_level+3)*sizeof(*p->sushi->private->undo_stack));
+ p->sushi->private->undo_stack =
+ realloc(p->sushi->private->undo_stack,
+ (p->sushi->private->undo_level+3)*sizeof(*p->sushi->private->undo_stack));
p->sushi->private->undo_level++;
p->sushi->private->undo_stack[p->sushi->private->undo_level]=NULL;
p->sushi->private->undo_stack[p->sushi->private->undo_level+1]=NULL;
More information about the commits
mailing list