char* smyrnaGlade;
unsigned char SmyrnaVerbose;
+infixtoposfic(char* infix,char* posfix,int bfsize)
+{
+ char a=NULL;
+ int ind=0;
+ int ind2=0; /*points to empty cell*/
+ int st[512];
+ int ptr=0;
+ for (ind=0;ind < strlen(infix); ind ++)
+ {
+ printf ("stack:%s\n",st);
+ printf ("posix:%s\n",posfix);
+ a=infix[ind];
+ if ((a != '(') && (a != ')') &&(a != '+') && (a != '-') && (a != '/') &&(a != '*'))
+ {
+ posfix[ind2]=a;
+ ind2++;
+ continue;
+ }
+ if(a=='(')
+ {
+ st[ptr]=a;
+ ptr++;
+ continue;
+ }
+ if((a == '+') || (a == '-') || (a == '/') ||(a == '*'))
+ {
+ ptr --;
+ while ((st[ptr]=='+') || (st[ptr]=='-')|| (st[ptr]=='/')|| (st[ptr]=='*'))
+ {
+ posfix[ind2]=st[ptr];
+ ind2++;
+ ptr --;
+ }
+ ptr++;
+ st[ptr]=a;
+ ptr++;
+ continue;
+ }
+ if(a==')')
+ {
+ while ((st[ptr]!= '(') )
+ {
+ posfix[ind2]=st[ptr];
+ ind2++;
+ ptr --;
+ }
+ ptr--;
+ }
+ }
+ posfix[ind2]='\0';
+}
+
+
+
+
/* smyrnaPath:
* Construct pathname for smyrna data file.
* Base file name is given as suffix.
int maxnodedegree;
float maxedgelen;
float minedgelen;
+ float avgedgelength;
float init_node_size; //raster size of node
float init_zoom;
float fitin_zoom;
void settvposinfo(Agraph_t* g,topview* t)
{
int ind;
- float maxedgelen,len,minedgelen;
+ float maxedgelen,len,minedgelen,totallen;
maxedgelen=0;
minedgelen=MAXFLOAT;
+ totallen=0;
/*loop nodes*/
for (ind=0;ind < t->Nodecount ; ind ++)
{
setpositioninfo(&t->Edges[ind].x1,&t->Edges[ind].y1,&t->Edges[ind].z1,agget(t->Edges[ind].Node1->Node, "pos"));
setpositioninfo(&t->Edges[ind].x2,&t->Edges[ind].y2,&t->Edges[ind].z2,agget(t->Edges[ind].Node2->Node, "pos"));
len=(float)pow(pow((t->Edges[ind].x2-t->Edges[ind].x1),2)+pow((t->Edges[ind].y2-t->Edges[ind].y1),2),0.5);
+ totallen = totallen + len;
if (len > maxedgelen)
maxedgelen=len;
if(len < minedgelen)
}
t->maxedgelen=maxedgelen;
t->minedgelen=minedgelen;
+ t->avgedgelength=totallen / (float) t->Edgecount;
}
/*if object has attribute returns its value, else returns 0*/
t->Edges[ind].data.Visible=boolAttr("visible",t->Edges[ind].Edge,1);
}
/*update node size values in case node size is changed*/
- t->init_node_size=t->minedgelen*10/GetOGLDistance(10)*atoi(agget(view->g[view->activeGraph],"nodesize"))/100.0*5.00;
+ t->init_node_size=t->avgedgelength*2/GetOGLDistance(2)*atoi(agget(view->g[view->activeGraph],"nodesize"))/100.0*5.00;
t->init_zoom=view->zoom;
}
c->R=interpol(sc->s[ind-1].perc,sc->s[ind].perc,sc->s[ind-1].c.R,sc->s[ind].c.R,percl);
c->G=interpol(sc->s[ind-1].perc,sc->s[ind].perc,sc->s[ind-1].c.G,sc->s[ind].c.G,percl);
c->B=interpol(sc->s[ind-1].perc,sc->s[ind].perc,sc->s[ind-1].c.B,sc->s[ind].c.B,percl);
+ c->A=1;
}
else
{
c->R=sc->s[ind].c.R;
c->G=sc->s[ind].c.G;
c->B=sc->s[ind].c.B;
+ c->A=1;
}
}
static void set_color_theme_color(colorschemaset* sc,char** colorstr,int colorcnt,int smooth)
{8E82D6BD-74D0-48C3-887A-1754EA71DA5A} = {8E82D6BD-74D0-48C3-887A-1754EA71DA5A}
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "otk", "lib\otk_lib\otk.vcproj", "{343EB043-1F93-4F40-989D-FA309E4668AF}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "regex_win32", "lib\regex_win32\regex_win32.vcproj", "{1DE8628B-271E-49B3-A9B7-A53519E1CA65}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gvtest", "cmd\tester\gvtest.vcproj", "{C2AA7FA3-9BB5-4319-A01D-37439E0E6830}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gvprlib", "cmd\gvprlib\gvprlib.vcproj", "{1068DA13-0BB3-43A7-8776-6F519003EEBD}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sfdp", "lib\sfdpgen\sfdp.vcproj", "{443EB1A7-C634-4292-9F2D-C752BB2BF40F}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
{0F4D5D8F-F4D6-4A5D-97E0-9B482257F493}.Debug|Win32.Build.0 = Debug|Win32
{0F4D5D8F-F4D6-4A5D-97E0-9B482257F493}.Release|Win32.ActiveCfg = Release|Win32
{0F4D5D8F-F4D6-4A5D-97E0-9B482257F493}.Release|Win32.Build.0 = Release|Win32
- {343EB043-1F93-4F40-989D-FA309E4668AF}.Debug|Win32.ActiveCfg = Debug|Win32
- {343EB043-1F93-4F40-989D-FA309E4668AF}.Debug|Win32.Build.0 = Debug|Win32
- {343EB043-1F93-4F40-989D-FA309E4668AF}.Release|Win32.ActiveCfg = Release|Win32
- {343EB043-1F93-4F40-989D-FA309E4668AF}.Release|Win32.Build.0 = Release|Win32
{1DE8628B-271E-49B3-A9B7-A53519E1CA65}.Debug|Win32.ActiveCfg = Debug|Win32
{1DE8628B-271E-49B3-A9B7-A53519E1CA65}.Debug|Win32.Build.0 = Debug|Win32
{1DE8628B-271E-49B3-A9B7-A53519E1CA65}.Release|Win32.ActiveCfg = Release|Win32
{1068DA13-0BB3-43A7-8776-6F519003EEBD}.Debug|Win32.Build.0 = Debug|Win32
{1068DA13-0BB3-43A7-8776-6F519003EEBD}.Release|Win32.ActiveCfg = Release|Win32
{1068DA13-0BB3-43A7-8776-6F519003EEBD}.Release|Win32.Build.0 = Release|Win32
+ {443EB1A7-C634-4292-9F2D-C752BB2BF40F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {443EB1A7-C634-4292-9F2D-C752BB2BF40F}.Debug|Win32.Build.0 = Debug|Win32
+ {443EB1A7-C634-4292-9F2D-C752BB2BF40F}.Release|Win32.ActiveCfg = Release|Win32
+ {443EB1A7-C634-4292-9F2D-C752BB2BF40F}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
RelativePath=".\gvrender_gdiplus.cpp"
>
</File>
+ <File
+ RelativePath=".\gvtextlayout_gdiplus.cpp"
+ >
+ </File>
</Filter>
</Files>
<Globals>