[Gridflow-cvs] [svn] commit: r4988 - /trunk/src/classes2.cxx

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Sun Feb 7 18:22:55 EST 2010


Author: matju
Date: Sun Feb  7 18:22:55 2010
New Revision: 4988

Log:
fix -outline bug

Modified:
    trunk/src/classes2.cxx

Modified: trunk/src/classes2.cxx
==============================================================================
--- trunk/src/classes2.cxx (original)
+++ trunk/src/classes2.cxx Sun Feb  7 18:22:55 2010
@@ -384,7 +384,7 @@
 	}
 	static void displacefn(BLAH, int dx, int dy) {INIT L
 		bself->te_xpix+=dx; bself->te_ypix+=dy;
-		sys_vgui(".x%x.c move {%s || %sTEXT} %d %d\n",glist_getcanvas(glist),self->rsym->s_name,self->rsym->s_name,dx,dy);
+		sys_vgui(".x%x.c move {%s || %sTEXT || %sIMAGE} %d %d\n",glist_getcanvas(glist),self->rsym->s_name,self->rsym->s_name,dx,dy);
 		canvas_fixlinesfor(glist, (t_text *)x);
 	}
 	static void selectfn(BLAH, int state) {INIT L
@@ -392,7 +392,7 @@
 		sys_vgui(".x%x.c itemconfigure %s -outline %s\n",c,self->rsym->s_name,self->selected?"#0000ff":"#000000");
 	}
 	static void deletefn(BLAH) {INIT L
-		if (self->vis) sys_vgui(".x%x.c delete %s %sTEXT\n",c,self->rsym->s_name,self->rsym->s_name);
+		if (self->vis) sys_vgui(".x%x.c delete %s %sTEXT %sIMAGE\n",c,self->rsym->s_name,self->rsym->s_name);
 		canvas_deletelinesfor(glist, (t_text *)x);
 	}
 };
@@ -530,8 +530,8 @@
 		int chans = buf->dim->get(2);
 		#define FOO(T) {T *data = (T *)*buf; \
 		for (int y=0; y<sy; y++) for (int x=0; x<sx; x++) { \
-			for (int c=0; c<3; c++) oprintf(os,"\\x%02x",data[i++]); \
-			if (chans==4) i++;}}
+			for (int c=0; c<3; c++) oprintf(os,"\\x%02x",data[i+c]); \
+			i+=chans;}}
 		TYPESWITCH(buf->nt,FOO,)
 		os << "\"\n";
 		sys_gui(os.str().data());
@@ -561,7 +561,7 @@
 		$canvas delete $self \n\
 		$canvas create rectangle $x $y [expr $x+$sx] [expr $y+$sy] -fill $bg -tags $self -outline $outline \n\
 		$canvas create rectangle $x $y [expr $x+7  ]       $y      -fill red -tags $self -outline $outline \n\
-		$canvas create image     $x $y -tags $self -image $self -anchor nw\n\
+		$canvas create image     $x $y -tags ${self}IMAGE -image $self -anchor nw\n\
 	}\n");
 }
 



More information about the Gridflow-cvs mailing list