360
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 21
sx360 1.0
sx360 is an open source c++ library for dealing with 360 column binary format. more>>
sx360 is an open source c++ library for dealing with 360 column binary format. Although it is in its infancy, it is very complete in its featureset. The library supports files greater than 4 GB in size.
Project files are available for XCode, Visual Studio 2005, and Linux (autoconf/automake).
sx360 has been tested on :
- Mac OS X 10.4
- CentOS 5 (32 and 64 bit)
- Ubuntu 7.04 (32 bit)
- Windows XP SP2
<<lessProject files are available for XCode, Visual Studio 2005, and Linux (autoconf/automake).
sx360 has been tested on :
- Mac OS X 10.4
- CentOS 5 (32 and 64 bit)
- Ubuntu 7.04 (32 bit)
- Windows XP SP2
Download (0.46MB)
Added: 2007-08-06 License: BSD License Price:
811 downloads
Webmin 1.360
Webmin is a Web-based interface for Unix system administration. more>>
Webmin is a web-based interface for system administration for Unix.
Using any browser that supports tables and forms, you can setup user accounts, internet services, DNS, file sharing and so on.
<<lessUsing any browser that supports tables and forms, you can setup user accounts, internet services, DNS, file sharing and so on.
Download (9.3MB)
Added: 2007-08-04 License: BSD License Price:
820 downloads
Burn_360 0.6
Burn 360 is a VCD ripping, Encoding and Creation GUI written in perl-Gtk2. more>>
Burn 360 is a VCD ripping, Encoding and Creation GUI written in perl-Gtk2.
This is a frontend to three programs - ffmpeg, vcdimager and cdrdao written in perl-gtk2.
It is designed to enable (as seperate processes).
Rip video tracks from VCDs.
Encode from/to any format that ffmpeg supports (these are in a seperate file called opts).
Create a new VCD from MPEGs on hard drive.
<<lessThis is a frontend to three programs - ffmpeg, vcdimager and cdrdao written in perl-gtk2.
It is designed to enable (as seperate processes).
Rip video tracks from VCDs.
Encode from/to any format that ffmpeg supports (these are in a seperate file called opts).
Create a new VCD from MPEGs on hard drive.
Download (0.15MB)
Added: 2007-03-10 License: GPL (GNU General Public License) Price:
962 downloads
Xbox360 Controller Driver
Xbox360 Controller Driver package contains the diabolixs compiled Xbox360 controller driver for Linux on the PS3. more>>
Xbox360 Controller Driver package contains the diabolixs compiled Xbox360 controller driver for Linux on the PS3.
Its been tested with Fedora Core 5 (PPC distribution) using Snes9x and Doom.
The Xbox 360 is the successor to Microsofts Xbox video game console, developed in cooperation with IBM, ATI, Samsung and SiS. Information on the console first came through viral marketing campaigns and it was officially unveiled on MTV on May 12, 2005, with detailed launch and game information divulged later that month at the Electronic Entertainment Expo.
The Xbox 360 is the first console to have a near-simultaneous launch across the three major regions, and the first to provide wireless controller support at launch. The console sold out completely at release and by the end of 2006 had sold 10.4 million worldwide.
The Xbox 360 was the first home console to be released in the seventh generation of game consoles and competes against Sonys PlayStation 3 and Nintendos Wii. Its Xbox Live service allows players to compete online as well as download games and additional content.
<<lessIts been tested with Fedora Core 5 (PPC distribution) using Snes9x and Doom.
The Xbox 360 is the successor to Microsofts Xbox video game console, developed in cooperation with IBM, ATI, Samsung and SiS. Information on the console first came through viral marketing campaigns and it was officially unveiled on MTV on May 12, 2005, with detailed launch and game information divulged later that month at the Electronic Entertainment Expo.
The Xbox 360 is the first console to have a near-simultaneous launch across the three major regions, and the first to provide wireless controller support at launch. The console sold out completely at release and by the end of 2006 had sold 10.4 million worldwide.
The Xbox 360 was the first home console to be released in the seventh generation of game consoles and competes against Sonys PlayStation 3 and Nintendos Wii. Its Xbox Live service allows players to compete online as well as download games and additional content.
Download (0.071MB)
Added: 2007-01-09 License: Freeware Price:
640 downloads
Plagger::Plugin::CustomFeed::Yahoo360JP 0.7.8
Plagger::Plugin::CustomFeed::Yahoo360JP is a Yahoo! 360 JAPAN custom feed. more>>
Plagger::Plugin::CustomFeed::Yahoo360JP is a Yahoo! 360 JAPAN custom feed.
SYNOPSIS
- module: CustomFeed::Yahoo360JP
config:
username: your-yahoo-id
password: xxxxxxxx
fetch_body: 1
fetch_blast: 1
This plugin fetches your friends blog updates and blast updates from Yahoo! JAPAN 360 and make a custom feed off of them.
CONFIG
username, password
Your Yahoo! ID and password to login.
Note that you dont have to supply these variables if you set global cookie_jar in your configuration file and the cookie_jar contains a valid login session there, such as:
global:
user_agent:
cookies: /path/to/cookies.txt
See Plagger::Cookies for details.
fetch_body
Specifies whether this plugin fetches body of your friends blog entry. Defaults to 0.
fetch_blast
Specifies whether this plugin fetches a list of your friends blasts. Defaults to 0.
<<lessSYNOPSIS
- module: CustomFeed::Yahoo360JP
config:
username: your-yahoo-id
password: xxxxxxxx
fetch_body: 1
fetch_blast: 1
This plugin fetches your friends blog updates and blast updates from Yahoo! JAPAN 360 and make a custom feed off of them.
CONFIG
username, password
Your Yahoo! ID and password to login.
Note that you dont have to supply these variables if you set global cookie_jar in your configuration file and the cookie_jar contains a valid login session there, such as:
global:
user_agent:
cookies: /path/to/cookies.txt
See Plagger::Cookies for details.
fetch_body
Specifies whether this plugin fetches body of your friends blog entry. Defaults to 0.
fetch_blast
Specifies whether this plugin fetches a list of your friends blasts. Defaults to 0.
Download (0.25MB)
Added: 2006-12-12 License: Perl Artistic License Price:
1046 downloads
Grid Wars 2 20060309
Grid Wars 2 is a space shooter arcade game. more>>
Grid Wars 2 is a space shooter arcade game.
Grid Wars2 is basically a PC version of the popular Xbox 360 game, Geometry Wars. Made by Mark Incitti, this release features less special effects compared to the original but also new controls to cater for players who do not own a dual analog joypad.
Your small ship sits in a one-screen grid and vectorized enemies spawn to attack. Use your any-directional gun to stay alive while you rake in points. Along the way a few power-ups will give you a hand, and theres always the emergency screen-clearing bomb you can unleash.
The hybrid option control allows a player to use both mouse and keyboard for ship movement as well as aiming their shots.
<<lessGrid Wars2 is basically a PC version of the popular Xbox 360 game, Geometry Wars. Made by Mark Incitti, this release features less special effects compared to the original but also new controls to cater for players who do not own a dual analog joypad.
Your small ship sits in a one-screen grid and vectorized enemies spawn to attack. Use your any-directional gun to stay alive while you rake in points. Along the way a few power-ups will give you a hand, and theres always the emergency screen-clearing bomb you can unleash.
The hybrid option control allows a player to use both mouse and keyboard for ship movement as well as aiming their shots.
Download (2.6MB)
Added: 2006-09-26 License: Freeware Price:
4094 downloads
LibOrb 0.8
LibOrb is a library for comminicating with a SpaceOrb 360 and Spaceball Avenger Six-Degree-Of-Freedom virtual reality controller more>>
LibOrb is a library for comminicating with a SpaceOrb 360 and Spaceball Avenger Six-Degree-Of-Freedom virtual reality controllers made by Spacetec IMC.
The SpaceOrb allows you to move and rotate in any direction simultaneously. The device connects to your machine via a standard RS-232 serial interface. LibOrb can be used along with OpenGL or other real-time graphics APIs to write virtual reality software, games, or other applications.
The orb provides high resolution translational and rotational information, suitable for even the most demanding tasks. The orb has 6 general purpose buttons and 1 hardware reset button, all of which can be read by an application using LibOrb.
LibOrb has been used successfully on Sun Solaris 2.[56], SGI IRIX 6.2, Linux, OpenBSD, and Windows NT.
<<lessThe SpaceOrb allows you to move and rotate in any direction simultaneously. The device connects to your machine via a standard RS-232 serial interface. LibOrb can be used along with OpenGL or other real-time graphics APIs to write virtual reality software, games, or other applications.
The orb provides high resolution translational and rotational information, suitable for even the most demanding tasks. The orb has 6 general purpose buttons and 1 hardware reset button, all of which can be read by an application using LibOrb.
LibOrb has been used successfully on Sun Solaris 2.[56], SGI IRIX 6.2, Linux, OpenBSD, and Windows NT.
Download (0.022MB)
Added: 2006-05-26 License: BSD License Price:
1249 downloads
jFin B0.2.0
jFin is a pure Java open source financial date arithmetic. more>>
jFin is a pure Java open source financial date arithmetic.
jFin has entered its first beta. The API is now stable, any changes to the API between now and the first release will be new methods or overloading of existing methods so that testing can happen against a stable target.
Get involved and contribute to both the development of the API and testing it in real world situations.
The library supports preceding, modified preceding, following and modified following date adjustments.
It has initial implementations of the following day count bases:
- FBA Actual/Actual
- Actual/360
- Actual/365 Fixed
- Business/252
- European 30/360
- ISDA Actual/Actual
- ISMA Actual/Actual
- Italian 30/360
- US 30/360
The default holiday calendar only provides weekends but can be used without configuration. The distribution also includes an implementation of a holiday calendar which uses files from financialcalendar.com in their tri-col format.
The schedule generator supports all stub types, and generates notional (sometimes referred to as reference) periods to allow the accurate calculation of ISMA Actual/Actual day counts from short and long periods. Stub types supported are:
- None
- Short first
- Long first
- Short last
- Long last
Enhancements:
- This release adds an implementation of strongly typed (generic) accrual periods and an accrual schedule object.
- With these, you can model your own accrual periods (with their own underlying and/or fixings), and the accrual schedule will manage the adjustment, daycount fraction, and payment calculations for you.
- The holiday calendars have been made generic to simplify their use with subclasses of Period.
<<lessjFin has entered its first beta. The API is now stable, any changes to the API between now and the first release will be new methods or overloading of existing methods so that testing can happen against a stable target.
Get involved and contribute to both the development of the API and testing it in real world situations.
The library supports preceding, modified preceding, following and modified following date adjustments.
It has initial implementations of the following day count bases:
- FBA Actual/Actual
- Actual/360
- Actual/365 Fixed
- Business/252
- European 30/360
- ISDA Actual/Actual
- ISMA Actual/Actual
- Italian 30/360
- US 30/360
The default holiday calendar only provides weekends but can be used without configuration. The distribution also includes an implementation of a holiday calendar which uses files from financialcalendar.com in their tri-col format.
The schedule generator supports all stub types, and generates notional (sometimes referred to as reference) periods to allow the accurate calculation of ISMA Actual/Actual day counts from short and long periods. Stub types supported are:
- None
- Short first
- Long first
- Short last
- Long last
Enhancements:
- This release adds an implementation of strongly typed (generic) accrual periods and an accrual schedule object.
- With these, you can model your own accrual periods (with their own underlying and/or fixings), and the accrual schedule will manage the adjustment, daycount fraction, and payment calculations for you.
- The holiday calendars have been made generic to simplify their use with subclasses of Period.
Download (MB)
Added: 2007-01-20 License: GPL (GNU General Public License) Price:
1010 downloads
Gunroar 0.15
Gunroar is a 360-degree gunboat shooter. more>>
Gunroar is a 360-degree gunboat shooter. An abstract shooter; Shoot in any direction, as you race through the levels.
Keep near the top of the screen to increase your score. Destroy the enemy fleet. Comes with a soundtrack and effects.
Enhancements:
- Added -enableaxis5 option. (for xbox 360 wired controller)
- Added mouse mode.
- Changed a drawing method of a game field.
- Fixed a problem with a score reel size in a double play mode.
- Increased the number of smoke particles.
<<lessKeep near the top of the screen to increase your score. Destroy the enemy fleet. Comes with a soundtrack and effects.
Enhancements:
- Added -enableaxis5 option. (for xbox 360 wired controller)
- Added mouse mode.
- Changed a drawing method of a game field.
- Fixed a problem with a score reel size in a double play mode.
- Increased the number of smoke particles.
Download (5.0MB)
Added: 2006-05-23 License: GPL (GNU General Public License) Price:
1253 downloads
Free60 Gentoo LiveCD Xenon Beta 2
Free60 Gentoo LiveCD Xenon is a liveCD for Linux on the Xbox 360. more>>
Free60 Gentoo LiveCD Xenon is a liveCD for Linux on the Xbox 360. It is based on the experimental gentoo liveCD that can be found here:
http://gentoo.mirrors.pair.com/experimental/ppc64/livecd/
It has a few changes to boot on the Xbox 360 (codename xenon).
How does it work ?
Burn gentoo-livecd-xenon-beta-v2.iso. Upload the cdreader binary via serial, or use the new king kong patcher with built-in readcd code, this will open the dvd tray. Put the gentoo-livecd-xenon-beta CD in the drive. cdreader will automatically start the xell bootloader located at lba 0x20 on this cd and boot the Linux Kernel.
Thanks to stonersmurf for the compilation of the liveCD.
Where to find more info on Linux for Xbox 360 :
http://www.free60.org/
Free60 is a project towards porting GNU/Linux, BSD, Darwin and related open-source operating systems to the Microsoft Xbox 360 video game console.
Microsoft, Xbox, Xbox360 (and probably some more) are registered trademarks by Microsoft Corp. No affiliation between the Free60 Project and Microsoft Corp. exists or is implied. All other trademarks and copyrights are property of their respective owners.
The new Live CD supports all Xbox 360 consoles with firmware versions 4532 and 4548 and can be run without affecting the consoles normal functionality. It contains the latest free60 patches against the Linux kernel 2.6.21 and ships with a full Gnome desktop environment, including applications like Firefox and Evolution. It also offers an entire 64-bit PowerPC compiler toolchain for developers.
Free60 is a project towards porting GNU/Linux, BSD, Darwin and related open-source operating systems to the Microsoft Xbox 360 video game console.
Enhancements:
- New 2.6.21 based kernel
- Improved networking support
- Improved framebuffer kernel level support
- Supports Toshiba-Samsung drives, now
<<lesshttp://gentoo.mirrors.pair.com/experimental/ppc64/livecd/
It has a few changes to boot on the Xbox 360 (codename xenon).
How does it work ?
Burn gentoo-livecd-xenon-beta-v2.iso. Upload the cdreader binary via serial, or use the new king kong patcher with built-in readcd code, this will open the dvd tray. Put the gentoo-livecd-xenon-beta CD in the drive. cdreader will automatically start the xell bootloader located at lba 0x20 on this cd and boot the Linux Kernel.
Thanks to stonersmurf for the compilation of the liveCD.
Where to find more info on Linux for Xbox 360 :
http://www.free60.org/
Free60 is a project towards porting GNU/Linux, BSD, Darwin and related open-source operating systems to the Microsoft Xbox 360 video game console.
Microsoft, Xbox, Xbox360 (and probably some more) are registered trademarks by Microsoft Corp. No affiliation between the Free60 Project and Microsoft Corp. exists or is implied. All other trademarks and copyrights are property of their respective owners.
The new Live CD supports all Xbox 360 consoles with firmware versions 4532 and 4548 and can be run without affecting the consoles normal functionality. It contains the latest free60 patches against the Linux kernel 2.6.21 and ships with a full Gnome desktop environment, including applications like Firefox and Evolution. It also offers an entire 64-bit PowerPC compiler toolchain for developers.
Free60 is a project towards porting GNU/Linux, BSD, Darwin and related open-source operating systems to the Microsoft Xbox 360 video game console.
Enhancements:
- New 2.6.21 based kernel
- Improved networking support
- Improved framebuffer kernel level support
- Supports Toshiba-Samsung drives, now
Download (621MB)
Added: 2007-06-05 License: GPL (GNU General Public License) Price:
878 downloads
GD::Simple 2.35
GD::Simple module is a simplified interface to GD library. more>>
GD::Simple module is a simplified interface to GD library.
SYNOPSIS
use GD::Simple;
# create a new image
$img = GD::Simple->new(400,250);
# draw a red rectangle with blue borders
$img->bgcolor(red);
$img->fgcolor(blue);
$img->rectangle(10,10,50,50);
# draw an empty rectangle with green borders
$img->bgcolor(undef);
$img->fgcolor(green);
$img->rectangle(30,30,100,100);
# move to (80,80) and draw a green line to (100,190)
$img->moveTo(80,80);
$img->lineTo(100,190);
# draw a solid orange ellipse
$img->moveTo(110,100);
$img->bgcolor(orange);
$img->fgcolor(orange);
$img->ellipse(40,40);
# draw a black filled arc
$img->moveTo(150,150);
$img->fgcolor(black);
$img->arc(50,50,0,100,gdNoFill|gdEdged);
# draw a string at (10,180) using the default
# built-in font
$img->moveTo(10,180);
$img->string(This is very simple);
# draw a string at (280,210) using 20 point
# times italic, angled upward 90 degrees
$img->moveTo(280,210);
$img->font(Times:italic);
$img->fontsize(20);
$img->angle(-90);
$img->string(This is very fancy);
# some turtle graphics
$img->moveTo(300,100);
$img->penSize(3,3);
$img->angle(0);
$img->line(20); # 20 pixels going to the right
$img->turn(30); # set turning angle to 30 degrees
$img->line(20); # 20 pixel line
$img->line(20);
$img->line(20);
$img->turn(-90); # set turning angle to -90 degrees
$img->line(50); # 50 pixel line
# draw a cyan polygon edged in blue
my $poly = new GD::Polygon;
$poly->addPt(150,100);
$poly->addPt(199,199);
$poly->addPt(100,199);
$img->bgcolor(cyan);
$img->fgcolor(blue);
$img->penSize(1,1);
$img->polygon($poly);
# convert into png data
print $img->png;
GD::Simple is a subclass of the GD library that shortens many of the long GD method calls by storing information about the pen color, size and position in the GD object itself. It also adds a small number of "turtle graphics" style calls for those who prefer to work in polar coordinates. In addition, the library allows you to use symbolic names for colors, such as "chartreuse", and will manage the colors for you.
The Pen
GD::Simple maintains a "pen" whose settings are used for line- and shape-drawing operations. The pen has the following properties:
fgcolor
The pen foreground color is the color of lines and the borders of filled and unfilled shapes.
bgcolor
The pen background color is the color of the contents of filled shapes.
pensize
The pen size is the width of the pen. Larger sizes draw thicker lines.
position
The pen position is its current position on the canvas in (X,Y) coordinates.
angle
When drawing in turtle mode, the pen angle determines the current direction of lines of relative length.
turn
When drawing in turtle mode, the turn determines the clockwise or counterclockwise angle that the pen will turn before drawing the next line.
font
The font to use when drawing text. Both built-in bitmapped fonts and TrueType fonts are supported.
fontsize
The size of the font to use when drawing with TrueType fonts.
One sets the position and properties of the pen and then draws. As the drawing progresses, the position of the pen is updated.
Methods
GD::Simple introduces a number of new methods, a few of which have the same name as GD::Image methods, and hence change their behavior. In addition to these new methods, GD::Simple objects support all of the GD::Image methods. If you make a method call that isnt directly supported by GD::Simple, it refers the request to the underlying GD::Image object. Hence one can load a JPEG image into GD::Simple and declare it to be TrueColor by using this call, which is effectively inherited from GD::Image:
my $img = GD::Simple->newFromJpeg(./myimage.jpg,1);
The rest of this section describes GD::Simple-specific methods.
$img->moveTo($x,$y)
This call changes the position of the pen without drawing. It moves the pen to position ($x,$y) on the drawing canvas.
$img->move($dx,$dy)
$img->move($dr)
This call changes the position of the pen without drawing. When called with two arguments it moves the pen $dx pixels to the right and $dy pixels downward. When called with one argument it moves the pen $dr pixels along the vector described by the current pen angle.
$img->lineTo($x,$y)
The lineTo() call simultaneously draws and moves the pen. It draws a line from the current pen position to the position defined by ($x,$y) using the current pen size and color. After drawing, the position of the pen is updated to the new position.
$img->line($dx,$dy)
$img->line($dr)
The line() call simultaneously draws and moves the pen. When called with two arguments it draws a line from the current position of the pen to the position $dx pixels to the right and $dy pixels down. When called with one argument, it draws a line $dr pixels long along the angle defined by the current pen angle.
$img->clear
This method clears the canvas by painting over it with the current background color.
$img->rectangle($x1,$y1,$x2,$y2)
This method draws the rectangle defined by corners ($x1,$y1), ($x2,$y2). The rectangles edges are drawn in the foreground color and its contents are filled with the background color. To draw a solid rectangle set bgcolor equal to fgcolor. To draw an unfilled rectangle (transparent inside), set bgcolor to undef.
$img->ellipse($width,$height)
This method draws the ellipse centered at the current location with width $width and height $height. The ellipses border is drawn in the foreground color and its contents are filled with the background color. To draw a solid ellipse set bgcolor equal to fgcolor. To draw an unfilled ellipse (transparent inside), set bgcolor to undef.
$img->arc($cx,$cy,$width,$height,$start,$end [,$style])
This method draws filled and unfilled arcs. See GD for a description of the arguments. To draw a solid arc (such as a pie wedge) set bgcolor equal to fgcolor. To draw an unfilled arc, set bgcolor to undef.
$img->polygon($poly)
This method draws filled and unfilled polygon using the current settings of fgcolor for the polygon border and bgcolor for the polygon fill color. See GD for a description of creating polygons. To draw a solid polygon set bgcolor equal to fgcolor. To draw an unfilled polygon, set bgcolor to undef.
$img->polyline($poly)
This method draws polygons without closing the first and last vertices (similar to GD::Image->unclosedPolygon()). It uses the fgcolor to draw the line.
$img->string($string)
This method draws the indicated string starting at the current position of the pen. The pen is moved to the end of the drawn string. Depending on the font selected with the font() method, this will use either a bitmapped GD font or a TrueType font. The angle of the pen will be consulted when drawing the text. For TrueType fonts, any angle is accepted. For GD bitmapped fonts, the angle can be either 0 (draw horizontal) or -90 (draw upwards).
For consistency between the TrueType and GD font behavior, the string is always drawn so that the current position of the pen corresponds to the bottom left of the first character of the text. This is different from the GD behavior, in which the first character of bitmapped fonts hangs down from the pen point.
This method returns a polygon indicating the bounding box of the rendered text. If an error occurred (such as invalid font specification) it returns undef and an error message in $@.
$metrics = $img->fontMetrics
($metrics,$width,$height) = GD::Simple->fontMetrics($font,$fontsize,$string)
This method returns information about the current font, most commonly a TrueType font. It can be invoked as an instance method (on a previously-created GD::Simple object) or as a class method (on the GD::Simple class).
When called as an instance method, fontMetrics() takes no arguments and returns a single hash reference containing the metrics that describe the currently selected font and size. The hash reference contains the following information:
xheight the base height of the font from the bottom to the top of
a lowercase m
ascent the length of the upper stem of the lowercase d
descent the length of the lower step of the lowercase j
lineheight the distance from the bottom of the j to the top of
the d
leading the distance between two adjacent lines
($delta_x,$delta_y)= $img->stringBounds($string)
This method indicates the X and Y offsets (which may be negative) that will occur when the given string is drawn using the current font, fontsize and angle. When the string is drawn horizontally, it gives the width and height of the strings bounding box.
$delta_x = $img->stringWidth($string)
This method indicates the width of the string given the current font, fontsize and angle. It is the same as ($img->stringBounds($string))[0]
($x,$y) = $img->curPos
Return the current position of the pen. Set the current position using moveTo().
$font = $img->font([$newfont] [,$newsize])
Get or set the current font. Fonts can be GD::Font objects, TrueType font file paths, or fontconfig font patterns like "Times:italic" (see fontconfig). The latter feature requires that you have the fontconfig library installed and are using libgd version 2.0.33 or higher.
As a shortcut, you may pass two arguments to set the font and the fontsize simultaneously. The fontsize is only valid when drawing with TrueType fonts.
$size = $img->fontsize([$newfontsize])
Get or set the current font size. This is only valid for TrueType fonts.
$size = $img->penSize([$newpensize])
Get or set the current pen width for use during line drawing operations.
$angle = $img->angle([$newangle])
Set the current angle for use when calling line() or move() with a single argument.
Here is an example of using turn() and angle() together to draw an octagon. The first line drawn is the downward-slanting top right edge. The last line drawn is the horizontal top of the octagon.
$img->moveTo(200,50);
$img->angle(0);
$img->turn(360/8);
for (1..8) { $img->line(50) }
$angle = $img->turn([$newangle])
Get or set the current angle to turn prior to drawing lines. This value is only used when calling line() or move() with a single argument. The turning angle will be applied to each call to line() or move() just before the actual drawing occurs.
Angles are in degrees. Positive values turn the angle clockwise.
$color = $img->fgcolor([$newcolor])
Get or set the pens foreground color. The current pen color can be set by (1) using an (r,g,b) triple; (2) using a previously-allocated color from the GD palette; or (3) by using a symbolic color name such as "chartreuse." The list of color names can be obtained using color_names().
$color = $img->bgcolor([$newcolor])
Get or set the pens background color. The current pen color can be set by (1) using an (r,g,b) triple; (2) using a previously-allocated color from the GD palette; or (3) by using a symbolic color name such as "chartreuse." The list of color names can be obtained using color_names().
$index = $img->translate_color(@args)
Translates a color into a GD palette or TrueColor index. You may pass either an (r,g,b) triple or a symbolic color name. If you pass a previously-allocated index, the method will return it unchanged.
$index = $img->alphaColor(@args,$alpha)
Creates an alpha color. You may pass either an (r,g,b) triple or a symbolic color name, followed by an integer indicating its opacity. The opacity value ranges from 0 (fully opaque) to 127 (fully transparent).
@names = GD::Simple->color_names
$translate_table = GD::Simple->color_names
Called in a list context, color_names() returns the list of symbolic color names recognized by this module. Called in a scalar context, the method returns a hash reference in which the keys are the color names and the values are array references containing [r,g,b] triples.
$gd = $img->gd
Return the internal GD::Image object. Usually you will not need to call this since all GD methods are automatically referred to this object.
($red,$green,$blue) = GD::Simple->HSVtoRGB($hue,$saturation,$value)
Convert a Hue/Saturation/Value (HSV) color into an RGB triple. The hue, saturation and value are integers from 0 to 255.
($hue,$saturation,$value) = GD::Simple->RGBtoHSV($hue,$saturation,$value)
Convert a Red/Green/Blue (RGB) value into a Hue/Saturation/Value (HSV) triple. The hue, saturation and value are integers from 0 to 255.
COLORS
This script will create an image showing all the symbolic colors.
#!/usr/bin/perl
use strict;
use GD::Simple;
my @color_names = GD::Simple->color_names;
my $cols = int(sqrt(@color_names));
my $rows = int(@color_names/$cols)+1;
my $cell_width = 100;
my $cell_height = 50;
my $legend_height = 16;
my $width = $cols * $cell_width;
my $height = $rows * $cell_height;
my $img = GD::Simple->new($width,$height);
$img->font(gdSmallFont);
for (my $c=0; $cfgcolor($color);
$img->rectangle(@topleft,@botright);
$img->moveTo($topleft[0]+2,$botright[1]+$legend_height-2);
$img->fgcolor(black);
$img->string($color);
}
}
print $img->png;
<<lessSYNOPSIS
use GD::Simple;
# create a new image
$img = GD::Simple->new(400,250);
# draw a red rectangle with blue borders
$img->bgcolor(red);
$img->fgcolor(blue);
$img->rectangle(10,10,50,50);
# draw an empty rectangle with green borders
$img->bgcolor(undef);
$img->fgcolor(green);
$img->rectangle(30,30,100,100);
# move to (80,80) and draw a green line to (100,190)
$img->moveTo(80,80);
$img->lineTo(100,190);
# draw a solid orange ellipse
$img->moveTo(110,100);
$img->bgcolor(orange);
$img->fgcolor(orange);
$img->ellipse(40,40);
# draw a black filled arc
$img->moveTo(150,150);
$img->fgcolor(black);
$img->arc(50,50,0,100,gdNoFill|gdEdged);
# draw a string at (10,180) using the default
# built-in font
$img->moveTo(10,180);
$img->string(This is very simple);
# draw a string at (280,210) using 20 point
# times italic, angled upward 90 degrees
$img->moveTo(280,210);
$img->font(Times:italic);
$img->fontsize(20);
$img->angle(-90);
$img->string(This is very fancy);
# some turtle graphics
$img->moveTo(300,100);
$img->penSize(3,3);
$img->angle(0);
$img->line(20); # 20 pixels going to the right
$img->turn(30); # set turning angle to 30 degrees
$img->line(20); # 20 pixel line
$img->line(20);
$img->line(20);
$img->turn(-90); # set turning angle to -90 degrees
$img->line(50); # 50 pixel line
# draw a cyan polygon edged in blue
my $poly = new GD::Polygon;
$poly->addPt(150,100);
$poly->addPt(199,199);
$poly->addPt(100,199);
$img->bgcolor(cyan);
$img->fgcolor(blue);
$img->penSize(1,1);
$img->polygon($poly);
# convert into png data
print $img->png;
GD::Simple is a subclass of the GD library that shortens many of the long GD method calls by storing information about the pen color, size and position in the GD object itself. It also adds a small number of "turtle graphics" style calls for those who prefer to work in polar coordinates. In addition, the library allows you to use symbolic names for colors, such as "chartreuse", and will manage the colors for you.
The Pen
GD::Simple maintains a "pen" whose settings are used for line- and shape-drawing operations. The pen has the following properties:
fgcolor
The pen foreground color is the color of lines and the borders of filled and unfilled shapes.
bgcolor
The pen background color is the color of the contents of filled shapes.
pensize
The pen size is the width of the pen. Larger sizes draw thicker lines.
position
The pen position is its current position on the canvas in (X,Y) coordinates.
angle
When drawing in turtle mode, the pen angle determines the current direction of lines of relative length.
turn
When drawing in turtle mode, the turn determines the clockwise or counterclockwise angle that the pen will turn before drawing the next line.
font
The font to use when drawing text. Both built-in bitmapped fonts and TrueType fonts are supported.
fontsize
The size of the font to use when drawing with TrueType fonts.
One sets the position and properties of the pen and then draws. As the drawing progresses, the position of the pen is updated.
Methods
GD::Simple introduces a number of new methods, a few of which have the same name as GD::Image methods, and hence change their behavior. In addition to these new methods, GD::Simple objects support all of the GD::Image methods. If you make a method call that isnt directly supported by GD::Simple, it refers the request to the underlying GD::Image object. Hence one can load a JPEG image into GD::Simple and declare it to be TrueColor by using this call, which is effectively inherited from GD::Image:
my $img = GD::Simple->newFromJpeg(./myimage.jpg,1);
The rest of this section describes GD::Simple-specific methods.
$img->moveTo($x,$y)
This call changes the position of the pen without drawing. It moves the pen to position ($x,$y) on the drawing canvas.
$img->move($dx,$dy)
$img->move($dr)
This call changes the position of the pen without drawing. When called with two arguments it moves the pen $dx pixels to the right and $dy pixels downward. When called with one argument it moves the pen $dr pixels along the vector described by the current pen angle.
$img->lineTo($x,$y)
The lineTo() call simultaneously draws and moves the pen. It draws a line from the current pen position to the position defined by ($x,$y) using the current pen size and color. After drawing, the position of the pen is updated to the new position.
$img->line($dx,$dy)
$img->line($dr)
The line() call simultaneously draws and moves the pen. When called with two arguments it draws a line from the current position of the pen to the position $dx pixels to the right and $dy pixels down. When called with one argument, it draws a line $dr pixels long along the angle defined by the current pen angle.
$img->clear
This method clears the canvas by painting over it with the current background color.
$img->rectangle($x1,$y1,$x2,$y2)
This method draws the rectangle defined by corners ($x1,$y1), ($x2,$y2). The rectangles edges are drawn in the foreground color and its contents are filled with the background color. To draw a solid rectangle set bgcolor equal to fgcolor. To draw an unfilled rectangle (transparent inside), set bgcolor to undef.
$img->ellipse($width,$height)
This method draws the ellipse centered at the current location with width $width and height $height. The ellipses border is drawn in the foreground color and its contents are filled with the background color. To draw a solid ellipse set bgcolor equal to fgcolor. To draw an unfilled ellipse (transparent inside), set bgcolor to undef.
$img->arc($cx,$cy,$width,$height,$start,$end [,$style])
This method draws filled and unfilled arcs. See GD for a description of the arguments. To draw a solid arc (such as a pie wedge) set bgcolor equal to fgcolor. To draw an unfilled arc, set bgcolor to undef.
$img->polygon($poly)
This method draws filled and unfilled polygon using the current settings of fgcolor for the polygon border and bgcolor for the polygon fill color. See GD for a description of creating polygons. To draw a solid polygon set bgcolor equal to fgcolor. To draw an unfilled polygon, set bgcolor to undef.
$img->polyline($poly)
This method draws polygons without closing the first and last vertices (similar to GD::Image->unclosedPolygon()). It uses the fgcolor to draw the line.
$img->string($string)
This method draws the indicated string starting at the current position of the pen. The pen is moved to the end of the drawn string. Depending on the font selected with the font() method, this will use either a bitmapped GD font or a TrueType font. The angle of the pen will be consulted when drawing the text. For TrueType fonts, any angle is accepted. For GD bitmapped fonts, the angle can be either 0 (draw horizontal) or -90 (draw upwards).
For consistency between the TrueType and GD font behavior, the string is always drawn so that the current position of the pen corresponds to the bottom left of the first character of the text. This is different from the GD behavior, in which the first character of bitmapped fonts hangs down from the pen point.
This method returns a polygon indicating the bounding box of the rendered text. If an error occurred (such as invalid font specification) it returns undef and an error message in $@.
$metrics = $img->fontMetrics
($metrics,$width,$height) = GD::Simple->fontMetrics($font,$fontsize,$string)
This method returns information about the current font, most commonly a TrueType font. It can be invoked as an instance method (on a previously-created GD::Simple object) or as a class method (on the GD::Simple class).
When called as an instance method, fontMetrics() takes no arguments and returns a single hash reference containing the metrics that describe the currently selected font and size. The hash reference contains the following information:
xheight the base height of the font from the bottom to the top of
a lowercase m
ascent the length of the upper stem of the lowercase d
descent the length of the lower step of the lowercase j
lineheight the distance from the bottom of the j to the top of
the d
leading the distance between two adjacent lines
($delta_x,$delta_y)= $img->stringBounds($string)
This method indicates the X and Y offsets (which may be negative) that will occur when the given string is drawn using the current font, fontsize and angle. When the string is drawn horizontally, it gives the width and height of the strings bounding box.
$delta_x = $img->stringWidth($string)
This method indicates the width of the string given the current font, fontsize and angle. It is the same as ($img->stringBounds($string))[0]
($x,$y) = $img->curPos
Return the current position of the pen. Set the current position using moveTo().
$font = $img->font([$newfont] [,$newsize])
Get or set the current font. Fonts can be GD::Font objects, TrueType font file paths, or fontconfig font patterns like "Times:italic" (see fontconfig). The latter feature requires that you have the fontconfig library installed and are using libgd version 2.0.33 or higher.
As a shortcut, you may pass two arguments to set the font and the fontsize simultaneously. The fontsize is only valid when drawing with TrueType fonts.
$size = $img->fontsize([$newfontsize])
Get or set the current font size. This is only valid for TrueType fonts.
$size = $img->penSize([$newpensize])
Get or set the current pen width for use during line drawing operations.
$angle = $img->angle([$newangle])
Set the current angle for use when calling line() or move() with a single argument.
Here is an example of using turn() and angle() together to draw an octagon. The first line drawn is the downward-slanting top right edge. The last line drawn is the horizontal top of the octagon.
$img->moveTo(200,50);
$img->angle(0);
$img->turn(360/8);
for (1..8) { $img->line(50) }
$angle = $img->turn([$newangle])
Get or set the current angle to turn prior to drawing lines. This value is only used when calling line() or move() with a single argument. The turning angle will be applied to each call to line() or move() just before the actual drawing occurs.
Angles are in degrees. Positive values turn the angle clockwise.
$color = $img->fgcolor([$newcolor])
Get or set the pens foreground color. The current pen color can be set by (1) using an (r,g,b) triple; (2) using a previously-allocated color from the GD palette; or (3) by using a symbolic color name such as "chartreuse." The list of color names can be obtained using color_names().
$color = $img->bgcolor([$newcolor])
Get or set the pens background color. The current pen color can be set by (1) using an (r,g,b) triple; (2) using a previously-allocated color from the GD palette; or (3) by using a symbolic color name such as "chartreuse." The list of color names can be obtained using color_names().
$index = $img->translate_color(@args)
Translates a color into a GD palette or TrueColor index. You may pass either an (r,g,b) triple or a symbolic color name. If you pass a previously-allocated index, the method will return it unchanged.
$index = $img->alphaColor(@args,$alpha)
Creates an alpha color. You may pass either an (r,g,b) triple or a symbolic color name, followed by an integer indicating its opacity. The opacity value ranges from 0 (fully opaque) to 127 (fully transparent).
@names = GD::Simple->color_names
$translate_table = GD::Simple->color_names
Called in a list context, color_names() returns the list of symbolic color names recognized by this module. Called in a scalar context, the method returns a hash reference in which the keys are the color names and the values are array references containing [r,g,b] triples.
$gd = $img->gd
Return the internal GD::Image object. Usually you will not need to call this since all GD methods are automatically referred to this object.
($red,$green,$blue) = GD::Simple->HSVtoRGB($hue,$saturation,$value)
Convert a Hue/Saturation/Value (HSV) color into an RGB triple. The hue, saturation and value are integers from 0 to 255.
($hue,$saturation,$value) = GD::Simple->RGBtoHSV($hue,$saturation,$value)
Convert a Red/Green/Blue (RGB) value into a Hue/Saturation/Value (HSV) triple. The hue, saturation and value are integers from 0 to 255.
COLORS
This script will create an image showing all the symbolic colors.
#!/usr/bin/perl
use strict;
use GD::Simple;
my @color_names = GD::Simple->color_names;
my $cols = int(sqrt(@color_names));
my $rows = int(@color_names/$cols)+1;
my $cell_width = 100;
my $cell_height = 50;
my $legend_height = 16;
my $width = $cols * $cell_width;
my $height = $rows * $cell_height;
my $img = GD::Simple->new($width,$height);
$img->font(gdSmallFont);
for (my $c=0; $cfgcolor($color);
$img->rectangle(@topleft,@botright);
$img->moveTo($topleft[0]+2,$botright[1]+$legend_height-2);
$img->fgcolor(black);
$img->string($color);
}
}
print $img->png;
Download (0.25MB)
Added: 2007-07-23 License: Perl Artistic License Price:
825 downloads
Wx::Polygon 0.06
Wx::Polygon can draw and manipulate polygons for wxPerl. more>>
Wx::Polygon can draw and manipulate polygons for wxPerl.
ABSTRACT
This module provides functions for manipulating polygons in wxPerl.
new( POLYGON = (Wx::Point,...) | ELLIPSE => (x_offset,y_offset,width,heigth) ) --> Wx::Polygon>
Instantiates a new Wx::Polygon with an array of Wx::Points for a given POLYGON or an ellipse with given parameters.
add_point(x,y,recalc=1) --> void
Adds a point to the polygon. If scale and rotation have been used, rescales and rerotates the polygon after adding the point. If recalc is set to 0, this will not be done, which is better when a lot of points need added.
recalc() --> void
Rescales and rerotates the polygon. This method should be used when a lot of points need to be added. Recalculation can than be done after adding the points.
set_color(r,g,b) --> void
Sets the fill color to wxSOLID with the given r, g and b values.
mid() --> (midx:integer,midy:integer)
Calculates the middle of the polygon (not point z) and returns a list with x and y position.
in(x,y) --> boolean
Calculates if (x,y) falls within the edges of the polygon. Returns true if so. Uses algorithm of Randolph Franklin, http://astronomy.swin.edu.au/~pbourke/geometry/insidepoly.
draw( dc:Wx::DC ) --> void
Draws the polygon at given offsets and with given colour(s) to the current DC.
copy() --> Wx::Polygon
Returns a copy of the object.
scale(scale-factor) --> void
Scales the polygon with scale-factor.
rotate(degrees) --> void
Rotates the polygon by degrees degrees (0-360).
offset(x,y) --> void
Sets the offset for drawing. This can be used to transpose the polygon.
<<lessABSTRACT
This module provides functions for manipulating polygons in wxPerl.
new( POLYGON = (Wx::Point,...) | ELLIPSE => (x_offset,y_offset,width,heigth) ) --> Wx::Polygon>
Instantiates a new Wx::Polygon with an array of Wx::Points for a given POLYGON or an ellipse with given parameters.
add_point(x,y,recalc=1) --> void
Adds a point to the polygon. If scale and rotation have been used, rescales and rerotates the polygon after adding the point. If recalc is set to 0, this will not be done, which is better when a lot of points need added.
recalc() --> void
Rescales and rerotates the polygon. This method should be used when a lot of points need to be added. Recalculation can than be done after adding the points.
set_color(r,g,b) --> void
Sets the fill color to wxSOLID with the given r, g and b values.
mid() --> (midx:integer,midy:integer)
Calculates the middle of the polygon (not point z) and returns a list with x and y position.
in(x,y) --> boolean
Calculates if (x,y) falls within the edges of the polygon. Returns true if so. Uses algorithm of Randolph Franklin, http://astronomy.swin.edu.au/~pbourke/geometry/insidepoly.
draw( dc:Wx::DC ) --> void
Draws the polygon at given offsets and with given colour(s) to the current DC.
copy() --> Wx::Polygon
Returns a copy of the object.
scale(scale-factor) --> void
Scales the polygon with scale-factor.
rotate(degrees) --> void
Rotates the polygon by degrees degrees (0-360).
offset(x,y) --> void
Sets the offset for drawing. This can be used to transpose the polygon.
Download (0.006MB)
Added: 2007-08-18 License: Perl Artistic License Price:
799 downloads
Color::Object 0.1_02
Color::Object is a OO-Color Module. more>>
Color::Object is a OO-Color Module.
A module for manipulation Colors within RGB, HSV and HSL color-spaces for usage within PDF-Documents especially with the Text::PDF::API modules.
SYNOPSIS
use Color::Object;
$cl = Color::Object->new;
$cl = Color::Object->newRGB($r,$g,$b);
$cl = Color::Object->newHSV($h,$s,$v);
$cl = Color::Object->newHSL($h,$s,$l);
$cl->setRGB($r,$g,$b);
$cl->addBrightness($br);
($h,$s,$l) = $cl->asHSL;
METHODS
Color::Object->new
Color::Object->newRGB $r, $g, $b
Color::Object->newHSV $h, $s, $v
Color::Object->newHSL $h, $s, $l
Color::Object->newGrey $grey
( $r, $g, $b ) = $cl->asRGB
Returns $cls rgb values. Range [0 .. 1].
( $h, $s, $v ) = $cl->asHSV
Returns $cls hsv values. Ranges h [0 .. 360], s/v [0 .. 1].
( $h, $s, $l ) = $cl->asHSL
Returns $cls hsl values. Ranges h [0 .. 360], s/l [0 .. 1].
$grey = $cl->asGrey
$grey = $cl->asGrey2
Returns $cls grey value. Range [0 .. 1]. Functions 2 returns the geometric mean of the corresponding RGB values.
( $c, $m, $y )= $cl->asCMY
Returns $cls cmy values. Range [0 .. 1].
( $c, $m, $y, $k )= $cl->asCMYK
( $c, $m, $y, $k )= $cl->asCMYK2
( $c, $m, $y, $k )= $cl->asCMYK3
Returns $cls cmyk values. Range [0 .. 1]. Function 2 returns a 25% lighter color-equivalent. Function 3 returns a 25% lighter color-equivalent.
$hex = $cl->asHex
Returns $cls rgb values as 6 hex-digits.
$cl->setRGB $r, $g, $b
Sets the $cls rgb values. Valid range [0 .. 1].
$cl->setHSV $h, $s, $v
Sets the $cls hsv values. Valid ranges: h [0..360], s/v [0..1].
$cl->setHSL $h, $s, $l
Sets the $cls hsl values. Valid ranges: h [0..360], s/l [0..1].
$cl->setGrey $grey
Sets the $cls grey value. Valid range [0 .. 1].
$cl->setHex $hex
Sets the $cls rgb values using 6 hex-nibbles.
$cl->addSaturation $saturation
Adds to the $cls saturation in the HSV model. Valid range [-1 .. 1].
$cl->setSaturation $saturation
Sets the $cls saturation in the HSV model. Valid range [0 .. 1].
$cl->rotHue $degrees
Rotates the $cls hue in the HSV/L model. Valid range [-360 .. 360].
$cl->setHue $hue
Sets the $cls hue in the HSV/L model. Valid range [0 .. 360].
$cl->addBrightness $brightness
Adds to the $cls brightness in the HSV model. Valid range [-1 .. 1].
$cl->setBrightness $brightness
Sets the $cls brightness in the HSV model. Valid range [0 .. 1].
$cl->addLightness $lightness
Adds to the $cls lightness in the HSL model. Valid range [-1 .. 1].
$cl->setLightness $lightness
Sets the $cls lightness in the HSL model. Valid range [0 .. 1].
<<lessA module for manipulation Colors within RGB, HSV and HSL color-spaces for usage within PDF-Documents especially with the Text::PDF::API modules.
SYNOPSIS
use Color::Object;
$cl = Color::Object->new;
$cl = Color::Object->newRGB($r,$g,$b);
$cl = Color::Object->newHSV($h,$s,$v);
$cl = Color::Object->newHSL($h,$s,$l);
$cl->setRGB($r,$g,$b);
$cl->addBrightness($br);
($h,$s,$l) = $cl->asHSL;
METHODS
Color::Object->new
Color::Object->newRGB $r, $g, $b
Color::Object->newHSV $h, $s, $v
Color::Object->newHSL $h, $s, $l
Color::Object->newGrey $grey
( $r, $g, $b ) = $cl->asRGB
Returns $cls rgb values. Range [0 .. 1].
( $h, $s, $v ) = $cl->asHSV
Returns $cls hsv values. Ranges h [0 .. 360], s/v [0 .. 1].
( $h, $s, $l ) = $cl->asHSL
Returns $cls hsl values. Ranges h [0 .. 360], s/l [0 .. 1].
$grey = $cl->asGrey
$grey = $cl->asGrey2
Returns $cls grey value. Range [0 .. 1]. Functions 2 returns the geometric mean of the corresponding RGB values.
( $c, $m, $y )= $cl->asCMY
Returns $cls cmy values. Range [0 .. 1].
( $c, $m, $y, $k )= $cl->asCMYK
( $c, $m, $y, $k )= $cl->asCMYK2
( $c, $m, $y, $k )= $cl->asCMYK3
Returns $cls cmyk values. Range [0 .. 1]. Function 2 returns a 25% lighter color-equivalent. Function 3 returns a 25% lighter color-equivalent.
$hex = $cl->asHex
Returns $cls rgb values as 6 hex-digits.
$cl->setRGB $r, $g, $b
Sets the $cls rgb values. Valid range [0 .. 1].
$cl->setHSV $h, $s, $v
Sets the $cls hsv values. Valid ranges: h [0..360], s/v [0..1].
$cl->setHSL $h, $s, $l
Sets the $cls hsl values. Valid ranges: h [0..360], s/l [0..1].
$cl->setGrey $grey
Sets the $cls grey value. Valid range [0 .. 1].
$cl->setHex $hex
Sets the $cls rgb values using 6 hex-nibbles.
$cl->addSaturation $saturation
Adds to the $cls saturation in the HSV model. Valid range [-1 .. 1].
$cl->setSaturation $saturation
Sets the $cls saturation in the HSV model. Valid range [0 .. 1].
$cl->rotHue $degrees
Rotates the $cls hue in the HSV/L model. Valid range [-360 .. 360].
$cl->setHue $hue
Sets the $cls hue in the HSV/L model. Valid range [0 .. 360].
$cl->addBrightness $brightness
Adds to the $cls brightness in the HSV model. Valid range [-1 .. 1].
$cl->setBrightness $brightness
Sets the $cls brightness in the HSV model. Valid range [0 .. 1].
$cl->addLightness $lightness
Adds to the $cls lightness in the HSL model. Valid range [-1 .. 1].
$cl->setLightness $lightness
Sets the $cls lightness in the HSL model. Valid range [0 .. 1].
Download (0.003MB)
Added: 2007-07-31 License: Perl Artistic License Price:
815 downloads
Language::Logo 1.000
Language::Logo Perl module is an implementation of the Logo programming language. more>>
Language::Logo Perl module is an implementation of the Logo programming language.
SYNOPSIS
use Language::Logo;
my $lo = new Logo(update => 20);
$lo->command("setxy 250 256");
$lo->command("color yellow");
$lo->command("pendown");
# Draw a circle
for (my $i = 0; $i < 360; $i += 10) {
$lo->command("forward 10; right 10");
}
$lo->disconnect("Finished...")
This module provides an implementation of the Logo programming language, with all of the necessary drawing primitives in a Tk Canvas. The Canvas object is also referred to as the "screen".
The first construction of a Language::Logo object causes a server to be created in a separate process; this server then creates a Tk GUI with a Tk::Canvas for use by the clients "turtle", and responds to all requests from the clients commands. In this way, multiple clients may be constructed simultaneously -- each one with its own "turtle".
In this first release, not all of the Logo language is implemented. Rather, the primary commands available are those which directly affect the turtle, and are related to drawing on the screen. The intent is to use the Logo in conjunction with Perl as a sort of "hybrid" language; Perl us used as the higher-level language layer through which all loop constructs, conditionals, and data-manipulation is done. This allows for a substantial level of programming power.
<<lessSYNOPSIS
use Language::Logo;
my $lo = new Logo(update => 20);
$lo->command("setxy 250 256");
$lo->command("color yellow");
$lo->command("pendown");
# Draw a circle
for (my $i = 0; $i < 360; $i += 10) {
$lo->command("forward 10; right 10");
}
$lo->disconnect("Finished...")
This module provides an implementation of the Logo programming language, with all of the necessary drawing primitives in a Tk Canvas. The Canvas object is also referred to as the "screen".
The first construction of a Language::Logo object causes a server to be created in a separate process; this server then creates a Tk GUI with a Tk::Canvas for use by the clients "turtle", and responds to all requests from the clients commands. In this way, multiple clients may be constructed simultaneously -- each one with its own "turtle".
In this first release, not all of the Logo language is implemented. Rather, the primary commands available are those which directly affect the turtle, and are related to drawing on the screen. The intent is to use the Logo in conjunction with Perl as a sort of "hybrid" language; Perl us used as the higher-level language layer through which all loop constructs, conditionals, and data-manipulation is done. This allows for a substantial level of programming power.
Download (0.016MB)
Added: 2007-07-30 License: Perl Artistic License Price:
830 downloads
Math::Random::MT::Auto 5.04
Math::Random::MT::Auto is a Perl module for auto-seeded Mersenne Twister PRNGs. more>>
Math::Random::MT::Auto is a Perl module for auto-seeded Mersenne Twister PRNGs.
SYNOPSIS
use strict;
use warnings;
use Math::Random::MT::Auto qw(rand irand shuffle gaussian),
/dev/urandom => 256,
random_org;
# Functional interface
my $die_roll = 1 + int(rand(6));
my $coin_flip = (irand() & 1) ? heads : tails;
my $deck = shuffle(1 .. 52);
my $rand_IQ = gaussian(15, 100);
# OO interface
my $prng = Math::Random::MT::Auto->new(SOURCE => /dev/random);
my $angle = $prng->rand(360);
my $decay_interval = $prng->exponential(12.4);
The Mersenne Twister is a fast pseudorandom number generator (PRNG) that is capable of providing large volumes (> 10^6004) of "high quality" pseudorandom data to applications that may exhaust available "truly" random data sources or system-provided PRNGs such as rand.
This module provides PRNGs that are based on the Mersenne Twister.
There is a functional interface to a single, standalone PRNG, and an OO interface (based on the inside-out object model as implemented by the Object::InsideOut module) for generating multiple PRNG objects. The PRNGs are self-seeding, automatically acquiring a (19968-bit) random seed from user-selectable sources.
<<lessSYNOPSIS
use strict;
use warnings;
use Math::Random::MT::Auto qw(rand irand shuffle gaussian),
/dev/urandom => 256,
random_org;
# Functional interface
my $die_roll = 1 + int(rand(6));
my $coin_flip = (irand() & 1) ? heads : tails;
my $deck = shuffle(1 .. 52);
my $rand_IQ = gaussian(15, 100);
# OO interface
my $prng = Math::Random::MT::Auto->new(SOURCE => /dev/random);
my $angle = $prng->rand(360);
my $decay_interval = $prng->exponential(12.4);
The Mersenne Twister is a fast pseudorandom number generator (PRNG) that is capable of providing large volumes (> 10^6004) of "high quality" pseudorandom data to applications that may exhaust available "truly" random data sources or system-provided PRNGs such as rand.
This module provides PRNGs that are based on the Mersenne Twister.
There is a functional interface to a single, standalone PRNG, and an OO interface (based on the inside-out object model as implemented by the Object::InsideOut module) for generating multiple PRNG objects. The PRNGs are self-seeding, automatically acquiring a (19968-bit) random seed from user-selectable sources.
Download (0.12MB)
Added: 2006-10-24 License: Perl Artistic License Price:
1095 downloads
Secleted [ 0 ] software to compare
- Page: 1 of 2
- 1
- 2
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above 360 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