~ubuntu-branches/ubuntu/lucid/graphviz/lucid-updates

« back to all changes in this revision

Viewing changes to cmd/smyrna/selection.h

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2008-06-19 20:23:23 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080619202323-ls23h96ntj9ny94m
Tags: 2.18-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Build depend on liblualib50-dev instead of liblua5.1-0-dev.
  - Drop libttf-dev (libttf-dev is in universe) (LP: #174749).
  - Replace gs-common with ghostscript.
  - Build-depend on python-dev instead of python2.4-dev or python2.5-dev.
  - Mention the correct python version for the python bindings in the
    package description.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: selection.h,v 1.3 2008/03/04 17:54:51 arif Exp $ $Revision: 1.3 $ */
 
2
/* vim:set shiftwidth=4 ts=8: */
 
3
 
 
4
/**********************************************************
 
5
*      This software is part of the graphviz package      *
 
6
*                http://www.graphviz.org/                 *
 
7
*                                                         *
 
8
*            Copyright (c) 1994-2004 AT&T Corp.           *
 
9
*                and is licensed under the                *
 
10
*            Common Public License, Version 1.0           *
 
11
*                      by AT&T Corp.                      *
 
12
*                                                         *
 
13
*        Information and Software Systems Research        *
 
14
*              AT&T Research, Florham Park NJ             *
 
15
**********************************************************/
 
16
 
 
17
#ifndef SELECTION_H
 
18
#define SELECTION_H
 
19
 
 
20
#include "xdot.h"
 
21
 
 
22
#define SELECTION_SEGMENT_DIVIDER       5.0     //control points count to check if a line segment is withing clipping rect
 
23
#define SINGLE_SELECTION_WIDTH  10      //width of the rect clip for single selections , higher values more catches less sensitivity
 
24
 
 
25
typedef struct {
 
26
    double x, y;
 
27
} pointf;
 
28
extern int intersect (pointf a, pointf b, pointf c, pointf d, pointf* x);
 
29
 
 
30
int lineintersects(float X1,float X2,float Y1,float Y2);
 
31
int rectintersects(float x,float y,float W,float H);
 
32
int point_within_ellipse( xdot_op* op);
 
33
int point_within_ellips_with_coords(float ex,float ey,float ea,float eb,float px,float py);
 
34
int point_within_polygon(xdot_op* op);
 
35
int line_intersects (float* x,float* y,float* X,float* Y);
 
36
 
 
37
int is_point_in_rectangle(float X,float Y,float RX,float RY,float RW,float RH);
 
38
int within_bezier(GLfloat* xp,GLfloat* yp,GLfloat* zp,int isx);
 
39
 
 
40
int ellipse_in_rect(xdot_op* op);
 
41
int ellipse_x_rect(xdot_op* op);
 
42
 
 
43
 
 
44
int SelectBeziers(xdot_op* op);
 
45
int SelectEllipse(xdot_op* op);
 
46
int SelectPolygon(xdot_op* op);
 
47
int SelectPolyline(xdot_op* op);
 
48
int SelectText(xdot_op* op);
 
49
int SelectImage(xdot_op* op);
 
50
 
 
51
 
 
52
 
 
53
int spline_in_rect(xdot_op* op);
 
54
int spline_x_rect(xdot_op* op);
 
55
 
 
56
int polygon_in_rect(xdot_op* op);
 
57
int polygon_x_rect(xdot_op* op);
 
58
 
 
59
int polyline_in_rect(xdot_op* op);
 
60
int polyline_x_rect(xdot_op* op);
 
61
 
 
62
 
 
63
int text_in_rect(xdot_op* op);
 
64
int text_x_rect(xdot_op* op);
 
65
 
 
66
int image_in_rect(xdot_op* op);
 
67
int image_x_rect(xdot_op* op);
 
68
 
 
69
 
 
70
//select functions
 
71
int select_graph(Agraph_t* g,Agraph_t*);
 
72
int select_node(Agraph_t* g,Agnode_t*);
 
73
int select_edge(Agraph_t* g,Agedge_t*);
 
74
 
 
75
int select_object (Agraph_t* g,void* obj);
 
76
int deselect_object (Agraph_t* g,void* obj);
 
77
int deselect_graph(Agraph_t* g,Agraph_t*);
 
78
int deselect_node(Agraph_t* g,Agnode_t*);
 
79
int deselect_edge(Agraph_t* g,Agedge_t*);
 
80
 
 
81
int select_all_nodes(Agraph_t* g);
 
82
int select_all_edges(Agraph_t* g);
 
83
int select_all_graphs(Agraph_t* g);
 
84
 
 
85
 
 
86
int deselect_all_nodes(Agraph_t* g);
 
87
int deselect_all_edges(Agraph_t* g);
 
88
int deselect_all_graphs(Agraph_t* g);
 
89
 
 
90
int select_all(Agraph_t* g);
 
91
int deselect_all(Agraph_t* g);
 
92
 
 
93
 
 
94
#endif