コード例 #1
0
ファイル: topfisheyeview.c プロジェクト: joewalnes/graphviz2
void drawtopologicalfisheye(topview * t)
{
    get_active_frame(t);
    drawtopfishnodes(t);
    drawtopfishedges(t);
/*    if (!t->fisheyeParams.animate)
	drawtopfishnodelabels(t);*/

}
コード例 #2
0
ファイル: topfisheyeview.c プロジェクト: ekoontz/graphviz
int get_temp_coords(topview* t,int level,int v,double* coord_x,double* coord_y,float *R,float *G,float *B)
{
    Hierarchy *hp = t->h;
	ex_vtx_data *gg = hp->geom_graphs[level];
	/* v_data *g = hp->graphs[level]; */
	int OAL,AL;
	OAL=gg[v].old_active_level;
	AL=gg[v].active_level;
	/*if ((OAL > level) && (AL>level))
		return 0;*/
	if ((OAL < level) && (AL<level))
		return 0;

	if (!t->animate)
	{
		if (AL == level)
		{
			*coord_x=(double)gg[v].physical_x_coord;
			*coord_y=(double)gg[v].physical_y_coord;
			return 1;
		}
		else
			return 0;
	}
	else
	{

		double x0,y0,x1,y1;	
		x0=0;
		y0=0;
		x1=0;
		y1=0;

		get_active_frame(t);
		if ((OAL == level) && (AL==level))
		{
			x0=(double)gg[v].old_physical_x_coord;
			y0=(double)gg[v].old_physical_y_coord;
			x1=(double)gg[v].physical_x_coord;
			y1=(double)gg[v].physical_y_coord;
			*G=0;
			*R=1;

		}
		if ((OAL == level) && (AL>level))
		{
			x0=(double)gg[v].old_physical_x_coord;
			y0=(double)gg[v].old_physical_y_coord;
			find_physical_coords(t->h,level,v,&x1,&y1);
			*G=view->active_frame/view->total_frames;
				*R=0;

		}
		if ((OAL > level) && (AL==level))
		{
			find_old_physical_coords(t->h,level,v,&x0,&y0);
			x1=(double)gg[v].physical_x_coord;
			y1=(double)gg[v].physical_y_coord;
			*R=view->active_frame/view->total_frames;
			*G=1/(view->active_frame/view->total_frames+0.0000001);

		}
		if ((OAL > level) && (AL>level))
		{
			find_old_physical_coords(t->h,level,v,&x0,&y0);
			find_physical_coords(t->h,level,v,&x1,&y1);
			*G=1;
			*R=0;

		}

		get_interpolated_coords(x0,y0,x1,y1,view->active_frame,view->total_frames,coord_x,coord_y);
		
		return 1;
	}
	return 0;
}