graphics tablet
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 2140
fid-graphics 0.2
fid-graphics is a simple toolkit for the Frigand Imperial Desktop. more>>
fid-graphics project is a simple toolkit for the Frigand Imperial Desktop.
It is probably the easiest toolkit to write a display engine for, but it does not support any widgets.
Enhancements:
- src/Desktop/Fid/Window.lhs (displayWaitRedisplay): New function.
- (requestRedisplay): Tidy up.
- src/Desktop/Fid/Main.lhs (data WinCapLine): New type.
- (data WindowType): Use it.
- (&&*, ||*, isnt, haveEnvVar, haveOpt): Deleted.
- (lookupFeature, lookupProtocol, lookupKeywords): New functions.
- (windowTypes): Use WindowCapLine.
- (forkProcess): Unused; deleted.
- (data FidOpt): Unused; deleted.
- (fidMain): Dont consider forking.
- Only call getOpt to sort out verbose options.
- src/Desktop/Fid/Control.lhs (PrimKey): New type.
- (instance Eq PrimKey, instance Ord PrimKey)
- (instance Show PrimKey, instance Arbitrary PrimKey): Instances for t.
- (data Key): Use it.
- (charKey, control, keyToChar): Do the right thing with PrimKey.
- (symbolKey): New function.
- (instance Arbitrary Key): Use instance Arbitrary PrimKey.
- (instance Arbitrary Char): New Instance.
<<lessIt is probably the easiest toolkit to write a display engine for, but it does not support any widgets.
Enhancements:
- src/Desktop/Fid/Window.lhs (displayWaitRedisplay): New function.
- (requestRedisplay): Tidy up.
- src/Desktop/Fid/Main.lhs (data WinCapLine): New type.
- (data WindowType): Use it.
- (&&*, ||*, isnt, haveEnvVar, haveOpt): Deleted.
- (lookupFeature, lookupProtocol, lookupKeywords): New functions.
- (windowTypes): Use WindowCapLine.
- (forkProcess): Unused; deleted.
- (data FidOpt): Unused; deleted.
- (fidMain): Dont consider forking.
- Only call getOpt to sort out verbose options.
- src/Desktop/Fid/Control.lhs (PrimKey): New type.
- (instance Eq PrimKey, instance Ord PrimKey)
- (instance Show PrimKey, instance Arbitrary PrimKey): Instances for t.
- (data Key): Use it.
- (charKey, control, keyToChar): Do the right thing with PrimKey.
- (symbolKey): New function.
- (instance Arbitrary Key): Use instance Arbitrary PrimKey.
- (instance Arbitrary Char): New Instance.
Download (0.078MB)
Added: 2006-10-02 License: Academic Free License (AFL) Price:
1122 downloads
Graphics::Simple 0.04
Graphics::Simple is a simple , device-independent graphics API for Perl. more>>
Graphics::Simple is a simple , device-independent graphics API for Perl.
SYNOPSIS
use Graphics::Simple;
line 100,100,200,200;
circle 50,50,25;
stop(); clear(); # Wait for a button press, clear the page
Ever had a Commodore C-64 or Vic-20 or some other of the machines of that era? Where doing graphics was as simple as
line 20,20,50,30;
and you didnt have to go through things like XOpenDisplay etc.
This module tries to bring back the spirit of that era in a modern environment: this module presents a simple, unified API to several different graphics devices - currently X (using Gtk and Gnome) and PostScript.
The interface is primarily made easy-to-use, starting from the idea that the above line command must work. Therefore, it exports most of the primitives by default (you can turn this off).
However, everything is not sacrificed in the name of simplicity: believing in "simple things simple, complicated things possible", this module also allows multiple windows (all the primitives also work as methods of window objects) as well as raw access to the underlying devices - although the device-independence is then lost. In future plans are some sort of interactions with the devices with which it is possible as well as the addition of more devices.
The use command currently accepts the forms
use Graphics::Simple;
use Graphics::Simple qw/line circle/;
use Graphics::Simple 300,400; # portrait paper
use Graphics::Simple 300,400, qw/line circle/;
i.e. the optional size of the default window first and then normal Exporter arguments.
Graphics::Simple has several different back-ends, currently GnomeCanvas, TkCanvas, PostScript and (not fully working yet) Fig. Other backends are expected.
To start Graphics::Simple with a given backend, you should set the environment variable GSIMPL to the value, e.g. by running your script with the command
GSIMPL=PostScript perl gt1.pl
or by setting the environment variable permanently in your shell, by
GSIMPL=PostScript
export GSIMPL
or
setenv GSIMPL PostScript
<<lessSYNOPSIS
use Graphics::Simple;
line 100,100,200,200;
circle 50,50,25;
stop(); clear(); # Wait for a button press, clear the page
Ever had a Commodore C-64 or Vic-20 or some other of the machines of that era? Where doing graphics was as simple as
line 20,20,50,30;
and you didnt have to go through things like XOpenDisplay etc.
This module tries to bring back the spirit of that era in a modern environment: this module presents a simple, unified API to several different graphics devices - currently X (using Gtk and Gnome) and PostScript.
The interface is primarily made easy-to-use, starting from the idea that the above line command must work. Therefore, it exports most of the primitives by default (you can turn this off).
However, everything is not sacrificed in the name of simplicity: believing in "simple things simple, complicated things possible", this module also allows multiple windows (all the primitives also work as methods of window objects) as well as raw access to the underlying devices - although the device-independence is then lost. In future plans are some sort of interactions with the devices with which it is possible as well as the addition of more devices.
The use command currently accepts the forms
use Graphics::Simple;
use Graphics::Simple qw/line circle/;
use Graphics::Simple 300,400; # portrait paper
use Graphics::Simple 300,400, qw/line circle/;
i.e. the optional size of the default window first and then normal Exporter arguments.
Graphics::Simple has several different back-ends, currently GnomeCanvas, TkCanvas, PostScript and (not fully working yet) Fig. Other backends are expected.
To start Graphics::Simple with a given backend, you should set the environment variable GSIMPL to the value, e.g. by running your script with the command
GSIMPL=PostScript perl gt1.pl
or by setting the environment variable permanently in your shell, by
GSIMPL=PostScript
export GSIMPL
or
setenv GSIMPL PostScript
Download (0.013MB)
Added: 2006-07-19 License: Perl Artistic License Price:
1194 downloads
g3d Graphic Tools 1.2
g3d Graphic Tools project consists of a XML file format and generic development tools for games. more>>
g3d Graphic Tools project consists of a XML file format and generic development tools for games.
The problem is that often as a games developer you need to work with many 3d editing tools and rendering engines, and there should be an easy and portable way to move objects, levels, etc. around.
By having a common intermediate file format, you only need to write one exporter per tool and one importer per graphics engine. Also, you can develop generic tools which are not tied to any particular engine.
Enhancements:
- Added the skeleton object (beginnings of animation ;)
- Added asset management info in the file header (ie date, time, author, source, description)
- Fixed exporter bugs (3dsmax) relating to heiarchy stuff
<<lessThe problem is that often as a games developer you need to work with many 3d editing tools and rendering engines, and there should be an easy and portable way to move objects, levels, etc. around.
By having a common intermediate file format, you only need to write one exporter per tool and one importer per graphics engine. Also, you can develop generic tools which are not tied to any particular engine.
Enhancements:
- Added the skeleton object (beginnings of animation ;)
- Added asset management info in the file header (ie date, time, author, source, description)
- Fixed exporter bugs (3dsmax) relating to heiarchy stuff
Download (2.3MB)
Added: 2006-11-28 License: GPL (GNU General Public License) Price:
1092 downloads
VTKGraphics 4.0.001
VTKGraphics is a Perl interface to VTKGraphics library. more>>
VTKGraphics is a Perl interface to VTKGraphics library.
SYNOPSIS
use Graphics::VTK; use Graphics::VTK::Graphics;
Graphics::VTK::Graphics is an interface to the Graphics libaray of the C++ visualization toolkit VTK.
Graphics::VTK::AppendFilter
Inherits from DataSetToUnstructuredGridFilter
Functions Supported for this class by the PerlVTK module: (To find more about their use check the VTK documentation at http://www.kitware.com.)
void AddInput (vtkDataSet *in);
const char *GetClassName ();
vtkDataSet *GetInput (int idx);
vtkDataSet *GetInput ();
vtkDataSetCollection *GetInputList ();
vtkAppendFilter *New ();
void RemoveInput (vtkDataSet *in);
vtkAppendFilter Unsupported Funcs:
Functions which are not supported supported for this class by the PerlVTK module.
void PrintSelf (ostream &os, vtkIndent indent);
I/O Streams not Supported yet.
<<lessSYNOPSIS
use Graphics::VTK; use Graphics::VTK::Graphics;
Graphics::VTK::Graphics is an interface to the Graphics libaray of the C++ visualization toolkit VTK.
Graphics::VTK::AppendFilter
Inherits from DataSetToUnstructuredGridFilter
Functions Supported for this class by the PerlVTK module: (To find more about their use check the VTK documentation at http://www.kitware.com.)
void AddInput (vtkDataSet *in);
const char *GetClassName ();
vtkDataSet *GetInput (int idx);
vtkDataSet *GetInput ();
vtkDataSetCollection *GetInputList ();
vtkAppendFilter *New ();
void RemoveInput (vtkDataSet *in);
vtkAppendFilter Unsupported Funcs:
Functions which are not supported supported for this class by the PerlVTK module.
void PrintSelf (ostream &os, vtkIndent indent);
I/O Streams not Supported yet.
Download (0.66MB)
Added: 2006-06-15 License: Perl Artistic License Price:
1227 downloads
Graphics Muse Tools 3.0.0B2
Graphics Muse Tools are plug-ins for use with the GIMP. more>>
The Graphics Muse Tools are a collection of plug-ins and scripts for use with GIMP. The package now includes a set of C plugins (GFXArrows, GFXCards, GFXTrans, GFXLayers, GFXMerge, and GFXShapes) and a set of Perl scripts (GFXDodge, GFXGallery, GFXLayerSave, and GFXLayerOffsets).
<<less Download (1.4MB)
Added: 2005-05-03 License: Free To Use But Restricted Price:
1640 downloads
Graphics::ColorObject 0.5.0
Graphics::ColorObject can convert between color spaces. more>>
Graphics::ColorObject can convert between color spaces.
SYNOPSIS
use Graphics::ColorObject;
# rgb to hsv
$color = Graphics::ColorObject->new_RGB([$r, $g, $b]);
($h, $s, $v) = @{ $color->as_HSV() };
# one rgb space to another (NTSC to PAL)
$color = Graphics::ColorObject->new_RGB([$r, $g, $b], space=>NTSC);
($r, $g, $b) = @{ $color->as_RGB(space=>PAL) };
ABSTRACT
Use this module to convert between all the common color spaces. As a pure Perl module, it is not very fast, and so it you want to convert entire images quickly, this is probably not what you want. The emphasis is on completeness and accurate conversion.
Supported color spaces are: RGB (including sRGB, Apple, Adobe, CIE Rec 601, CIE Rec 709, CIE ITU, and about a dozen other RGB spaces), CMY, CMYK, HSL, HSV, XYZ, xyY, Lab, LCHab, Luv, LCHuv, YPbPr, YCbCr, YUV, YIQ, PhotoYCC.
Conversion between different RGB working spaces, and between different white-points, is fully supported.
For any supported color space XXX, there is one constructor new_XXX that creates a color using data in that color space, and one method as_XXX that returns the current color as expressed in that color space. For example, for RGB there is new_RGB and as_RGB. The color data is always passed as an array reference to a three-element array (four-element in the case of CMYK). Thus, to convert from RGB to HSL, you can use:
$color = Graphics::ColorObject->new_RGB([$r, $g, $b]);
($h, $s, $l) = @{ $color->as_HSL() };
The constructor can always take a hash of optional arguments in addition to the color value, namely the working RGB space and the white point. For example:
$color = Graphics::ColorObject->new_RGB([$r, $g, $b], space=>Adobe, white_point=>D65);
For a list of all supported color spaces, call Graphics::ColorObject->list_colorspaces(). For a list of all RGB working spaces and of all white points that this module supports, call Graphics::ColorObject->list_rgb_spaces() and Graphics::ColorObject->list_white_points().
If not specified, the working RGB space will be sRGB. Many non-RGB conversions also rely on an implicit RGB space, and passing an RGB space as an option (either to the constructor or later) will have an effect on the values.
<<lessSYNOPSIS
use Graphics::ColorObject;
# rgb to hsv
$color = Graphics::ColorObject->new_RGB([$r, $g, $b]);
($h, $s, $v) = @{ $color->as_HSV() };
# one rgb space to another (NTSC to PAL)
$color = Graphics::ColorObject->new_RGB([$r, $g, $b], space=>NTSC);
($r, $g, $b) = @{ $color->as_RGB(space=>PAL) };
ABSTRACT
Use this module to convert between all the common color spaces. As a pure Perl module, it is not very fast, and so it you want to convert entire images quickly, this is probably not what you want. The emphasis is on completeness and accurate conversion.
Supported color spaces are: RGB (including sRGB, Apple, Adobe, CIE Rec 601, CIE Rec 709, CIE ITU, and about a dozen other RGB spaces), CMY, CMYK, HSL, HSV, XYZ, xyY, Lab, LCHab, Luv, LCHuv, YPbPr, YCbCr, YUV, YIQ, PhotoYCC.
Conversion between different RGB working spaces, and between different white-points, is fully supported.
For any supported color space XXX, there is one constructor new_XXX that creates a color using data in that color space, and one method as_XXX that returns the current color as expressed in that color space. For example, for RGB there is new_RGB and as_RGB. The color data is always passed as an array reference to a three-element array (four-element in the case of CMYK). Thus, to convert from RGB to HSL, you can use:
$color = Graphics::ColorObject->new_RGB([$r, $g, $b]);
($h, $s, $l) = @{ $color->as_HSL() };
The constructor can always take a hash of optional arguments in addition to the color value, namely the working RGB space and the white point. For example:
$color = Graphics::ColorObject->new_RGB([$r, $g, $b], space=>Adobe, white_point=>D65);
For a list of all supported color spaces, call Graphics::ColorObject->list_colorspaces(). For a list of all RGB working spaces and of all white points that this module supports, call Graphics::ColorObject->list_rgb_spaces() and Graphics::ColorObject->list_white_points().
If not specified, the working RGB space will be sRGB. Many non-RGB conversions also rely on an implicit RGB space, and passing an RGB space as an option (either to the constructor or later) will have an effect on the values.
Download (0.022MB)
Added: 2006-08-05 License: Perl Artistic License Price:
1175 downloads
PDL::Graphics::LUT 2.3.2
PDL::Graphics::LUT is a Perl module that provides access to a number of look-up tables. more>>
PDL::Graphics::LUT is a Perl module that provides access to a number of look-up tables.
SYNOPSIS
use PDL::Graphics::PGPLOT;
use PDL::Graphics::LUT;
# what tables are available
my @tables = lut_names();
# get the reversed colour table smooth,
# with the gamma intensity ramp
my ( $l, $r, $g, $b ) = lut_data( smooth, 1, gamma );
# use the table idl5 in ctab
ctab( lut_data(idl5) );
PDL::Graphics::LUT contains a number of colour look-up tables (in rgb format) and intensity ramps, and provides routines to access this data. The format of the data is suitable for use by "ctab" in PDL::Graphics::PGPLOT.
Unlike the initial release of the package, the data tables are now stored within the PDL distribution (see $tabledir and $rampdir) rather than in the module itself. Changes to these directories will be picked up on the next call to one of the package functions.
<<lessSYNOPSIS
use PDL::Graphics::PGPLOT;
use PDL::Graphics::LUT;
# what tables are available
my @tables = lut_names();
# get the reversed colour table smooth,
# with the gamma intensity ramp
my ( $l, $r, $g, $b ) = lut_data( smooth, 1, gamma );
# use the table idl5 in ctab
ctab( lut_data(idl5) );
PDL::Graphics::LUT contains a number of colour look-up tables (in rgb format) and intensity ramps, and provides routines to access this data. The format of the data is suitable for use by "ctab" in PDL::Graphics::PGPLOT.
Unlike the initial release of the package, the data tables are now stored within the PDL distribution (see $tabledir and $rampdir) rather than in the module itself. Changes to these directories will be picked up on the next call to one of the package functions.
Download (1.1MB)
Added: 2007-07-27 License: Perl Artistic License Price:
821 downloads
Text::Graphics 1.0001
Text::Graphics is a text graphics rendering toolkit. more>>
Text::Graphics is a text graphics rendering toolkit.
This is a toolkit for rendering plain text via an API like that used for graphics rendering in GUI toolkits. This package might be used when you want to do sophisticated rendering of plain text, e.g., for graphing, creating of complex forms for email and fax, and so on.
SYNOPSIS
use Text::Graphics;
my $text = "A text graphics rendering toolkit.n";
my $page = Text::Graphics::Page->new( 20, 10);
my $panel0 = Text::Graphics::BorderedPanel->new( 20, 10);
my $panel1 =
Text::Graphics::FilledBorderedTextPanel->new($text x 3, 25, 12);
$panel0->setBackground("#");
$panel1->setBackground(" ");
$page->add($panel0);
$page->add($panel1, 5, 2);
$page->render();
+-------------------+
|###################|
|####+--------------+
|####|A text graphic|
|####|rendering tool|
|####|text graphics |
|####|toolkit. A tex|
|####|graphics rende|
|####|toolkit. |
|####| |
+----+--------------+
<<lessThis is a toolkit for rendering plain text via an API like that used for graphics rendering in GUI toolkits. This package might be used when you want to do sophisticated rendering of plain text, e.g., for graphing, creating of complex forms for email and fax, and so on.
SYNOPSIS
use Text::Graphics;
my $text = "A text graphics rendering toolkit.n";
my $page = Text::Graphics::Page->new( 20, 10);
my $panel0 = Text::Graphics::BorderedPanel->new( 20, 10);
my $panel1 =
Text::Graphics::FilledBorderedTextPanel->new($text x 3, 25, 12);
$panel0->setBackground("#");
$panel1->setBackground(" ");
$page->add($panel0);
$page->add($panel1, 5, 2);
$page->render();
+-------------------+
|###################|
|####+--------------+
|####|A text graphic|
|####|rendering tool|
|####|text graphics |
|####|toolkit. A tex|
|####|graphics rende|
|####|toolkit. |
|####| |
+----+--------------+
Download (0.006MB)
Added: 2006-08-28 License: Perl Artistic License Price:
1152 downloads
Graphics::ColorUtils 0.17
Graphics::ColorUtils Perl module is an easy-to-use color space conversions and more. more>>
Graphics::ColorUtils Perl module is an easy-to-use color space conversions and more.
SYNOPSIS
use Graphics::ColorUtils;
( $y, $i, $q ) = rgb2yiq( $r, $g, $b );
( $r, $g, $b ) = yiq2rgb( $y, $i, $q );
$hex_string = yiq2rgb( $y, $i, $q );
( $c, $m, $y ) = rgb2cmy( $r, $g, $b );
( $r, $g, $b ) = cmy2rgb( $c, $m, $y );
$hex_string = cmy2rgb( $c, $m, $y );
( $h, $l, $s ) = rgb2hls( $r, $g, $b );
( $r, $g, $b ) = hls2rgb( $h, $l, $s );
$hex_string = hls2rgb( $h, $l, $s );
( $h, $s, $v ) = rgb2hsv( $r, $g, $b );
( $r, $g, $b ) = hsv2rgb( $h, $s, $v );
$hex_string = hsv2rgb( $h, $s, $v );
# -----
use Graphics::ColorUtils qw( :gradients );
( $r, $g, $b ) = grad2rgb( $name, $f ); # where 0.0 colorAllocate( hsv2rgb( 270, 0.5, 0.3 ) );.)
Features:
Color Space Conversions
Color space conversions, in particular between the "intuitive" color spaces HSV (Hue/Saturation/Value) and HLS (Hue/Lightness/Saturation) to and from RGB (Red/Green/Blue).
Color Lookup
Color lookup by name for three standard sets of colors: WWW/CSS, SVG, and X11.
Color Gradients
Management of color gradients, which can be indexed by a floating point number in the range 0..1. (Mostly intended for false-color data visualization.)
<<lessSYNOPSIS
use Graphics::ColorUtils;
( $y, $i, $q ) = rgb2yiq( $r, $g, $b );
( $r, $g, $b ) = yiq2rgb( $y, $i, $q );
$hex_string = yiq2rgb( $y, $i, $q );
( $c, $m, $y ) = rgb2cmy( $r, $g, $b );
( $r, $g, $b ) = cmy2rgb( $c, $m, $y );
$hex_string = cmy2rgb( $c, $m, $y );
( $h, $l, $s ) = rgb2hls( $r, $g, $b );
( $r, $g, $b ) = hls2rgb( $h, $l, $s );
$hex_string = hls2rgb( $h, $l, $s );
( $h, $s, $v ) = rgb2hsv( $r, $g, $b );
( $r, $g, $b ) = hsv2rgb( $h, $s, $v );
$hex_string = hsv2rgb( $h, $s, $v );
# -----
use Graphics::ColorUtils qw( :gradients );
( $r, $g, $b ) = grad2rgb( $name, $f ); # where 0.0 colorAllocate( hsv2rgb( 270, 0.5, 0.3 ) );.)
Features:
Color Space Conversions
Color space conversions, in particular between the "intuitive" color spaces HSV (Hue/Saturation/Value) and HLS (Hue/Lightness/Saturation) to and from RGB (Red/Green/Blue).
Color Lookup
Color lookup by name for three standard sets of colors: WWW/CSS, SVG, and X11.
Color Gradients
Management of color gradients, which can be indexed by a floating point number in the range 0..1. (Mostly intended for false-color data visualization.)
Download (0.021MB)
Added: 2007-07-03 License: Perl Artistic License Price:
843 downloads
PDL::Graphics::X 0.04
PDL::Graphics::X is a PDL OO access to X windows. more>>
PDL::Graphics::X is a PDL OO access to X windows.
SYNOPSIS
# example 1
use PDL;
use PDL::Graphics::X;
my $x_size = 255; my $y_size = 255;
my $win1 = PDL::Graphics::X->new({SIZE_X => $x_size, SIZE_Y => $y_size});
my $a = xvals(zeroes(byte,$x_size,$y_size));
$win1->imag($a);
# example 2
use PDL;
use PDL::Graphics::X;
my $win1 = PDL::Graphics::X->new({WIN_TITLE => "PDL", SIZE_X => 210, SIZE_Y => 210});
my $x = pdl(10, 100, 100, 10);
my $y = pdl(10, 10, 100, 100);
$win1->line($x, $y, {COLOR => [1,0,0], LINEWIDTH => 5});
This module interfaces PDL directly to X windows in a OO fashion. Each X object has an associated X window and handles opening, closing and drawing in the associated window. Hopefully it is reasonably intuitive to use. The vision is that this will serve as a base upon which other fully native PDL graphics modules could be built.
Common options such as LINEWIDTH are remembered from function call to function call, i.e. if you call $win1->line($x, $y, {COLOR => [1,0,0], LINEWIDTH => 5}) then the rectangle drawn by $win1->rect(10, 10, 190, 190) will also have a red border of width equal to 5.
FUNCTIONS
new
Constructor for a new X window object.
Usage: my $win1 = PDL::Graphics::X->new(); # open the window with the defaults
Usage: my $win1 = PDL::Graphics::X->new({WIN_TITLE => "PDL", SIZE_X => 210, SIZE_Y => 210});
Creates a new X object & its associated X window.
Options recognized :
SIZE_X - window x size in pixels (default = 400)
SIZE_Y - window y size in pixels (default = 300)
WIN_TITLE - A title for the window, if desired (default = "X")
BACK_COLOR - [r, g, b] the windows background color (default = [1.0, 1.0, 1.0], i.e. white)
imag
Display a PDL as a bitmap.
Usage: $win1->imag($my_img); # display an image with default size and scaling
Usage: $win1->imag($my_img, {AUTO_SCALE => 1.0}); # display an auto-scaled image
Displays a PDL as a bitmap. The PDL can be of size either (m,n) or (m,n,3). PDLs of size (m,n) are converted to indexed color based on the current color table (see ctab). PDLs of size (m,n,3) are displayed as true-color images with the last dimension specifying the color (RGB). Unless a re-scaling is specified, the minimum value displayed is 0.0 and the maximum is 255.0. If the PDL is larger then the window then the window will be re-scaled to accomodate the PDL;
Options recognized :
DEST_X - position of the left side of the bitmap in pixels (default = 0)
DEST_Y - position of the bottom of the bitmap in pixels (default = 0)
DEST_W - width of the bitmap to be displayed (default = width of the PDL)
DEST_H - height of the bitmap to be displayed (default = height of the PDL)
AUTO_SCALE - if set equal to 1, the PDL will be rescaled such that its
minimum value is 1 and its max is 255 (default = 0)
MIN - the minimum value to be displayed (default = 0.0)
MAX - the maximum value to be displayed (default = 255.0)
ctab
Set the color table
Usage: $win1->ctab(cat(lut_data(idl5))); # set the color table to idl5
Makes a local copy of a user supplied color table. The color table must be a 256 x 4 pdl of the form (l,r,g,b), as would be generated by the command $ct = cat(lut_data("xyz")). The l value is ignored. The r, g and b values should be in the range 0.0 - 1.0.
line
Draws a vector as connected points.
Usage: $win1->line($x, $y, {COLOR => [0,0,0], LINEWIDTH => 5}); # draw black line of width 5
Draw a poly-line between a set of points given by two PDLs of size (n). The first PDL gives the x position & the second piddle gives the y position of the individual points, n is the total number of points.
Options recognized
LINEWIDTH - line width
LINESTYLE - line style (0 = normal, 1 = dashed)
COLOR - [r, g, b] color of the line
rect
Draws a rectangle.
Usage: $win1->rect($x1, $y1, $x2, $y2);
Draws a rectangle with corners at ($x1, $y1) and ($x2, $y2).
Options recognized
LINEWIDTH - line width
LINESTYLE - line style (0 = normal, 1 = dashed)
COLOR - [r, g, b] color of the line
circle
Draws a circle.
Usage: $win1->circle($x, $y, $r);
Draws a circle centered at ($x, $y) with radius $r.
Options recognized
LINEWIDTH - line width
LINESTYLE - line style (0 = normal, 1 = dashed)
COLOR - [r, g, b] color of the line
ellipse
Draws an oval.
Usage: $win1->ellipse($x, $y, $a, $b);
Draws a oval centered at ($x, $y) with x size $a and y size $b.
Options recognized
LINEWIDTH - line width
LINESTYLE - line style (0 = normal, 1 = dashed)
COLOR - [r, g, b] color of the line
erase
Erases the contents of the window.
Usage: $win1->erase();
Resets the contents of the window to the background color.
text
Draw text
Usage: $win1->text("hello", $x, $y, $angle);
Draws text starting at $x and $y with baseline angle given by $angle. If you know how to draw truly rotated text in X, please let me know. How fonts are currently dealt with is imperfect at best. So that the font size can easily be changed, a search is performed for a scalable font with specified font name. If such a font cannot be found then the text will be displayed with the default X font and no font scaling.
Options recognized
FONT_NAME - name of the font family (default = "courier")
CHARSIZE - desired font size in points
COLOR - [r, g, b] color of the font
cursor
Returns the location of next mouse click in the window
Usage : my($x,$y) = $win1->cursor();
Returns the x & y locations of the next mouse click in the window.
we_exist
Returns 0 if the window still exists, 1 if it does not
Usage : my $exists = $win1->we_exist();
Originally written to help debug some problems with associated with X windows being closed by the user with a mouse. Preserved on the off chance that it will be useful to a dependent module.
winsize
Returns the window size & maximum window size (in pixels) in x and y
Usage : my ($win_x, $win_y, $max_x, $max_y) = $win1->winsize();
Primarily intended for use by dependent modules that might want to know what the current and maximum window size is.
resize
resizes a window & returns the new size (which might not be what you requested)
Usage : my ($new_x, $new_y) = $win1->resize($size_x, $size_y);
Primarily intended for use by dependent modules that might want to resize a window without destroying it and creating another one.
<<lessSYNOPSIS
# example 1
use PDL;
use PDL::Graphics::X;
my $x_size = 255; my $y_size = 255;
my $win1 = PDL::Graphics::X->new({SIZE_X => $x_size, SIZE_Y => $y_size});
my $a = xvals(zeroes(byte,$x_size,$y_size));
$win1->imag($a);
# example 2
use PDL;
use PDL::Graphics::X;
my $win1 = PDL::Graphics::X->new({WIN_TITLE => "PDL", SIZE_X => 210, SIZE_Y => 210});
my $x = pdl(10, 100, 100, 10);
my $y = pdl(10, 10, 100, 100);
$win1->line($x, $y, {COLOR => [1,0,0], LINEWIDTH => 5});
This module interfaces PDL directly to X windows in a OO fashion. Each X object has an associated X window and handles opening, closing and drawing in the associated window. Hopefully it is reasonably intuitive to use. The vision is that this will serve as a base upon which other fully native PDL graphics modules could be built.
Common options such as LINEWIDTH are remembered from function call to function call, i.e. if you call $win1->line($x, $y, {COLOR => [1,0,0], LINEWIDTH => 5}) then the rectangle drawn by $win1->rect(10, 10, 190, 190) will also have a red border of width equal to 5.
FUNCTIONS
new
Constructor for a new X window object.
Usage: my $win1 = PDL::Graphics::X->new(); # open the window with the defaults
Usage: my $win1 = PDL::Graphics::X->new({WIN_TITLE => "PDL", SIZE_X => 210, SIZE_Y => 210});
Creates a new X object & its associated X window.
Options recognized :
SIZE_X - window x size in pixels (default = 400)
SIZE_Y - window y size in pixels (default = 300)
WIN_TITLE - A title for the window, if desired (default = "X")
BACK_COLOR - [r, g, b] the windows background color (default = [1.0, 1.0, 1.0], i.e. white)
imag
Display a PDL as a bitmap.
Usage: $win1->imag($my_img); # display an image with default size and scaling
Usage: $win1->imag($my_img, {AUTO_SCALE => 1.0}); # display an auto-scaled image
Displays a PDL as a bitmap. The PDL can be of size either (m,n) or (m,n,3). PDLs of size (m,n) are converted to indexed color based on the current color table (see ctab). PDLs of size (m,n,3) are displayed as true-color images with the last dimension specifying the color (RGB). Unless a re-scaling is specified, the minimum value displayed is 0.0 and the maximum is 255.0. If the PDL is larger then the window then the window will be re-scaled to accomodate the PDL;
Options recognized :
DEST_X - position of the left side of the bitmap in pixels (default = 0)
DEST_Y - position of the bottom of the bitmap in pixels (default = 0)
DEST_W - width of the bitmap to be displayed (default = width of the PDL)
DEST_H - height of the bitmap to be displayed (default = height of the PDL)
AUTO_SCALE - if set equal to 1, the PDL will be rescaled such that its
minimum value is 1 and its max is 255 (default = 0)
MIN - the minimum value to be displayed (default = 0.0)
MAX - the maximum value to be displayed (default = 255.0)
ctab
Set the color table
Usage: $win1->ctab(cat(lut_data(idl5))); # set the color table to idl5
Makes a local copy of a user supplied color table. The color table must be a 256 x 4 pdl of the form (l,r,g,b), as would be generated by the command $ct = cat(lut_data("xyz")). The l value is ignored. The r, g and b values should be in the range 0.0 - 1.0.
line
Draws a vector as connected points.
Usage: $win1->line($x, $y, {COLOR => [0,0,0], LINEWIDTH => 5}); # draw black line of width 5
Draw a poly-line between a set of points given by two PDLs of size (n). The first PDL gives the x position & the second piddle gives the y position of the individual points, n is the total number of points.
Options recognized
LINEWIDTH - line width
LINESTYLE - line style (0 = normal, 1 = dashed)
COLOR - [r, g, b] color of the line
rect
Draws a rectangle.
Usage: $win1->rect($x1, $y1, $x2, $y2);
Draws a rectangle with corners at ($x1, $y1) and ($x2, $y2).
Options recognized
LINEWIDTH - line width
LINESTYLE - line style (0 = normal, 1 = dashed)
COLOR - [r, g, b] color of the line
circle
Draws a circle.
Usage: $win1->circle($x, $y, $r);
Draws a circle centered at ($x, $y) with radius $r.
Options recognized
LINEWIDTH - line width
LINESTYLE - line style (0 = normal, 1 = dashed)
COLOR - [r, g, b] color of the line
ellipse
Draws an oval.
Usage: $win1->ellipse($x, $y, $a, $b);
Draws a oval centered at ($x, $y) with x size $a and y size $b.
Options recognized
LINEWIDTH - line width
LINESTYLE - line style (0 = normal, 1 = dashed)
COLOR - [r, g, b] color of the line
erase
Erases the contents of the window.
Usage: $win1->erase();
Resets the contents of the window to the background color.
text
Draw text
Usage: $win1->text("hello", $x, $y, $angle);
Draws text starting at $x and $y with baseline angle given by $angle. If you know how to draw truly rotated text in X, please let me know. How fonts are currently dealt with is imperfect at best. So that the font size can easily be changed, a search is performed for a scalable font with specified font name. If such a font cannot be found then the text will be displayed with the default X font and no font scaling.
Options recognized
FONT_NAME - name of the font family (default = "courier")
CHARSIZE - desired font size in points
COLOR - [r, g, b] color of the font
cursor
Returns the location of next mouse click in the window
Usage : my($x,$y) = $win1->cursor();
Returns the x & y locations of the next mouse click in the window.
we_exist
Returns 0 if the window still exists, 1 if it does not
Usage : my $exists = $win1->we_exist();
Originally written to help debug some problems with associated with X windows being closed by the user with a mouse. Preserved on the off chance that it will be useful to a dependent module.
winsize
Returns the window size & maximum window size (in pixels) in x and y
Usage : my ($win_x, $win_y, $max_x, $max_y) = $win1->winsize();
Primarily intended for use by dependent modules that might want to know what the current and maximum window size is.
resize
resizes a window & returns the new size (which might not be what you requested)
Usage : my ($new_x, $new_y) = $win1->resize($size_x, $size_y);
Primarily intended for use by dependent modules that might want to resize a window without destroying it and creating another one.
Download (0.010MB)
Added: 2007-07-09 License: Perl Artistic License Price:
837 downloads
Bio::Graphics::FeatureFile 1.4
Bio::Graphics::FeatureFile is a set of Bio::Graphics features, stored in a file. more>>
Bio::Graphics::FeatureFile is a set of Bio::Graphics features, stored in a file.
SYNOPSIS
use Bio::Graphics::FeatureFile;
my $data = Bio::Graphics::FeatureFile->new(-file => features.txt);
# create a new panel and render contents of the file onto it
my $panel = $data->new_panel;
my $tracks_rendered = $data->render($panel);
# or do it all in one step
my ($tracks_rendered,$panel) = $data->render;
# for more control, render tracks individually
my @feature_types = $data->types;
for my $type (@feature_types) {
my $features = $data->features($type);
my %options = $data->style($type);
$panel->add_track($features,%options); # assuming we have a Bio::Graphics::Panel
}
# get individual settings
my $est_fg_color = $data->setting(EST => fgcolor);
# or create the FeatureFile by hand
# add a type
$data->add_type(EST => {fgcolor=>blue,height=>12});
# add a feature
my $feature = Bio::Graphics::Feature->new(
# params
); # or some other SeqI
$data->add_feature($feature=>EST);
The Bio::Graphics::FeatureFile module reads and parses files that describe sequence features and their renderings. It accepts both GFF format and a more human-friendly file format described below. Once a FeatureFile object has been initialized, you can interrogate it for its consistuent features and their settings, or render the entire file onto a Bio::Graphics::Panel.
This moduel is a precursor of Jason Stajichs Bio::Annotation::Collection class, and fulfills a similar function of storing a collection of sequence features. However, it also stores rendering information about the features, and does not currently follow the CollectionI interface.
<<lessSYNOPSIS
use Bio::Graphics::FeatureFile;
my $data = Bio::Graphics::FeatureFile->new(-file => features.txt);
# create a new panel and render contents of the file onto it
my $panel = $data->new_panel;
my $tracks_rendered = $data->render($panel);
# or do it all in one step
my ($tracks_rendered,$panel) = $data->render;
# for more control, render tracks individually
my @feature_types = $data->types;
for my $type (@feature_types) {
my $features = $data->features($type);
my %options = $data->style($type);
$panel->add_track($features,%options); # assuming we have a Bio::Graphics::Panel
}
# get individual settings
my $est_fg_color = $data->setting(EST => fgcolor);
# or create the FeatureFile by hand
# add a type
$data->add_type(EST => {fgcolor=>blue,height=>12});
# add a feature
my $feature = Bio::Graphics::Feature->new(
# params
); # or some other SeqI
$data->add_feature($feature=>EST);
The Bio::Graphics::FeatureFile module reads and parses files that describe sequence features and their renderings. It accepts both GFF format and a more human-friendly file format described below. Once a FeatureFile object has been initialized, you can interrogate it for its consistuent features and their settings, or render the entire file onto a Bio::Graphics::Panel.
This moduel is a precursor of Jason Stajichs Bio::Annotation::Collection class, and fulfills a similar function of storing a collection of sequence features. However, it also stores rendering information about the features, and does not currently follow the CollectionI interface.
Download (4.7MB)
Added: 2006-06-12 License: Perl Artistic License Price:
1229 downloads
Graphics::ColorPicker 0.10
Graphics::ColorPicker is a Perl module for WYSIWYG web applications that allow selection of HEX color numbers. more>>
Graphics::ColorPicker is a Perl module for WYSIWYG web applications that allow selection of HEX color numbers.
SYNOPSIS
use Graphics::ColorPicker;
or
require Graphics::ColorPicker;
make_page($path_to_images);
send_page($html_txt,$type);
$time_string = http_date($time);
$name = script_name;
$html_text=frames($websafe);
$html_text = msie_frame;
$html_text=picker($darkimg,$liteimg,$size,$bsize,greyimg);
$html_text=no_picker;
$html_text=cp216_ds($clrdot,$border,$square)
$javascript_text = jslib;
$html=make_buttons(%look_n_feel,$url,$active,@buttons,$xtra);
$html_text=pluck($color);
<<lessSYNOPSIS
use Graphics::ColorPicker;
or
require Graphics::ColorPicker;
make_page($path_to_images);
send_page($html_txt,$type);
$time_string = http_date($time);
$name = script_name;
$html_text=frames($websafe);
$html_text = msie_frame;
$html_text=picker($darkimg,$liteimg,$size,$bsize,greyimg);
$html_text=no_picker;
$html_text=cp216_ds($clrdot,$border,$square)
$javascript_text = jslib;
$html=make_buttons(%look_n_feel,$url,$active,@buttons,$xtra);
$html_text=pluck($color);
Download (0.11MB)
Added: 2007-07-27 License: Perl Artistic License Price:
824 downloads
GD Graphics Library 2.0.35
Gd is a graphics library. more>>
Gd is a graphics library. It allows your code to quickly draw images complete with lines, arcs, text, multiple colors, cut and paste from other images, and flood fills, and write out the result as a PNG or JPEG file. This is particularly useful in World Wide Web applications, where PNG and JPEG are two of the formats accepted for inline images by most browsers.
In gd 1.0, it stood for "gif draw." After the Unisys patent on the LZW compression used in GIF came to light and GIF support was dropped, it did not officially stand for anything, but lets just say "graphics draw" and leave it at that. (GIF support is back, thanks to the expiration of the patent, but gd can draw much more than GIFs.)
This is a quick install guide:
1. Type ./configure
2. Type make install
<<lessIn gd 1.0, it stood for "gif draw." After the Unisys patent on the LZW compression used in GIF came to light and GIF support was dropped, it did not officially stand for anything, but lets just say "graphics draw" and leave it at that. (GIF support is back, thanks to the expiration of the patent, but gd can draw much more than GIFs.)
This is a quick install guide:
1. Type ./configure
2. Type make install
Download (1.2MB)
Added: 2007-06-22 License: GPL (GNU General Public License) Price:
860 downloads
Bio::Graphics::Feature 1.4
Bio::Graphics::Feature is a simple feature object for use with Bio::Graphics::Panel. more>>
Bio::Graphics::Feature is a simple feature object for use with Bio::Graphics::Panel.
SYNOPSIS
use Bio::Graphics::Feature;
# create a simple feature with no internal structure
$f = Bio::Graphics::Feature->new(-start => 1000,
-stop => 2000,
-type => transcript,
-name => alpha-1 antitrypsin,
-desc => an enzyme inhibitor,
);
# create a feature composed of multiple segments, all of type "similarity"
$f = Bio::Graphics::Feature->new(-segments => [[1000,1100],[1500,1550],[1800,2000]],
-name => ABC-3,
-type => gapped_alignment,
-subtype => similarity);
# build up a gene exon by exon
$e1 = Bio::Graphics::Feature->new(-start=>1,-stop=>100,-type=>exon);
$e2 = Bio::Graphics::Feature->new(-start=>150,-stop=>200,-type=>exon);
$e3 = Bio::Graphics::Feature->new(-start=>300,-stop=>500,-type=>exon);
$f = Bio::Graphics::Feature->new(-segments=>[$e1,$e2,$e3],-type=>gene);
This is a simple Bio::SeqFeatureI-compliant object that is compatible with Bio::Graphics::Panel. With it you can create lightweight feature objects for drawing.
<<lessSYNOPSIS
use Bio::Graphics::Feature;
# create a simple feature with no internal structure
$f = Bio::Graphics::Feature->new(-start => 1000,
-stop => 2000,
-type => transcript,
-name => alpha-1 antitrypsin,
-desc => an enzyme inhibitor,
);
# create a feature composed of multiple segments, all of type "similarity"
$f = Bio::Graphics::Feature->new(-segments => [[1000,1100],[1500,1550],[1800,2000]],
-name => ABC-3,
-type => gapped_alignment,
-subtype => similarity);
# build up a gene exon by exon
$e1 = Bio::Graphics::Feature->new(-start=>1,-stop=>100,-type=>exon);
$e2 = Bio::Graphics::Feature->new(-start=>150,-stop=>200,-type=>exon);
$e3 = Bio::Graphics::Feature->new(-start=>300,-stop=>500,-type=>exon);
$f = Bio::Graphics::Feature->new(-segments=>[$e1,$e2,$e3],-type=>gene);
This is a simple Bio::SeqFeatureI-compliant object that is compatible with Bio::Graphics::Panel. With it you can create lightweight feature objects for drawing.
Download (4.7MB)
Added: 2006-10-21 License: Perl Artistic License Price:
1098 downloads
PDL::Graphics::AquaTerm 0.02
PDL::Graphics::AquaTerm is a Perl module that provides access to the AquaTerm Mac OS-X graphics terminal. more>>
PDL::Graphics::AquaTerm is a Perl module that provides access to the AquaTerm Mac OS-X graphics terminal.
SYNOPSIS
# example 1
use PDL;
use PDL::Graphics::LUT;
use PDL::Graphics::AquaTerm;
my $x_size = 255; my $y_size = 255;
aquaOpen({SIZE_X => $x_size, SIZE_Y => $y_size});
aquaSetColorTable(cat(lut_data(idl5)));
my $a = xvals(zeroes(byte,$x_size,$y_size));
aquaBitmap($a);
# example 2
use PDL;
use PDL::Graphics::AquaTerm;
my $x_size = 255; my $y_size = 255;
aquaOpen({WIN_NUM => 1, SIZE_X => $x_size, SIZE_Y => $y_size});
my $a = sin(xvals(zeroes(float, $x_size, $y_size)) * 0.1);
aquaBitmap($a, {AUTO_SCALE => 1});
This module interfaces PDL directly to the AquaTerm Mac OS-X graphics terminal. It is primarily intended for quickly and easily displaying bitmap images.
The coordinate system is defined by the window size (given in pixels) with (0,0) at the bottom left corner of the window. This means that if the window is set to be 300 x 200, then the bottom left corner will have coordinates (0,0) and the upper right corner will have coordinates (300,200). Anything that is drawn outside this boundary will be automatically clipped.
FUNCTIONS
aquaOpen
Open a new AquaTerm window
Usage: aquaOpen(); # open the window with the defaults
Usage: aquaOpen({SIZE_X => 200, SIZE_Y => 200, BACK_COLOR => [0.0, 0.0, 0.0]});
Opens a new AquaTerm window, it also starts AquaTerm if necessary.
Options recognized :
SIZE_X - window x size in pixels (default = 400)
SIZE_Y - window y size in pixels (default = 300)
WIN_NUM - The window number, used by the drawing commands to specify which window to draw in
WIN_TITLE - A title for the window, if desired (default = "Aquaterm.pm")
BACK_COLOR - [r, g, b] the windows background color (default = [1.0, 1.0, 1.0], i.e. white)
WARN_ON - set to 1 to turn on warning messages, 0 to turn off (default = 1)
DEBUG_ON - set to 1 to turn on debugging message, 0 to turn off (default = 0)
aquaBitmap
Display a PDL as a bitmap.
Usage: aquaDisplay($my_img); # display $my_img as a bitmap in the currently open window
Usage: aquaDisplay($my_img, {AUTO_SCALE => 1.0, TEXT => "my image", TEXT_C => [1.0, 0.0, 0.0]});
Displays a PDL as a bitmap. The PDL can be of size either (m,n) or (3,m,n). PDLs of size (m,n) are converted to indexed color based on the current color table (see aquaSetColorTable). PDLs of size (3,m,n) are displayed as true-color images with the first dimension specifying the color (RGB). Unless a re-scaling is specified, the minimum value displayed is 0.0 and the maximum is 255.0.
Options recognized :
DEST_X - position of the left side of the bitmap in pixels (default = 0)
DEST_Y - position of the bottom of the bitmap in pixels (default = 0)
DEST_W - width of the bitmap to be displayed (default = width of the PDL)
DEST_H - height of the bitmap to be displayed (default = height of the PDL)
AUTO_SCALE - if set equal to 1, the PDL will be rescaled such that its
minimum value is 1 and its max is 255 (default = 0)
M_MIN - the minimum value to be displayed (default = 0.0)
M_MAX - the maximum value to be displayed (default = 255.0)
WIN_NUM - specify which window to draw in (default = current window)
TEXT - text to display on the bitmap
TEXT_X - x location of the text in pixels (default = 6)
TEXT_Y - y location of the text in pixels (default = 10)
TEXT_C - RGB color of the text, (default = [0.0, 0.0, 0.0], i.e. black)
aquaSetColorTable
Set the color table
Usage: aquaSetColorTable(cat(lut_data(idl5))); # set the color table to idl5
Makes a local copy of a user supplied color table. The color table must be a 256 x 4 pdl of the form (l,r,g,b), as would be generated by the command $ct = cat(lut_data("xyz")). The l value is ignored. The r, g and b values should be in the range 0.0 - 1.0.
aquaPolyLine
Draws a (2,n) PDL as a line
Usage: aquaPolyLine($line, {WIDTH => 3, COLOR => [0.0, 0.0, 0.0]}); # draw $line black with width 3
Draw a poly-line between a set of points given by a PDL of size (2,n). The first dimension of the PDL gives the x & y position of the individual points, n is the total number of points.
Options recognized WIN_NUM - which window to draw the line in ERASE - clear the selected window prior to drawing the line WIDTH - line width (default = 1) CAPS - line cap style, Im still unsure exactly what this is... COLOR - RGB color of the line (default is black)
aquaText
Draw text
# draw red hello world at position 20, 30 in the current window
Usage: aquaText("hello world", X => 20, Y => 30, COLOR => [1.0, 0.0, 0.0]);
Draws text.
Options recognized WIN_NUM - which window to draw the text in ERASE - clear the current window prior to drawing the text NAME - name of the font to use (default = "Times-Roman") ANGLE - angle to display the text relative to the horizontal in degrees (default = 0.0) X - position in the window of the text anchor point (which depends on the justification of the text) (default = 6) Y - position in the window of the bottom of the text (default = 10) JUST - text justification, left = 0, center = 1, right = -1? (default = 0) SIZE - font size in points (default = 12) COLOR - text color (default is black)
aquaMouse
= for ref
Returns location of next mouse click in the active window
= for usage
($mx, $my) = aquaMouse();
Returns the location of the next mouse click in the active window as a 2 element array. The elements of the array are the x and y coordinates of the mouse click in pixels. The coordinates are relative to the bottom left corner of the active area of the window.
Options recognized WIN_NUM - which window to get the mouse click in
<<lessSYNOPSIS
# example 1
use PDL;
use PDL::Graphics::LUT;
use PDL::Graphics::AquaTerm;
my $x_size = 255; my $y_size = 255;
aquaOpen({SIZE_X => $x_size, SIZE_Y => $y_size});
aquaSetColorTable(cat(lut_data(idl5)));
my $a = xvals(zeroes(byte,$x_size,$y_size));
aquaBitmap($a);
# example 2
use PDL;
use PDL::Graphics::AquaTerm;
my $x_size = 255; my $y_size = 255;
aquaOpen({WIN_NUM => 1, SIZE_X => $x_size, SIZE_Y => $y_size});
my $a = sin(xvals(zeroes(float, $x_size, $y_size)) * 0.1);
aquaBitmap($a, {AUTO_SCALE => 1});
This module interfaces PDL directly to the AquaTerm Mac OS-X graphics terminal. It is primarily intended for quickly and easily displaying bitmap images.
The coordinate system is defined by the window size (given in pixels) with (0,0) at the bottom left corner of the window. This means that if the window is set to be 300 x 200, then the bottom left corner will have coordinates (0,0) and the upper right corner will have coordinates (300,200). Anything that is drawn outside this boundary will be automatically clipped.
FUNCTIONS
aquaOpen
Open a new AquaTerm window
Usage: aquaOpen(); # open the window with the defaults
Usage: aquaOpen({SIZE_X => 200, SIZE_Y => 200, BACK_COLOR => [0.0, 0.0, 0.0]});
Opens a new AquaTerm window, it also starts AquaTerm if necessary.
Options recognized :
SIZE_X - window x size in pixels (default = 400)
SIZE_Y - window y size in pixels (default = 300)
WIN_NUM - The window number, used by the drawing commands to specify which window to draw in
WIN_TITLE - A title for the window, if desired (default = "Aquaterm.pm")
BACK_COLOR - [r, g, b] the windows background color (default = [1.0, 1.0, 1.0], i.e. white)
WARN_ON - set to 1 to turn on warning messages, 0 to turn off (default = 1)
DEBUG_ON - set to 1 to turn on debugging message, 0 to turn off (default = 0)
aquaBitmap
Display a PDL as a bitmap.
Usage: aquaDisplay($my_img); # display $my_img as a bitmap in the currently open window
Usage: aquaDisplay($my_img, {AUTO_SCALE => 1.0, TEXT => "my image", TEXT_C => [1.0, 0.0, 0.0]});
Displays a PDL as a bitmap. The PDL can be of size either (m,n) or (3,m,n). PDLs of size (m,n) are converted to indexed color based on the current color table (see aquaSetColorTable). PDLs of size (3,m,n) are displayed as true-color images with the first dimension specifying the color (RGB). Unless a re-scaling is specified, the minimum value displayed is 0.0 and the maximum is 255.0.
Options recognized :
DEST_X - position of the left side of the bitmap in pixels (default = 0)
DEST_Y - position of the bottom of the bitmap in pixels (default = 0)
DEST_W - width of the bitmap to be displayed (default = width of the PDL)
DEST_H - height of the bitmap to be displayed (default = height of the PDL)
AUTO_SCALE - if set equal to 1, the PDL will be rescaled such that its
minimum value is 1 and its max is 255 (default = 0)
M_MIN - the minimum value to be displayed (default = 0.0)
M_MAX - the maximum value to be displayed (default = 255.0)
WIN_NUM - specify which window to draw in (default = current window)
TEXT - text to display on the bitmap
TEXT_X - x location of the text in pixels (default = 6)
TEXT_Y - y location of the text in pixels (default = 10)
TEXT_C - RGB color of the text, (default = [0.0, 0.0, 0.0], i.e. black)
aquaSetColorTable
Set the color table
Usage: aquaSetColorTable(cat(lut_data(idl5))); # set the color table to idl5
Makes a local copy of a user supplied color table. The color table must be a 256 x 4 pdl of the form (l,r,g,b), as would be generated by the command $ct = cat(lut_data("xyz")). The l value is ignored. The r, g and b values should be in the range 0.0 - 1.0.
aquaPolyLine
Draws a (2,n) PDL as a line
Usage: aquaPolyLine($line, {WIDTH => 3, COLOR => [0.0, 0.0, 0.0]}); # draw $line black with width 3
Draw a poly-line between a set of points given by a PDL of size (2,n). The first dimension of the PDL gives the x & y position of the individual points, n is the total number of points.
Options recognized WIN_NUM - which window to draw the line in ERASE - clear the selected window prior to drawing the line WIDTH - line width (default = 1) CAPS - line cap style, Im still unsure exactly what this is... COLOR - RGB color of the line (default is black)
aquaText
Draw text
# draw red hello world at position 20, 30 in the current window
Usage: aquaText("hello world", X => 20, Y => 30, COLOR => [1.0, 0.0, 0.0]);
Draws text.
Options recognized WIN_NUM - which window to draw the text in ERASE - clear the current window prior to drawing the text NAME - name of the font to use (default = "Times-Roman") ANGLE - angle to display the text relative to the horizontal in degrees (default = 0.0) X - position in the window of the text anchor point (which depends on the justification of the text) (default = 6) Y - position in the window of the bottom of the text (default = 10) JUST - text justification, left = 0, center = 1, right = -1? (default = 0) SIZE - font size in points (default = 12) COLOR - text color (default is black)
aquaMouse
= for ref
Returns location of next mouse click in the active window
= for usage
($mx, $my) = aquaMouse();
Returns the location of the next mouse click in the active window as a 2 element array. The elements of the array are the x and y coordinates of the mouse click in pixels. The coordinates are relative to the bottom left corner of the active area of the window.
Options recognized WIN_NUM - which window to get the mouse click in
Download (0.008MB)
Added: 2007-08-14 License: Perl Artistic License Price:
801 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above graphics tablet search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed