This file is indexed.

/usr/lib/perl5/G2.pm is in libg20-perl 0.72-5.

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
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
package G2;

use strict;
use Carp;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);

require Exporter;
require DynaLoader;
require AutoLoader;
use strict;

@ISA = qw(Exporter DynaLoader);
# Items to export into callers namespace by default. Note: do not export
# names by default without a very good reason. Use EXPORT_OK instead.
# Do not simply export all your public functions/methods/constants.
@EXPORT = qw(
	G2LD
	G2_H
	G2_VERSION
);
$VERSION = '0.01';

sub AUTOLOAD {
    # This AUTOLOAD is used to 'autoload' constants from the constant()
    # XS function.  If a constant is not found then control is passed
    # to the AUTOLOAD in AutoLoader.

    my $constname;
    ($constname = $AUTOLOAD) =~ s/.*:://;
    my $val = constant($constname, @_ ? $_[0] : 0);
    if ($! != 0) {
	if ($! =~ /Invalid/) {
	    $AutoLoader::AUTOLOAD = $AUTOLOAD;
	    goto &AutoLoader::AUTOLOAD;
	}
	else {
		croak "Your vendor has not defined G2 macro $constname";
	}
    }
    eval "sub $AUTOLOAD { $val }";
    goto &$AUTOLOAD;
}

bootstrap G2 $VERSION;

# Preloaded methods go here.

# Autoload methods go after =cut, and are processed by the autosplit program.

1;
__END__
# Below is the stub of documentation for your module. You better edit it!

=head1 NAME

G2 - A simple graphics library ported to Perl. 

=head1 SYNOPSIS

  use G2;

  $dev1 = newX11 G2::Device(775, 575);
  $dev2 = newGD  G2::Device("test.png",600,200);

  $dev1->rectangle(20,20,150,150);
  $dev1->circle(100,150,60);

  $dev2->circle(100,150,60);
  $dev2->string(100,50,"A circle in a PNG file");

=head1 DESCRIPTION

g2 is a simple to use graphics library for 2D graphical applications.
This library provides a comprehensive set of functions for
simultaneous generation of graphical output on different types of devices.
Presently, following devices are currently supported by g2: X11, PNG,
PostScript (xfig is in developement).
One major feature of the g2_library is the concept of virtual devices. An
arbitrary number of physical devices (such as PNG, or X11) can be grouped to
create a so-called virtual device. Commands sent to such a virtual devices
will automatically issued to all attached physical devices. This allows for
example simultaneous output to a PNG file and a Postscript file. A virtual
device in turn can be attached to another virtual device, allowing to
construct trees of devices.
Virtual devices can also be useful when using different user-coordinate
systems. E.g. one X11 window showing an overview of a graphical output, and
a second window showing  a zoom of a more detailed area of the graphic.
Drawing in both windows is performed by one single command to the virtual
device.
Please see g2 documentation (C interface) for up to date version.

=head1 Exported constants

  G2LD
  G2_H
  G2_VERSION


=head1 Exported functions

=head2 Creating new devices

=over 5

=item C<newX11>

C<G2::Device::newX11(width,height)> I<class method>

opens an X11 window with width and height of X11 window given in pixels.
returns : a new X11 device.

=item C<newPS>

C<G2::Device::newPS(filename,paper,orientation)> I<class method>

opens a new PostScript device.
file_name: name of PostScript file
paper: Paper size (e.g. g2_A4, g2_Letter). See
PostScript paper sizes for a full list of supported sizes.
orientation: paper orientation. Either g2_PS_land for
landscape or g2_PS_port  for  portrait
returns : a new PostScript device.

=item C<newGD>

C<G2::Device::newGD(filename,width,height,type)> I<class method>

open a new GD device
width,height: width and height of the image in pixels
filename: name of the output file.
type: file type, 0-jpeg, 1-png
returns : a new GD device

=item C<newVD>

C<G2::Device::newVD()> I<class method>

Create a new Virtual Device.  An arbitrary number of physical devices
(such as PNG, or X11) can be grouped to
create a so-called virtual device. Commands sent to such a virtual devices
will automatically issued to all attached physical devices. This allows for
example simultaneous output to a PNG file and a Postscript file. A virtual
device in turn can be attached to another virtual device, allowing to
construct trees of devices.
Virtual devices can also be useful when using different user-coordinate
systems. E.g. one X11 window showing an overview of a graphical output, and
a second window showing  a zoom of a more detailed area of the graphic.
Drawing in both windows is performed by one single command to the virtual
device.

=back

=head2 Device Functions

=over 5

=item C<>

C<G2::Device::attach(dev)> I<object method>

=item C<>

C<G2::Device::detach(dev)> I<object method>

=item C<>

C<G2::Device::close()> I<object method>

=item C<set_auto_flush>

C<G2::Device::set_auto_flush(on_off)> I<object method>

=item C<flush>

C<G2::Device::flush()> I<object method>

=item C<save>

C<G2::Device::save()> I<object method>

=item C<set_coordinate_system>

C<G2::Device::set_coordinate_system(x_origin, y_origin, x_mul, y_mul)> I<object method>

=item C<ld>

C<G2::Device::ld()> I<object method>

=item C<set_ld>

C<G2::Device::set_ld( dev)> I<object method>

=item C<ink>

C<G2::Device::ink( pd_dev, red, green, blue)> I<object method>

=item C<pen>

C<G2::Device::pen(color)> I<object method>

=item C<set_dash>

C<G2::Device::set_dash(N, *dashes)> I<object method>

=item C<set_font_size>

C<G2::Device::set_font_size(size)> I<object method>

=item C<set_line_width>

C<G2::Device::set_line_width(w)> I<object method>

=item C<clear_palette>

C<G2::Device::clear_palette( dev)> I<object method>

=item C<reset_palette>

C<G2::Device::reset_palette( dev)> I<object method>

=item C<allocate_basic_colors>

C<G2::Device::allocate_basic_colors( dev)> I<object method>

=item C<clear>

C<G2::Device::clear( dev)> I<object method>

=item C<set_background>

C<G2::Device::set_background(color)> I<object method>

=back

=head2 Drawing Functions

=over 5

=item C<move>

C<G2::Device::move(x, y)> I<object method>

=item C<move_r>

C<G2::Device::move_r(dx, dy)> I<object method>

=item C<plot>

C<G2::Device::plot(x, y)> I<object method>

=item C<plot_r>

C<G2::Device::plot_r(dx, dy)> I<object method>

=item C<line>

C<G2::Device::line(x1, y1, x2, y2)> I<object method>

=item C<line_r>

C<G2::Device::line_r(dx, dy)> I<object method>

=item C<line_to>

C<G2::Device::line_to(x, y)> I<object method>

=item C<poly_line>

C<G2::Device::poly_line(N_pt, *pos)> I<object method>

=item C<triangle>

C<G2::Device::triangle(x1, y1, x2, y2, x3, y3)> I<object method>

=item C<filled_triangle>

C<G2::Device::filled_triangle(x1, y1, x2, y2, x3, y3)> I<object method>

=item C<rectangle>


C<G2::Device::rectangle(x1, y1, x2, y2)> I<object method>

=item C<filled_rectangle>

C<G2::Device::filled_rectangle(x1, y1, x2, y2)> I<object method>

=item C<polygon>

C<G2::Device::polygon(N_pt, *pos)> I<object method>

=item C<filled_polygon>

C<G2::Device::filled_polygon(N_pt, *pos)> I<object method>

=item C<circle>

C<G2::Device::circle(x, y, r)> I<object method>

=item C<filled_circle>
	
C<G2::Device::filled_circle(x, y, r)> I<object method>

=item C<ellipse>

C<G2::Device::ellipse(x, y, r1, r2)> I<object method>
          Draw an ellipse on device dev
          x,y: center point
          r1,r2: x and y radius

=item C<filled_ellipse>

C<G2::Device::filled_ellipse(x, y, r1, r2)> I<object method>
          Draw a filled ellipse on device dev
          x,y: center point
          r1,r2: x and y radius

=item C<arc>

C<G2::Device::arc(x, y, r1, r2, a1, a2)> I<object method>

Draw an arc with center point at (x,y), x and y radius given by
r1,r2 and starting and ending angle in radians a1,a2

=item C<filled_arc>

C<G2::Device::filled_arc(x, y, r1, r2, a1, a2)> I<object method>
          Draw a filled arc on device dev
          x,y: center point
          r1,r2: x and y radius
          a1,a2: starting and ending angle in radians

=item C<string>

C<G2::Device::string(x, y, char *text)> I<object method>

=item C<>

C<G2::Device::set_QP(d, enum QPshape shape)> I<object method>

=item C<>

C<G2::Device::plot_QP(x, y)> I<object method>

=back

=head1 AUTHORS

Horst Wagner (wagner/users-sourceforge.net) and Ljubomir Milanovic (ljubo/users-sourceforge-net)

=head1 COPYRIGHT

Copyright (C) 1998-2001  Ljubomir Milanovic & Horst Wagner
This file is part of the g2 library

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    
=cut