Main > Free Download Search >

Free meta data software for linux

meta data

Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 4965
Meta Matrix Library 0.7.2

Meta Matrix Library 0.7.2


Meta Matrix Library is a modular designed collection of C libraries. more>>
Meta Matrix Library is a modular designed collection of C libraries. Meta Matrix Library was developed as part of the Free Finite Element Package to provide easy and consistent access to numerical linear algebra software for sparse and dense matrices.

The dense matrix and vector operations of the package are based on LAPACK and BLAS (focused upon ATLAS). For more details of LAPACK and BLAS see Related Links. Beyond this MEML supports UMFPACK ( SuperLU projected ) as solver for linear systems of equations with sparse matrices.

<<less
Download (0.45MB)
Added: 2006-05-21 License: BSD License Price:
1256 downloads
Image::MetaData::JPEG 0.15

Image::MetaData::JPEG 0.15


Image::MetaData::JPEG is a Perl extension for showing/modifying JPEG (meta)data. more>>
Image::MetaData::JPEG is a Perl extension for showing/modifying JPEG (meta)data.

SYNOPSIS

use Image::MetaData::JPEG;

# Create a new JPEG file structure object
my $image = new Image::MetaData::JPEG(somepicture.jpg);
die Error: . Image::MetaData::JPEG::Error() unless $image;

# Get a list of references to comment segments
my @segments = $image->get_segments(COM, INDEXES);

# Get the JPEG picture dimensions
my ($dim_x, $dim_y) = $image->get_dimensions();

# Show all JPEG segments and their content
print $image->get_description();

# Retrieve a specific value from Exif meta-data
my $image_data = $image->get_Exif_data(IMAGE_DATA, TEXTUAL);
print $image_data->{DateTimeOriginal}->[0], "n";

# Modify the DateTime tag for the main image
$image->set_Exif_data({DateTime => 1994:07:23 12:14:51},
IMAGE_DATA, ADD);

# Delete all meta-data segments (please, dont)
$image->drop_segments(METADATA);

# Rewrite file to disk after your modifications
$image->save(new_file_name.jpg);

# ... and a lot more methods for viewing/modifying meta-data, which
# are accessed through the $file or $segments[$index] references.

The purpose of this module is to read/modify/rewrite meta-data segments in JPEG (Joint Photographic Experts Group format) files, which can contain comments, thumbnails, Exif information (photographic parameters), IPTC information (editorial parameters) and similar data.

Each JPEG file is made of consecutive segments (tagged data blocks), and the actual row picture data. Most of these segments specify parameters for decoding the picture data into a bitmap; some of them, namely the COMment and APPlication segments, contain instead meta-data, i.e., information about how the photo was shot (usually added by a digital camera) and additional notes from the photograph. These additional pieces of information are especially valuable for picture databases, since the meta-data can be saved together with the picture without resorting to additional database structures. See the appendix about the structure of JPEG files for technical details.

This module works by breaking a JPEG file into individual segments. Each file is associated to an Image::MetaData::JPEG structure object, which contains one Image::MetaData::JPEG::Segment object for each segment. Segments with a known format are then parsed, and their content can be accessed in a structured way for display. Some of them can even be modified and then rewritten to disk.

$JPEG::show_warnings

This package variable must be used to inhibit the printing of warnings: if it is false, warnings are silently ignored. Otherwise, warning messages come with a detailed back-trace and description of the warning location.

$Image::MetaData::JPEG::show_warnings = undef;

<<less
Download (0.28MB)
Added: 2006-07-13 License: GPL (GNU General Public License) Price:
1199 downloads
SEO Tool For Meta Tags 1

SEO Tool For Meta Tags 1


SEO Tool For Meta Tags is a small script that instantly generates meta tags for the user. more>>
SEO Tool For Meta Tags is a small script that instantly generates meta tags for the user. It allows you offer a neat little service to your website visitors. They simply sumbit their sites title, description, and keywords & presto, out comes their meta tags to put in their html code.

It takesa about 30 seconds to install and have working on your site.

SEO Tool For Meta Tags does not have any spyware or adware. No personal information is collected, stored, or transmitted by Online Meta Tag Generator. The project does not install any browser plugins or hijackers.
<<less
Download (0.002MB)
Added: 2007-07-30 License: Freeware Price:
856 downloads
Class::Meta 0.53

Class::Meta 0.53


Class::Meta is a Perl class automation, introspection, and data validation. more>>
Class::Meta is a Perl class automation, introspection, and data validation.

SYNOPSIS

Generate a class:
package MyApp::Thingy;
use strict;
use Class::Meta;
use Class::Meta::Types::String;
use Class::Meta::Types::Numeric;

BEGIN {

# Create a Class::Meta object for this class.
my $cm = Class::Meta->new( key => thingy );

# Add a constructor.
$cm->add_constructor(
name => new,
create => 1,
);

# Add a couple of attributes with generated methods.
$cm->add_attribute(
name => uuid,
authz => Class::Meta::READ,
type => string,
required => 1,
default => sub { Data::UUID->new->create_str },
);
$cm->add_attribute(
name => name,
is => string,
required => 1,
default => undef,
);
$cm->add_attribute(
name => age,
is => integer,
default => undef,
);

# Add a custom method.
$cm->add_method(
name => chk_pass,
view => Class::Meta::PUBLIC,
);
$cm->build;
}
Then use the class:
use MyApp::Thingy;

my $thingy = MyApp::Thingy->new;
print "ID: ", $thingy->id, $/;
$thingy->name(Larry);
print "Name: ", $thingy->name, $/;
$thingy->age(42);
print "Age: ", $thingy->age, $/;
Or make use of the introspection API:
use MyApp::Thingy;

my $class = MyApp::Thingy->my_class;
my $thingy;

print "Examining object of class ", $class->package, $/;

print "nConstructors:n";
for my $ctor ($class->constructors) {
print " o ", $ctor->name, $/;
$thingy = $ctor->call($class->package);
}

print "nAttributes:n";
for my $attr ($class->attributes) {
print " o ", $attr->name, " => ", $attr->get($thingy), $/;
if ($attr->authz >= Class::Meta::SET && $attr->type eq string) {
$attr->get($thingy, hey there!);
print " Changed to: ", $attr->get($thingy), $/;
}
}

print "nMethods:n";
for my $meth ($class->methods) {
print " o ", $meth->name, $/;
$meth->call($thingy);
}

Class::Meta provides an interface for automating the creation of Perl classes with attribute data type validation. It differs from other such modules in that it includes an introspection API that can be used as a unified interface for all Class::Meta-generated classes. In this sense, it is an implementation of the "Facade" design pattern.

<<less
Download (0.060MB)
Added: 2006-10-05 License: Perl Artistic License Price:
1114 downloads
Website META Language 2.0.11

Website META Language 2.0.11


Website META Language is a free and extensible Webdesigners off-line HTML generation toolkit for Unix. more>>
Website META Language is a free and extensible Webdesigners off-line HTML generation toolkit for Unix, distributed under the GNU General Public License (GPL v2). Website META Language is written in ANSI C and Perl 5, built via a GNU Autoconf based source tree and runs out-of-the-box on all major Unix derivates.
It can be used free of charge both in educational and commercial environments. WML consists of a control frontend driving up to nine backends in a sequential pass-oriented filtering scheme. Each backend provides one particular core language. For maximum power WML additionally ships with a well-suited set of include files which provide higher-level features built on top of the backends core languages.
While not trivial and idiot proof WML provides most of the core features real hackers always wanted for HTML generation.
Enhancements:
- Building of the package on Cygwin was fixed.
- Some vendor patches were integrated.
<<less
Download (3.0MB)
Added: 2006-08-21 License: GPL (GNU General Public License) Price:
1161 downloads
Mar 0.5

Mar 0.5


Mar project is a simple binary file format for storing arbitrary meta and user data. more>>
Mar project is a simple binary file format for storing arbitrary meta and user data.
Both the mar library and the accompanying utility are written in C with the intention of porting to many platforms. A set of C++ wrapper classes (along with a test file that utilises these classes) are included.
These classes provide familar stream and iterator abstractions over the mar library. The package has currently been tested on PCs running FreeBSD, Linux and Windows ME, 2000 & XP. Some testing has also been conducted on architectures running HPUX & Solaris
Enhancements:
- The general portability of the package has been improved.
- Alignment issues have been resolved on non-i386 architectures.
- A Makefile has now been added to the source directory.
- Additional debug output has been added.
- A number of API calls now return MAR_NOMATCH.
<<less
Download (0.072MB)
Added: 2006-02-17 License: MIT/X Consortium License Price:
1344 downloads
Class::Meta::Declare 0.04

Class::Meta::Declare 0.04


Class::Meta::Declare is a Perl module deprecated in favor of Class::Meta::Express. more>>
Class::Meta::Declare is a Perl module deprecated in favor of Class::Meta::Express.

SYNOPSIS

This was a first attempt at making a saner interface for Class::Meta. It is nicer, but Class::Meta::Express is nicer still. Go use that one.

package MyApp::Thingy;
use Class::Meta::Declare :all;
use Data::UUID;

Class::Meta::Declare->new(
meta => [
key => thingy,
accessors => $ACC_SEMI_AFFORDANCE,
],
attributes => [
pi => {
context => $CTXT_CLASS,
authz => $AUTHZ_READ,
default => 3.1415927,
},
id => {
authz => $AUTHZ_READ,
type => $TYPE_STRING,
default => sub { Data::UUID->new->create_str },
},
name => {
required => 1,
type => $TYPE_STRING,
default => No Name Supplied,
},
age => { type => $TYPE_INTEGER, },
],
methods => [
some_method => {
view => $VIEW_PUBLIC,
code => sub {
my $self = shift;
return [ reverse @_ ];
},
}
]
);

my $object = MyApp::Thingy->new;
print MyApp::Thingy->pi; # prints 3.1415927
print $object->name; # prints "No Name Supplied;
$object->set_name("bob");
print $object->name; # prints "bob"

This class provides an alternate interface for Class::Meta.

Class::Meta is a useful module which allows one to create Perl classes which support introspection (also known as reflection). Typically Perl classes, when created, dont supply a lot of metadata. Imported helper functions show up when you call $object->can($method). Private, protected and trusted methods are not readily supported. Fetching a list of attributes or methods is a haphazard affair. Class::Meta overcomes these shortcomings by building the classes for you and allowing you to fetch a class object:

my $class_object = $object->my_class;

foreach my $attribute ( $class_object->attributes ) {
print $attribute->name, "n";
}
foreach my $method ( $class_object->methods ) {
print $method->name, "n";
}

If youve set up your class correctly, these properties are now easy to discover.

Unfortunately, many find the Class::Meta interface to be a bit clumsy. As an alternative, Class::Meta::Declare allows you to declare your entire class in a single argument list to the constructor and have the class built for you automatically. Further, reasonable defaults are provided for just about everything.

IMPORTANT: You want this class or Class::Meta if you need an introspection API for your classes. If you do not need introspection or dynamic class generation, these modules are overkill.

<<less
Download (0.015MB)
Added: 2006-09-27 License: Perl Artistic License Price:
1122 downloads
Image::MetaData::JPEG::TagLists 0.15

Image::MetaData::JPEG::TagLists 0.15


Image::MetaData::JPEG::TagLists contains a collection of tag tables for JPEG segments. more>>
Image::MetaData::JPEG::TagLists contains a collection of tag tables for JPEG segments. Image::MetaData::JPEG::TagLists is an appendix to the main manual page of the Image::MetaData::JPEG module, which the reader should refer to for further details and the general scope.

Valid tags for Exif APP1 data

The Japan Electronics and Information Technology Industries Association (JEITA) set up a standard for an exchange format for digital still cameras pictures, known as Exif. This standard defines a structure for embedding meta-data in a JPEG picture, to be written in the APP1 segment. The generalities and the reference documents about this structure are introduced in the Structure appendix; this section and its subsections list the valid interoperability record tags as well as their format.

Canonical Exif 2.2 and TIFF 6.0 tags for IFD0 and IFD1

In general, IFD0 and IFD1 can host tags from the same set. These tags are divided in three categories: canonical, additional and registered to companies. The tags listed in the following table are to be considered canonical; they are described at length in the Exif standard document, and can be found both in the IFD0 and in the IFD1 (some of them, in fact, must be present in both directories).

The class column carries the tag class; possible values are: A (image data structure), B (offsets), C (image data characteristics), D (other tags) and P (pointers to other IFDs). The two following columns show tag hexadecimal codes and names. The type column specifies the (always unsigned) tag type: I (short or long), S (short), L (long), R (rational) and A (ASCII, always null terminated). The count column obviously carries the tag count (- for a variable count, either because it is a variable length string or because it depends on other tags).

The IFD0 and IFD1 columns specify the support level in the respective directory; each column comprises four letters, because both the primary image (IFD0) and the thumbnail (IFD1) can come in four varieties (uncompressed chunky, uncompressed planar, uncompressed YCC and JPEG compressed).

This module currently focuses only on JPEG pictures (not TIFF), so only the fourth letter of the IFD0 column is interesting, but note that the thumbnail of a JPEG image can be uncompressed. The support level codes stand for: M (mandatory), R (recommended), O (optional), N (not_recorded) and J (included in JPEG marker and so not recorded).

The thumbnail-only column shows a T for those records which cannot be set/changed by the user exception made during a thumbnail update action (and some of them are calculated automatically anyway). Note that, in some cases, it is possible to set a tag when its support level is N (e.g., the YCbCr stuff in IFD1): picture displaying programs should however simply ignore it. Some other tags, concerning offsets or thumbnail specific information, cannot be set by the module user (they are calculated automatically, more reliably): these are marked by calculated in the notes, or by a T in the thumbnail-only column.

Hexadecimal code count IFD0 IFD1 thumbnail-only
class | Tag name type | supp.supp.| notes
| | | | | | | | |
A 100 ImageWidth I 1 MMMJ MMMJ T (not JPEG) pixels/row
A 101 ImageLength I 1 MMMJ MMMJ T (not JPEG) num. rows
A 102 BitsPerSample S 3 MMMJ MMMJ T (not JPEG) 8,8,8
A 103 Compression S 1 MMMJ MMMM T 1(uncompr.) or 6(JPEG)
A 106 PhotometricInterpretation S 1 MMMN MMMJ 2(RGB) or 6(YCbCr)
D 10e ImageDescription A - RRRR OOOO (see note 1)
D 10f Make A - RRRR OOOO camera manufacturer
D 110 Model A - RRRR OOOO camera model
B 111 StripOffsets I - MMMN MMMN calculated
A 112 Orientation S 1 RRRR OOOO (see note 2)
A 115 SamplesPerPixel S 1 MMMJ MMMJ T (not JPEG) 3 compon.
B 116 RowsPerStrip I 1 MMMN MMMN T (not JPEG)
B 117 StripByteCounts I - MMMN MMMN T (not JPEG)
A 11a XResolution R 1 MMMM MMMM (see note 3)
A 11b YResolution R 1 MMMM MMMM (see note 3)
A 11c PlanarConfiguration S 1 OMOJ OMOJ (see note 4)
A 128 ResolutionUnit S 1 MMMM MMMM (see note 3)
C 12d TransferFunction S 768 RRRR OOOO (see note 5)
D 131 Software A - OOOO OOOO Exif software/firmware
D 132 DateTime A 20 RRRR OOOO (see note 6)
D 13b Artist A - OOOO OOOO owner/photogr./creator
C 13e WhitePoint R 2 OOOO OOOO (see note 5)
C 13f PrimaryChromaticities R 6 OOOO OOOO (see note 5)
B 201 JPEGInterchangeFormat L 1 NNNN NNNM calculated
B 202 JPEGInterchangeFormatLength L 1 NNNN NNNM T (only JPEG)
C 211 YCbCrCoefficients R 3 NNOO NNOO (see note 7)
A 212 YCbCrSubSampling S 2 NNMJ NNMJ (see note 7)
A 213 YCbCrPositioning S 1 NNMM NNOO (see note 7)
C 214 ReferenceBlackWhite R 6 OOOO OOOO (see note 8)
D 8298 Copyright A - OOOO OOOO of photogr./editor
P 8769 ExifOffset L 1 MMMM OOOO calculated
P 8825 GPSInfo L 1 OOOO OOOO calculated

<<less
Download (0.28MB)
Added: 2006-06-15 License: Perl Artistic License Price:
1227 downloads
libextractor 0.5.18a

libextractor 0.5.18a


libextractor is a library used to extract meta-data from files of arbitrary type. more>>
libextractor is a library that is used to extract meta-data from files of arbitrary type. It is designed to use helper-libraries to perform the actual extraction, and to be trivially extendable by linking against external extractors for additional file types. libextractor is part of the GNU project. Our official GNU website can be found at http://www.gnu.org/software/libextractor/. libextractor can be downloaded from this site or the GNU mirrors.
The goal is to provide developers of file-sharing networks or WWW-indexing bots with a universal library to obtain simple keywords to match against queries. libextractor contains a shell-command "extract" that, similar to the well-known "file" command, can extract meta-data from a file an print the results to stdout.
Currently, libextractor supports the following formats: HTML, PDF, PS, OLE2 (DOC, XLS, PPT), OpenOffice (sxw), StarOffice (sdw), DVI, MAN, MP3 (ID3v1 and ID3v2), OGG, WAV, JPEG, GIF, PNG, TIFF, DEB, RPM, TAR(.GZ), ZIP, ELF, REAL, RIFF (AVI), MPEG, QT and ASF.
Also, various additional MIME types are detected.
libextractor is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Enhancements:
- This release fixes various build problems and a crash with recent versions of libgsf.
vAn incomplete manual was added.
<<less
Download (7.5MB)
Added: 2007-07-05 License: (FDL) GNU Free Documentation License Price:
842 downloads
Object::Relation::DataType 0.1.0

Object::Relation::DataType 0.1.0


Object::Relation::DataType is a Perl module with complex data types for TKP. more>>
Object::Relation::DataType is a Perl module with complex data types for TKP.

The Object::Relation::DataType name space is set aside for the creation of complex data types for TKP. By "complex" I mean serializable objects, such as dates, durations, states, etc. It also is designed to create a distinction from simpler data types, which are defined in Object::Relation::Meta::DataTypes.

What creates the distinction? Well, first and foremost is that fact that it doesnt usually take much to create the simple data types, while the complex data types might need more code to handle serialization and deserialization, overloading, etc.

But another criterion is that, while the data types in Object::Relation::Meta::DataTypes are always loaded by TKP, since it uses them for its own classes, the complex data types in the Object::Relation::DataType name space tend to be loaded only as needed by the Object::Relation business classes that need them.

Okay, so its somewhat arbitrary, but you get the idea. The remainder of this document is dedicated to documenting how to add new data types to TKP.

<<less
Download (0.23MB)
Added: 2006-09-18 License: Perl Artistic License Price:
1131 downloads
Image::MetaData::JPEG::Structures 0.15

Image::MetaData::JPEG::Structures 0.15


Image::MetaData::JPEG::Structures is a Perl module that describes the structure of a JPEG file. more>>
Image::MetaData::JPEG::Structures is a Perl module that describes the structure of a JPEG file; it is an appendix to the main manual page of the Image::MetaData::JPEG module, which the reader should refer to for further details and the general scope.

THE STRUCTURE OF JPEG PICTURES

The JPEG (Joint Photographic Experts Group) ISO standard is a lossy image compression mechanism developed before 1990, designed for compressing colour or gray-scale photo-realistic images (it performs poorly on line-art drawings). The JPEG mechanism is designed to exploit known limitations of the human eye, in particular the fact that colour changes are perceived less accurately than changes in brightness.

Note that although the "baseline" JPEG format is patent-free, there are patents associated with some optional features, namely arithmetic coding and hierarchical storage. For this reason, these optional features are never used on the Web (good job, patent fans ...). JPEG refers only to a class of compression algorithms, not to a specific file format. In order to produce files with embedded JPEG streams, a number of file format (semi-)standards have been adapted or devised, some of which are listed in the format section. The structure of a well formed JPEG file can be described by the following pseudo production rules (for sake of simplicity, some additional constraints between tables and SOF segments are neglected).

JPEG --> (SOI)(misc)*(image)?(EOI)
(image) --> (hierarch.)|(non-hier.)
(hierarch.) --> (DHP)(frame)+
(frame) --> (misc)*(EXP)?(non-hier.)
(non-hier.) --> (SOF)(scan)+
(scan) --> (misc)*(SOS)(data)*(ECS)(DNL)?
(data) --> (ECS)(RST)
(misc) --> (DQT)|(DHT)|(DAC)|(DRI)|(COM)|(APP)

(SOI) = Start Of Image
(EOI) = End Of Image
(SOF) = Start Of Frame header (10 types)
(SOS) = Start Of Scan header
(ECS) = Entropy Coded Segment (row data, not a real segment)
(DNL) = Define Number of Lines segment
(DHP) = Define Hierarchical P??? segment
(EXP) = EXPansion segment
(RST) = ReSTart segment (8 types)
(DQT) = Define Quantisation Table
(DHT) = Define Huffman coding Table
(DAC) = Define Arithmetic coding Table
(DRI) = Define Restart Interval
(COM) = COMment segment
(APP) = APPlication segment

This package does not check that a JPEG file is really correct; it accepts a looser syntax, were segments and ECS blocks are just contiguous (basically, because it does not need to display the image!). All meta-data information is concentrated in the (COM*) and (APP) Segments, exception made for some records in the (SOF*) segment (e.g. image dimensions).

Reference: B< "Digital compression and coding of continuous-tone still
images: requirements and guidelines", CCITT recommend. T.81, 1992,
The International Telegraph and Telephone Consultative Committee,
standard ISO/IEC IS 10918-1 or ITU-T Recommendation T.81 >.
Also: B< "The JPEG still picture compression standard", G.K.Wallace,
1991, IEEE Transactions on Consumer Electronics >.

<<less
Download (0.28MB)
Added: 2006-08-25 License: Perl Artistic License Price:
1160 downloads
weta-dfs 0.3.30

weta-dfs 0.3.30


weta-dfs is a distributed file system. more>>
weta-dfs is a distributed file system. weta-dfs is designed to be fail-safe through replications of files, fast and easy to install, platform independent, and to have fast recovery from crashes.

It consists of Data Node Servers and one Meta Data Server and a java.io.File-like client API.

<<less
Download (0.92MB)
Added: 2005-12-21 License: The Apache License 2.0 Price:
1402 downloads
Google::Adwords::Data 0.6.0

Google::Adwords::Data 0.6.0


Google::Adwords::Data is base class for the Data modules. more>>
Google::Adwords::Data is base class for the Data modules.

This module is not supposed to be used directly. Use the child data modules.

<<less
Download (0.041MB)
Added: 2006-11-28 License: Perl Artistic License Price:
1060 downloads
Class::Meta::Type 0.53

Class::Meta::Type 0.53


Class::Meta::Type is a Perl module for data type validation and accessor building. more>>
Class::Meta::Type is a Perl module for data type validation and accessor building.

SYNOPSIS

package MyApp::TypeDef;

use strict;
use Class::Meta::Type;
use IO::Socket;

my $type = Class::Meta::Type->add( key => io_socket,
desc => IO::Socket object,
name => IO::Socket Object );

This class stores the various data types used by Class::Meta. It manages all aspects of data type validation and method creation. New data types can be added to Class::Meta::Type by means of the add() constructor. This is useful for creating custom types for your Class::Meta-built classes.

Note:This class manages the most advanced features of Class::Meta. Before deciding to create your own accessor closures as described in add(), you should have a thorough working knowledge of how Class::Meta works, and have studied the add() method carefully. Simple data type definitions such as that shown in the SYNOPSIS, on the other hand, are encouraged.

<<less
Download (0.060MB)
Added: 2006-09-22 License: Perl Artistic License Price:
1127 downloads
Meta::Widget::Gtk::Sprite 0.01

Meta::Widget::Gtk::Sprite 0.01


Meta::Widget::Gtk::Sprite is a Perl module to do C64 style sprites. more>>
Meta::Widget::Gtk::Sprite is a Perl module to do C64 style sprites.

SYNOPSIS
use Gtk;
use Gnome;
init Gnome "test.pl";
use Meta::Widget::Gtk::Sprite;
my $mw = new Gtk::Window( "toplevel" );
my($canvas) = Gnome::Canvas->new() ;
$mw->add($canvas );
$canvas->show;
my $croot = $canvas->root;
my $sprites = new Meta::Widget::Gtk::Sprite($croot);
my $p1 = $sprites->create("./player1.xpm", 100, 0);
$sprites->slide_to_time($p1,5000, 100, 100);
my $p2 = $sprites->create("./player2.xpm", 0, 0);
$sprites->slide_to_speed($p2,10, 100, 100);
$sprites->set_collision_handler(&Bang);
$mw->show;
Gtk->main;
sub Bang
{
print "Bang!n";
exit;
}

Sprite is a module to bring back the simple graphics programming of the C64 (hopefully without the lookslikearse component). You can declare pictures to be sprites on the canvas, and then move them around and crash them into each other.

NOTE
The canvas is the Gnome::Canvas object. You have to have a Gtk::Canvas object before starting Sprite.

METHODS
new Meta::Widget::Gtk::Sprite( $canvas_root );

The new method takes one argument, the canvas root object for the canvas you want to draw on.

You may obtain the canvas root from your canvas like this:

my $croot = $canvas->root;

$sprite_number = $sprites->create("/path/to/filename", 10, 20);
Create will load an image file (right now, only xpm format) from disk and make a sprite out of it. The two numbers are the x and y position on the canvas.

$sprites->show( $sprite_number );
Makes the sprite appear on the canvas

$sprites->hide( $sprite_number );
Make the sprite picture disappear from the canvas. Note that it can still collide with other sprites. If you dont want it to hit anything, move it out of the way or ignore it in your own collision handler.

$sprites->destroy( $sprite_number );
Completely destroys a sprite.

$sprites->move_to( $sprite_number, 10, 20 );
Teleports the sprite named in $sprite_number to the position given immediately. Contrast slide_to_xxx functions.

$sprites->slide_to_time( $sprite_number, $time, 10, 20 );
Will make the sprite $sprite_number slide across the canvas to the position 10, 20. It will take $time seconds to do so. Slow speeds will appear jerky.

$sprites->slide_to_speed( $sprite_number, $speed, 10, 20);
Will slide the sprite $sprite_number to the position 10, 20. It will move at a speed of $speed pixels per second.

$sprites->pos( $sprite_number);
Returns the x and y coordinates of $sprite_number

$sprites->velocity( $sprite_number, 5, 6);
Sets the speed of $sprite_number. The numbers are the x and y speeds. Negative numbers will make the sprite go backwards.

$sprites->set_collision_handler ( &collision_handler );
Name a function that will be called when two sprites collide. Note that the collision detection system is extremely crappy right now. It turns out that it is very difficult to efficiently detect collisions.

Your function will be called like this:

collision_handler( $sprite_number, $sprite_number);

where the two sprite numbers are the two sprites that collided. Multiple sprites colliding will cause many collision handler callbacks.

Note well that if you set the collision handler Sprite.pm will check every single sprite for collisions every animation loop. I havent optimised this, so you will notice a massive slowdown as you add more sprites.

To switch collisions checking off, set the handler to undef:

$sprites->set_collision_handler ( undef );

<<less
Download (0.008MB)
Added: 2006-07-11 License: Perl Artistic License Price:
1200 downloads
Secleted [ 0 ] software to compare
  • Page: 1 of 5
  • 1
  • 2
  • 3
  • 4
  • 5