draw_selection_box(view);
drawBorders(view);
drawRotatingTools();
+// draw_stuff();
+
+
// drawtestpoly();
/*DEBUG*/
*/
int glexpose_drawgraph(ViewInfo * view)
{
- if (view->activeGraph > -1)
+
+ if (view->activeGraph > -1)
{
if (GD_TopView(view->g[view->activeGraph]))
{
{
drawtopologicalfisheye(view->Topview);
}
- glCompSetDraw(view->Topview->topviewmenu);
+// glCompDrawBegin();
// OtkUpdateCheck();
- // OtkDisplayFunct();
+// glCompDrawEnd();
+ glCompSetDraw(view->Topview->topviewmenu);
+// OtkDrawAll_scene( 0);
}
else
drawGraph(view->g[view->activeGraph]); //xdot based drawing functions
return 1;
}
- return 0;
+ return 0;
}
void drawRotatingTools(void)
return;
glClearColor(view->bgColor.R, view->bgColor.G, view->bgColor.B, view->bgColor.A); //background color
- glClearDepth(1.0);
+ glClearDepth(1.0);
+ glClear(GL_COLOR_BUFFER_BIT);
+
glLightfv(GL_LIGHT0, GL_AMBIENT, ambient);
glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse);
static int get_color_from_edge(topview_edge * e);
static int draw_node_hint_boxes(void);
static int pick_node(topview_node * n);
+extern OtkWidget* OtkOuterWindow;
void cleartopview(topview * t)
int maxlabelsize=0;
float maxedgelen,minedgelen,len,edgelength;
-// OtkInitWindow( 700, 500, NULL, NULL );
-// OtkMakeButton( OtkOuterWindow, 10.0, 10.0, 80.0, 80.0, "Hello World !", 0, 0 );
-// OtkMainLoop();
+
&& (v->distorted_y / view->zoom * -1 < view->clipY2))
{
fs=calculate_font_size(v);
- if (v->degree==0)
- printf("haha\n");
/* fs = (v->degree ==1) ?
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gvplugin_gdiplus", "plugin\gdiplus\gvplugin_gdiplus.vcproj", "{0F4D5D8F-F4D6-4A5D-97E0-9B482257F493}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "otk", "lib\otk_lib\otk.vcproj", "{343EB043-1F93-4F40-989D-FA309E4668AF}"
+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
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
RelativePath=".\glpangofont.c"
>
</File>
+ <File
+ RelativePath=".\glutfonts.c"
+ >
+ </File>
<File
RelativePath=".\glutils.c"
>
#include "glcomptexture.h"
#include "glcomptext.h"
#include <string.h>
+#include "glut.h"
glCompButton *glCompButtonNew(GLfloat x, GLfloat y, GLfloat w, GLfloat h,
char *caption, char *glyphfile,
p->fontsize) / (GLfloat) 2.0 + p->pos.y + p->thickness;
p->font->fontheight=p->fontsize;
// fontColorA (p->fontcolor.R,p->fontcolor.B,p->fontcolor.G,p->fontcolor.A);
- fontColor(p->font,0, 0, 0, 1);
- glprintf(p->font,(GLfloat) fontx, (GLfloat) fonty,
+ glColor4f(0, 0, 0, 1);
+/* glprintf(p->font,(GLfloat) fontx, (GLfloat) fonty,
(p->fontsize *(GLfloat) strlen(p->caption) *
- GLCOMPSET_FONT_SIZE_FACTOR), p->caption);
+ GLCOMPSET_FONT_SIZE_FACTOR), p->caption);*/
+// glTranslatef((GLfloat) fontx,(GLfloat) fonty,p->bevel);
+ glRasterPos3f(fontx,fonty,p->bevel + GLCOMPSET_BEVEL_DIFF * 3);
+ print_bitmap_string(GLUT_BITMAP_HELVETICA_12,p->caption);
}
//put glyph
else {
#include "glcomptext.h"
#include "glpangofont.h"
#include "memory.h"
+#include "glut.h"
+
void init_gl_vars(glCompText* f)
{
glprintf (glCompText* font, GLfloat xpos, GLfloat ypos,
GLfloat width, char *bf)
{
- int vPort[4];
+
+ int vPort[4];
GLfloat size = font->fontheight;
GLfloat x = xpos;
GLfloat y = ypos;
int maxcharCount;
char* tempC;
GLfloat charGap;
+ glColor4f (font->color.R,font->color.G,font->color.B,font->color.A);
+ glRasterPos3f(xpos,ypos,1);
+ print_bitmap_string(GLUT_BITMAP_HELVETICA_12,bf);
+ return ;
+
glGetIntegerv (GL_VIEWPORT, vPort);
init_gl_vars(font);