}
#endif
+#if 0
void draw_magnifier(ViewInfo * view)
{
GLUquadric *fisheyesphere;
void draw_fisheye_magnifier(ViewInfo * view)
{
- if (get_mode(view)==MM_FISHEYE_MAGNIFIER)
-
- {
+ if (get_mode(view)==MM_FISHEYE_MAGNIFIER) {
float a;
GLfloat mg_x, mg_y, mg_z;
a = GetOGLDistance((int) view->fmg.constantR);
&mg_x, &mg_y, &mg_z);
glColor4f((GLfloat) 0.3, (GLfloat) 0.1, (GLfloat) 0.8,
(GLfloat) 1);
- if (((view->fmg.x != mg_x) || (view->fmg.y != mg_y))
- && (view->active_camera == -1)) {
- fisheye_polar(mg_x, mg_y, view->Topview);
- draw_circle(mg_x, mg_y, a);
- }
- if (((view->fmg.x != mg_x) || (view->fmg.y != mg_y))
- && (view->active_camera > -1)) {
- fisheye_spherical(mg_x, mg_y, 0.00, view->Topview);
-
-
- if (!fisheyesphere)
- fisheyesphere = gluNewQuadric();
- gluQuadricDrawStyle(fisheyesphere, GLU_LINE);
- glColor4f((GLfloat) 0.3, (GLfloat) 0.1, (GLfloat) 0.8,
- (GLfloat) 0.05);
- glTranslatef(mg_x, mg_y, 0);
- gluSphere(fisheyesphere, a, 30, 30);
- glTranslatef(-mg_x, -mg_y, 0);
+ if ((view->fmg.x != mg_x) || (view->fmg.y != mg_y)) {
+ if (view->active_camera == -1) {
+ /* fisheye_polar(mg_x, mg_y, view->Topview); */
+ draw_circle(mg_x, mg_y, a);
+ }
+ else {
+ /* fisheye_spherical(mg_x, mg_y, 0.00, view->Topview); */
+ if (!fisheyesphere)
+ fisheyesphere = gluNewQuadric();
+ gluQuadricDrawStyle(fisheyesphere, GLU_LINE);
+ glColor4f((GLfloat) 0.3, (GLfloat) 0.1, (GLfloat) 0.8, (GLfloat) 0.05);
+ glTranslatef(mg_x, mg_y, 0);
+ gluSphere(fisheyesphere, a, 30, 30);
+ glTranslatef(-mg_x, -mg_y, 0);
+ }
+ view->fmg.x = mg_x;
+ view->fmg.y = mg_y;
}
-
-
- view->fmg.x = mg_x;
- view->fmg.y = mg_y;
-
}
}
+#endif
void drawBorders(ViewInfo * view)
{
extern void draw_sphere(float x, float y, float z, float r);
extern int draw_node_hintbox(GLfloat x, GLfloat y, GLfloat z, GLfloat fs, char *text);
extern glCompColor GetglCompColor(char *color);
-#endif
-extern void draw_selection_box(ViewInfo * view);
extern void draw_magnifier(ViewInfo * view);
extern void draw_fisheye_magnifier(ViewInfo * view);
+#endif
+extern void draw_selection_box(ViewInfo * view);
extern void drawCircle(float x, float y, float radius, float zdepth);
extern void drawBorders(ViewInfo * view);
extern void drawEllipse(float xradius, float yradius, int angle1, int angle2);
(float) levelcount * srcColor.B) / (float) levelcount;
}
+#ifdef UNUSED
static double dist(double x1, double y1, double x2, double y2)
{
return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) +
(z1 - z2) * (z1 - z2));
}
+#endif
#ifdef UNUSED
static void drawtopologicalfisheyestatic(topview * t);
#endif
+#ifdef UNUSED
+
+The code below now longer works. First, t->Nodes == NULL, since
+we now rely on the libgraph graph for data. Second, the code that
+drew the distorted view was left out of the move from topview.c
+to topviewfuncs.c. The magnifiers were cute but not particularly
+useful, so we leave the feature out for now.
+
static double G(double x)
{
// distortion function for fisheye display
}
}
}
+#endif
static v_data *makeGraph(Agraph_t* gg, int *nedges)
{