Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.222.705 Times

PDL::Graphics::X 0.04

  Date Added: June 07, 2010  |  Visits: 1.073

PDL::Graphics::X

Report Broken Link
Printer Friendly Version


Product Homepage
Download (106 downloads)



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..

Requirements: No special requirements
Platforms: Linux
Keyword: Color Color Of Color Table Line Style Line Width Linestyle Linewidth Oo Pdl Size To X Will Be Window
Users rating: 0/10

License: Freeware Size: 10.24 KB
USER REVIEWS
More Reviews or Write Review


PDL::GRAPHICS::X RELATED
Audio Encoders & Decoders  -  Free iovSoft MP3 Cutter Joiner 3.06.09
Do you want to cut and get out the excellent part in an audio file? Do you want to join a lot of audio files into one file? Please test Free iovSoft MP3 Cutter Joiner. It will be your best choice. Free iovSoft MP3 Cutter Joiner consists of a...
2.66 MB  
Modules  -  File Upload Progress Monitor 5.x-1.x-dev 1.0
A message including %uploaded, upload speed and estimated time to upload will be displayed on top of the ajax upload bar.InstallationUnpack in your modules folder (usually /sites/all/modules/) and enable under Administer > Site Building > Modules....
 
Programming  -  console_reader 1.1
console_reader is a class useful when you want to read and interpretate the output of a command line program, and espacialy when you want to write a graphical frontend to a command line program. This class has a protected member...
1.05 MB  
Audio Tools  -  Pymprovisator 0.1.1
Pymprovisator is a program for jazz musicians. Its a command-line program who reads a text file and generate a wonderful MIDI file. I have tried this program and I have seen that its much better than Pymprovisator, so I am going to stop the...
266.24 KB  
Delphi Utilities  -  RxLIB 2.0
Set of components which will be estimated by any programmer, in particular RxRichEdit (with support BMP of maps). Components for operation with forms, databases, visualisation
1003.52 KB  
ActiveX Components  -  Cut 1D X 3.0
Cut 1D X is an Automation Component used for obtaining optimal cutting designs of one dimensional pieces which may have angles different of 90 degrees at their extremities. Cut 1D X can be used for cutting linear pieces such as bars, pipes,...
351.56 KB  
File Renamers  -  DVD Backup Creator 1.0.0.0
DVD Backup Creator is an easy to use tool to make a copy (backup) of any type of CD/DVD disc, so your important CD/DVD discs will be safe. You can backup to your hard drive or another disc. With DVD Backup Creator you can grab any type of CD/DVD....
2.79 MB  
Games  -  Memory V 1. 2. 2000
In this game there will be a grid of cards. You will be given some time the memorise the contents of the cards, after that the cards will be covered. You will then need to open the cards, but you need to avoid the bombs otherwise you will lose the...
262 KB  
Multimedia  -  Change Image Cell BackGround Color for Graphics and Animations 1.1
This script allows you to change the background color of a TABLE cell where the cell contains an image.Any number strings of a unique portion of an Image SRC are passed to a function which changesthe background color of all elements containing an...
10 KB  
Libraries  -  text-vimcolor 0.11
text-vimcolor is a command-line program to syntax color a file in HTML, XML or PDF. SYNOPSIS $ text-vimcolor --format html --full-page FILENAME > OUTPUT.html $ text-vimcolor --format xml FILENAME > OUTPUT.xml $ text-vimcolor --format pdf...
20.48 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB