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

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

Serving Software Downloads in 976 Categories, Downloaded 31.580.376 Times

PDL::Graphics::X 0.04

  Date Added: June 07, 2010  |  Visits: 756


Report Broken Link
Printer Friendly Version

Product Homepage
Download (81 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
Sports  -  Delhi Cricket
The Daredevils dominated for much of the 2009 IPL under the captaincy of Gautam Gambhir, finishing at the top of the table after the league stages despite a mid-tournament injury to icon player Virender Sehwag. AB de Villiers and Tillakaratne...
2 MB  
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....
Social Networking  -  101 Best Blonde Jokes 1.0
This App is free for a limited time only in order to celebrate the launch of our new App iFunny+ 101 of the best Blonde Jokes in one App! If you like this App, you will be sure to LOVE our new App iFunny+! Check it out on the App...
2.6 MB  
Sports  -  49ers Quiz 1.0
Test your knowledge of the San Francisco 49ers. See if you are a true 49ers fan! There will be questions on the history of the 49ers organization, famous players and historic plays. Requirements: iOS 4.3 or later. Compatible with iPhone, iPad,...
1.3 MB  
Business  -  AWRA 2013 Annual Conference 1.0
AWRA's 48th Annual Water Resources Conference will touch on just about every aspect of water resources - physical, chemical, economic, biological, social, geological, legal, hydrological, political, cultural. There will be special sessions...
8 MB  
Finance  -  CBCC Mobile 2.4.5
With Citizens Bank of Cumberland Countys Mobile Banking you can safely and securely access your accounts. You will be able to check your balance, transfer funds, and utilize the device GPS to get directions and access to branch locations...
6.2 MB  
Utilities  -  Easy Unit Conversion 1.0
Unit Conversion is very Easy Application for End Users. It's a one Page Application to it will be very easy to access for end User. - Flat User Interface - Quick Result - Lots of Physics Unit Requirements: iOS 4.3 or later....
1.7 MB  
Education  -  Guide for The Sims 3 Island Paradise 1.0
Are you looking for a collection of the best cheats and tips for the Sims 3 Island Paradise? This app will be your new best friend. These cheats will help you to boost your high score and to beat your friends. Whenever you are stuck at some level...
14.6 MB  
Games  -  Gun Fu: Stickman Edition 3.7.0
The unrivalled action and intensity of Gun Fu returns - in stickman form! Blast through endless hordes of enemies in the fastest action game on the app store. Your reaction time will be put to the test as you blow away stickman...
29.2 MB  
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by, it is used to describe information about an application such as the name and...
327.68 KB  
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  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.13.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