This file is indexed.

/usr/include/IV-2_6/InterViews/rubcurve.h is in ivtools-dev 1.2.11a1-6.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
/*
 * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University
 * Copyright (c) 1991 Silicon Graphics, Inc.
 *
 * Permission to use, copy, modify, distribute, and sell this software and 
 * its documentation for any purpose is hereby granted without fee, provided
 * that (i) the above copyright notices and this permission notice appear in
 * all copies of the software and related documentation, and (ii) the names of
 * Stanford and Silicon Graphics may not be used in any advertising or
 * publicity relating to the software without the specific, prior written
 * permission of Stanford and Silicon Graphics.
 * 
 * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
 * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
 * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
 *
 * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR
 * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
 * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
 * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
 * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
 * OF THIS SOFTWARE.
 */

/*
 * Rubberbanding for curves.
 */

#ifndef iv2_6_rubcurve_h
#define iv2_6_rubcurve_h

#include <IV-2_6/InterViews/rubband.h>

class RubberEllipse : public Rubberband {
public:
    RubberEllipse(
        Painter*, Canvas*, IntCoord cx, IntCoord cy, IntCoord rx, IntCoord ry,
	IntCoord offx = 0, IntCoord offy = 0
    );
    virtual ClassId GetClassId() { return RUBBERELLIPSE; }
    virtual boolean IsA (ClassId id) 
      { return RUBBERELLIPSE == id || Rubberband::IsA(id); }

    virtual void GetOriginal(
	IntCoord& cx, IntCoord& cy, IntCoord& rx, IntCoord& ry
    );
    virtual void GetCurrent(
	IntCoord& cx, IntCoord& cy, IntCoord& rx, IntCoord& ry
    );
    virtual void OriginalRadii(int& xr, int& yr);
    virtual void CurrentRadii(int& xr, int& yr);
    virtual void Draw();
protected:
    IntCoord centerx, radiusx;
    IntCoord centery, radiusy;
};

class SlidingEllipse : public RubberEllipse  {
public:
    SlidingEllipse(
        Painter*, Canvas*, IntCoord cx, IntCoord cy, IntCoord xr, IntCoord yr,
	IntCoord rfx, IntCoord rfy, IntCoord offx = 0, IntCoord offy = 0
    );
    virtual ClassId GetClassId() { return SLIDINGELLIPSE; }
    virtual boolean IsA (ClassId id) 
      { return SLIDINGELLIPSE == id || RubberEllipse::IsA(id); }
    virtual void GetCurrent(
	IntCoord& cx, IntCoord& cy, IntCoord& xr, IntCoord& yr
    );
    virtual void OriginalRadii(int&, int&);
    virtual void CurrentRadii(int&, int&);
protected:
    IntCoord refx;
    IntCoord refy;
};

class RubberCircle : public RubberEllipse {
public:
    RubberCircle(
        Painter*, Canvas*, IntCoord cx, IntCoord cy, IntCoord rx, IntCoord ry,
	IntCoord offx = 0, IntCoord offy = 0
    );
    virtual ClassId GetClassId() { return RUBBERCIRCLE; }
    virtual boolean IsA (ClassId id) 
      { return RUBBERCIRCLE == id || RubberEllipse::IsA(id); }

    virtual void OriginalRadii(int& xr, int& yr);
    virtual void CurrentRadii(int& xr, int& yr);
    virtual void Draw();
};

class RubberPointList : public Rubberband {
public:
    RubberPointList(
        Painter*, Canvas*, IntCoord px[], IntCoord py[], int n,
	IntCoord offx = 0, IntCoord offy = 0
    );
    virtual ClassId GetClassId() { return RUBBERPOINTLIST; }
    virtual boolean IsA (ClassId id) 
      { return RUBBERPOINTLIST == id || Rubberband::IsA(id); }
    ~RubberPointList();
protected:
    void Copy(IntCoord*, IntCoord*, int, IntCoord*&, IntCoord*&);
protected:
    IntCoord *x;
    IntCoord *y;
    int count;
};    

class RubberVertex : public RubberPointList {
public:
    RubberVertex(
        Painter*, Canvas*, IntCoord px[], IntCoord py[], int n, int pt,
	IntCoord offx = 0, IntCoord offy = 0
    );
    virtual ClassId GetClassId() { return RUBBERVERTEX; }
    virtual boolean IsA (ClassId id) 
      { return RUBBERVERTEX == id || RubberPointList::IsA(id); }

    virtual void GetOriginal(IntCoord*& px, IntCoord*& py, int& n, int& pt);
    virtual void GetCurrent(IntCoord*& px, IntCoord*& py, int& n, int& pt);
protected:
    void DrawSplineSection (Painter*, Canvas*, IntCoord x[], IntCoord y[]);
protected:
    int rubberPt;
};

class RubberHandles : public RubberVertex {
public:
    RubberHandles(
        Painter*, Canvas*, IntCoord x[], IntCoord y[], int n, int pt, int size,
	IntCoord offx = 0, IntCoord offy = 0
    );
    virtual ClassId GetClassId() { return RUBBERHANDLES; }
    virtual boolean IsA (ClassId id) 
      { return RUBBERHANDLES == id || RubberVertex::IsA(id); }

    virtual void Track(IntCoord x, IntCoord y);
    virtual void Draw();
protected:
    int d;	/* half of handle size */
};

class RubberSpline : public RubberVertex {
public:
    RubberSpline(
        Painter*, Canvas*, IntCoord px[], IntCoord py[], int n, int pt,
	IntCoord offx = 0, IntCoord offy = 0
    );
    virtual ClassId GetClassId() { return RUBBERSPLINE; }
    virtual boolean IsA (ClassId id) 
      { return RUBBERSPLINE == id || RubberVertex::IsA(id); }

    virtual void Draw();
};

class RubberClosedSpline : public RubberVertex {
public:
    RubberClosedSpline(
        Painter*, Canvas*, IntCoord px[], IntCoord py[], int n, int pt,
	IntCoord offx = 0, IntCoord offy = 0
    );
    virtual ClassId GetClassId() { return RUBBERCLOSEDSPLINE; }
    virtual boolean IsA (ClassId id) 
      { return RUBBERCLOSEDSPLINE == id || RubberVertex::IsA(id); }

    virtual void Draw();
};

class SlidingPointList : public RubberPointList {
public:
    SlidingPointList (
        Painter*, Canvas*, IntCoord px[], IntCoord py[], int n,
	IntCoord rfx, IntCoord rfy, IntCoord offx = 0, IntCoord offy = 0
    );
    virtual ClassId GetClassId() { return SLIDINGPOINTLIST; }
    virtual boolean IsA (ClassId id) 
      { return SLIDINGPOINTLIST == id || RubberPointList::IsA(id); }

    virtual void GetOriginal(IntCoord*& px, IntCoord*& py, int& n);
    virtual void GetCurrent(IntCoord*& px, IntCoord*& py, int& n);
    virtual void Draw();
    virtual void Track(IntCoord x, IntCoord y);
protected:
    IntCoord refx;
    IntCoord refy;
};

class SlidingLineList : public SlidingPointList {
public:
    SlidingLineList(
        Painter*, Canvas*, IntCoord x[], IntCoord y[], int n,
	IntCoord rfx, IntCoord rfy, IntCoord offx = 0, IntCoord offy = 0
    );
    virtual ClassId GetClassId() { return SLIDINGLINELIST; }
    virtual boolean IsA (ClassId id) 
      { return SLIDINGLINELIST == id || SlidingPointList::IsA(id); }

    virtual void Draw();
};    

class ScalingLineList : public RubberPointList {
public:
    ScalingLineList (
        Painter*, Canvas*, IntCoord px[], IntCoord py[], int n,
        IntCoord cx, IntCoord cy, IntCoord offx = 0, IntCoord offy = 0
    );
    virtual ClassId GetClassId() { return SCALINGLINELIST; }
    virtual boolean IsA (ClassId id) 
      { return SCALINGLINELIST == id || RubberPointList::IsA(id); }
    virtual ~ScalingLineList();

    virtual void GetOriginal(IntCoord*& px, IntCoord*& py, int& n);
    virtual void GetCurrent(IntCoord*& px, IntCoord*& py, int& n);
    virtual void Track(IntCoord, IntCoord);
    virtual void Draw();
    float CurrentScaling();
protected:
    virtual void Update();
protected:
    IntCoord* newx, *newy;
    IntCoord centerx, centery;
    IntCoord width, height;
};

class RotatingLineList : public RubberPointList {
public:
    RotatingLineList (
        Painter*, Canvas*, IntCoord px[], IntCoord py[], int n,
        IntCoord cx, IntCoord cy, IntCoord rfx, IntCoord rfy,
	IntCoord offx = 0, IntCoord offy = 0
    );
    virtual ClassId GetClassId() { return ROTATINGLINELIST; }
    virtual boolean IsA (ClassId id) 
      { return ROTATINGLINELIST == id || RubberPointList::IsA(id); }
    virtual ~RotatingLineList();

    virtual void GetOriginal(IntCoord*& px, IntCoord*& py, int& n);
    virtual void GetCurrent(IntCoord*& px, IntCoord*& py, int& n);
    virtual void Track(IntCoord, IntCoord);
    virtual void Draw();
    float OriginalAngle();
    float CurrentAngle();
protected:
    virtual void Update();
protected:
    IntCoord* newx, *newy;
    IntCoord centerx, centery;
    IntCoord refx, refy;
};

#endif