Result:
found more than 419 distributions - search limited to the first 2001 files matching your query ( run in 2.200 )


Finance-Quant-Charter

 view release on metacpan or  search on metacpan

lib/Finance/Quant/Charter.pm  view on Meta::CPAN

		}
	}
	
	sub plotlines {
		my ($file, $stock, $x, $lines, $y_format) = @_;
		my @legend;
		my ($data, $colors) = ([], []);
		
		$data->[0] = $x;   # x-axis labels
	
		for (0..$#{$lines}) {
			$data->[(1+$_)] = $lines->[$_]->{data};
			$colors->[$_] = $lines->[$_]->{color};
			$legend[$_] = $lines->[$_]->{name};
		}
	
		my $graph = GD::Graph::lines->new(1024,420);
		$graph->set (dclrs => $colors) or die $graph->error;
		$graph->set_legend(@legend) or die $graph->error;
		$graph->set (legend_placement => 'BC') or die $graph->error;
		$graph->set(y_number_format => $y_format) if $y_format;
		
		my $skipp = int(0.2*scalar(@{$data->[0]})) unless(!$data->[0]);
		
		$skipp = 0 unless($skipp);

lib/Finance/Quant/Charter.pm  view on Meta::CPAN

		$graph->set (
			title => "stock: $stock",
			boxclr => 'black',
			bgclr => 'dgray',
			axislabelclr => 'white',
			legendclr => 'white',
			textclr => 'white',
			r_margin => 20,
			tick_length => -4,
			y_long_ticks => 1,
			axis_space => 10,

 view all matches for this distribution


Flower

 view release on metacpan or  search on metacpan

public/assets/css/main.css  view on Meta::CPAN

.about-page{padding-top:70px;min-height:800px;position:relative}.about-page .mission{max-width:900px}.about-page .mission h2{text-align:center;font-weight:500;margin:0 auto 20px 0;color:rgba(255,255,255,0.9)}.about-page .mission p{font-weight:300;col...
Animate.css - http://daneden.me/animate
Licensed under the MIT license - http://opensource.org/licenses/MIT

Copyright (c) 2015 Daniel Eden
*/.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.animated.hinge{-webkit-animati...

 view all matches for this distribution


Foorum

 view release on metacpan or  search on metacpan

root/static/css/form.css  view on Meta::CPAN

    padding-left: 5%;
    padding-right: 5%;
    padding-top: 2%;
    padding-bottom: 3%;
}
form.valid fieldset legend {
    font-weight: bolder;
    font-size: 130%;
    color: #000000;
}
form.valid fieldset p {

 view all matches for this distribution


Form-Processor

 view release on metacpan or  search on metacpan

share/passwords.txt  view on Meta::CPAN

trouble
gunner
happy
fucking
gordon
legend
jessie
stella
qwert
eminem
arthur

share/passwords.txt  view on Meta::CPAN

llama
littlema
libra
liberty1
leticia
legends
legenda
left
leeroy
l3tm31n
kumar
kfcnjxrf

share/passwords.txt  view on Meta::CPAN

letmein3
letmein0
lerxst
leppard
lenny1
legendary
lauryn
lasagna
lapper
lapin
lamp

share/passwords.txt  view on Meta::CPAN

lena12
legshow
leghorn
leggy
Legend1
legend1
leftie
leftee
leedsuni
leedsu
lee

share/passwords.txt  view on Meta::CPAN

leonida
lena22
lemont
leiter
leihak
legends1
legend2
legend12
legato
leetah
leecher
ledge
leckmich

share/passwords.txt  view on Meta::CPAN

len4ik
lemony
lemondrop
leman
legere
legendar
legal1
leeway
leeward
leeman
LEELEE

 view all matches for this distribution



FreeHAL

 view release on metacpan or  search on metacpan

AI/FreeHAL/Engine.pm  view on Meta::CPAN

        'bescheiden'   => $data->{const}{ADJ},
        'beschaeftigt' => $data->{const}{ADJ},
        'besetzt'      => $data->{const}{ADJ},
        'beste'        => $data->{const}{ADJ},
        'best'         => $data->{const}{ADJ},
        'grundlegend'  => $data->{const}{ADJ},
        'zu'           => $data->{const}{PREP},
        'gehoeren'     => $data->{const}{VERB},
        'gehoert'      => $data->{const}{VERB},
        'mitten'       => $data->{const}{PREP},
        'unreif'       => $data->{const}{ADJ},

 view all matches for this distribution


FreeWRL

 view release on metacpan or  search on metacpan

JS/js/jsopcode.def  view on Meta::CPAN

 *
 * This file is best viewed with 116 columns:
01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345
 */

/* legend: op         val name          image       len use def prec  format */

/* Permanently-assigned bytecodes. */
OPDEF(JSOP_NOP,       0,  "nop",        NULL,         1,  0,  0,  0,  JOF_BYTE)
OPDEF(JSOP_PUSH,      1,  "push",       NULL,         1,  0,  1,  0,  JOF_BYTE)
OPDEF(JSOP_POPV,      2,  "popv",       NULL,         1,  1,  0,  0,  JOF_BYTE)

 view all matches for this distribution


Freq

 view release on metacpan or  search on metacpan

t/data/00_preface  view on Meta::CPAN

The Arguments prefixed to the Books are taken, with very
slight alterations, from Hobbes' Translation of the
Odyssey.

It is hoped that the Introduction added to the second
edition may illustrate the growth of those national legends
on which Homer worked, and may elucidate the plot of the
Odyssey.


PREFACE TO THE THIRD EDITION.

t/data/00_preface  view on Meta::CPAN

that nothing is known. We may conjecture that some contest
between peoples of more or less kindred stocks, who
occupied the isles and the eastern and western shores of
the Aegean, left a strong impression on the popular fancy.
Round the memories of this contest would gather many older
legends, myths, and stories, not peculiarly Greek or even
'Aryan,' which previously floated unattached, or were
connected with heroes whose fame was swallowed up by that
of a newer generation. It would be the work of minstrels,
priests, and poets, as the national spirit grew conscious
of itself, to shape all these materials into a definite
body of tradition. This is the rule of development--first
scattered stories, then the union of these into a NATIONAL
legend. The growth of later national legends, which we are
able to trace, historically, has generally come about in
this fashion. To take the best known example, we are able
to compare the real history of Charlemagne with the old
epic poems on his life and exploits. In these poems we find
that facts are strangely exaggerated, and distorted; that
purely fanciful additions are made to the true records,
that the more striking events of earlier history are
crowded into the legend of Charles, that mere fairy tales,
current among African as well as European peoples, are
transmuted into false history, and that the anonymous
characters of fairy tales are converted into historical
personages. We can also watch the process by which feigned
genealogies were constructed, which connected the princely

t/data/00_preface  view on Meta::CPAN

are justified in supposing that, quite as little of the
real history of events can be extracted from the tale of
Troy, as from the Chansons de Geste.

By the time the Odyssey was composed, it is certain that a
poet had before him a well-arranged mass of legends and
traditions from which he might select his materials. The
author of the Iliad has an extremely full and curiously
consistent knowledge of the local traditions of Greece, the
memories which were cherished by Thebans, Pylians, people
of Mycenae, of Argos, and so on. The Iliad and the Odyssey
assume this knowledge in the hearers of the poems, and take
for granted some acquaintance with other legends, as with
the story of the Argonautic Expedition. Now that story
itself is a tissue of popular tales,--still current in many
distant lands,--but all woven by the Greek genius into the
history of Iason.

The history of the return of Odysseus as told in the
Odyssey, is in the same way, a tissue of old marchen.
These must have existed for an unknown length of time
before they gravitated into the cycle of the tale of Troy.

The extraordinary artistic skill with which legends and
myths, originally unconnected with each other, are woven
into the plot of the Odyssey, so that the marvels of savage
and barbaric fancy become indispensable parts of an
artistic whole, is one of the chief proofs of the unity of
authorship of that poem. We now go on to sketch the plot,

t/data/00_preface  view on Meta::CPAN

shape of a detached marchen or fairy-tale among races who
never heard of Homer. And when we find the story among
Oghuzians, Esthonians, Basques, and Celts, it seems natural
to suppose that these people did not break a fragment out
of the Odyssey, but that the author of the Odyssey took
possession of a legend out of the great traditional store
of fiction. From the wide distribution of the tale, there
is reason to suppose that it is older than Homer, and that
it was not originally told of Odysseus, but was attached to
his legend, as floating jests of unknown authorship are
attributed to eminent wits. It has been remarked with truth
that in this episode Odysseus acts out of character, that
he is foolhardy as well as cunning. Yet the author of the
Odyssey, so far from merely dove-tailing this story at
random into his narrative, has made his whole plot turn on

t/data/00_preface  view on Meta::CPAN

epic is probably the popular tale, known all over the
world, of the warrior who, on his return from a long
expedition, has great difficulty in making his prudent wife
recognise him. The incident occurs as a detached story in
China, and in most European countries it is told of a
crusader. 'We may suppose it to be older than the legend of
Troy, and to have gravitated into the cycle of that legend.
The years of the hero's absence are then filled up with
adventures (the Cyclops, Circe, the Phaeacians, the Sirens,
the descent into hell) which exist as scattered tales, or
are woven into the more elaborate epics of Gaels, Aztecs,
Hindoos, Tartars, South-Sea Islanders, Finns, Russians,

 view all matches for this distribution


FunctionalPerl

 view release on metacpan or  search on metacpan

lib/PXML/XHTML.pm  view on Meta::CPAN

    'a', 'abbr', 'acronym', 'address', 'applet', 'area', 'b', 'base',
    'basefont', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'caption',
    'center', 'cite', 'code', 'col', 'colgroup', 'dd', 'del', 'dfn', 'dir',
    'div', 'dl', 'dt', 'em', 'fieldset', 'font', 'form', 'h1', 'h2', 'h3',
    'h4', 'h5', 'h6', 'head', 'hr', 'html', 'i', 'iframe', 'img', 'input',
    'ins', 'isindex', 'kbd', 'label', 'legend', 'li', 'link', 'map', 'menu',
    'meta', 'noframes', 'noscript', 'object', 'ol', 'optgroup', 'option', 'p',
    'param', 'pre', 'q', 's', 'samp', 'script', 'select', 'small',
    'source',    # not XHTML?, hack
    'span', 'strike', 'strong', 'style', 'sub', 'sup', 'table', 'tbody', 'td',
    'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'tt', 'u', 'ul', 'var',

 view all matches for this distribution


GD-Chart-Radial

 view release on metacpan or  search on metacpan

examples/radial.pl  view on Meta::CPAN

my $chart = GD::Chart::Radial->new(500,500,1);

my $max = 31;

$chart->set(
	    legend            => [qw/april may/],
	    title             => 'Some simple graph',
	    y_max_value       => $max,
	    y_tick_number     => 5,
	   );

 view all matches for this distribution


GD-Chart

 view release on metacpan or  search on metacpan

examples/3d_bar_1.pl  view on Meta::CPAN


use strict;
use GD::Chart;

## Data on Oceans
## - Need to add legend afterwards

my(@data) = (
[180, 106, 75],
[724, 355, 292]
);

 view all matches for this distribution


GD-Graph-Cartesian

 view release on metacpan or  search on metacpan

lib/GD/Graph/Cartesian.pm  view on Meta::CPAN


This is the second best package that I could find on CPAN that supports scatter plots of X/Y data.  However, it does not supports a zero based Y-axis for positive data.  Otherwise this is a great package.

=head3 L<Chart>

This is a great package for its support of legends, layouts and labels but it only support equally spaced x axis data.

=head3 L<GD::Graph>

This is a great package for pie charts but for X/Y scatter plots it only supports equally spaced x axis data.

 view all matches for this distribution


GD-Graph-Hooks

 view release on metacpan or  search on metacpan

Hooks.pm  view on Meta::CPAN

        my $data = shift;

        $self->check_data($data)            or return;
        $self->init_graph()                 or return;
        $self->setup_text()                 or return;
        $self->setup_legend();
        $self->setup_coords()               or return;
        $self->call_hooks(POST_INIT);
        $self->draw_text();
        $self->call_hooks(POST_TEXT);
        unless (defined $self->{no_axes}) {

Hooks.pm  view on Meta::CPAN

        $self->call_hooks(POST_AXIS);
        $self->draw_data()                  or return;
        $self->call_hooks(POST_DATA);
        $self->draw_values()                or return;
        $self->call_hooks(POST_VALUES);
        $self->draw_legend();
        $self->call_hooks(POST_LEGEND);

        return $self->{graph}
    };
}

 view all matches for this distribution


GD-Graph-splined

 view release on metacpan or  search on metacpan

lib/GD/Graph/splined.pm  view on Meta::CPAN

	$graph->set(
		x_label => 'X Label',
		y_label => 'Y label',
		title => 'A Splined Graph',
	);
	$graph->set_legend( 'one', 'two' );
	$graph->plot(\@data);

	open(OUT, ">splined.png") or die $!;
	binmode OUT;
	print OUT $graph->gd->png;

 view all matches for this distribution


GD-Graph3d

 view release on metacpan or  search on metacpan

lib/GD/Graph/axestype3d.pm  view on Meta::CPAN

# Inherit setup_text
# Inherit set_x_label_font
# Inherit set_y_label_font
# Inherit set_x_axis_font
# Inherit set_y_axis_font
# Inherit set_legend
# Inherit set_legend_font



# ----------------------------------------------------------
# Sub: init_graph

lib/GD/Graph/axestype3d.pm  view on Meta::CPAN

		$self->{'3d_shadows'}[$self->{acci}]    = $self->set_clr( $self->_darken( _rgb($self->{accentclr}) ) );

		$self->{'3d_highlights'}[$self->{valuesci}] = $self->set_clr( $self->_brighten( _rgb($self->{valuesclr}) ) );
		$self->{'3d_shadows'}[$self->{valuesci}]    = $self->set_clr( $self->_darken( _rgb($self->{valuesclr}) ) );

		$self->{'3d_highlights'}[$self->{legendci}] = $self->set_clr( $self->_brighten( _rgb($self->{legendclr}) ) );
		$self->{'3d_shadows'}[$self->{legendci}]    = $self->set_clr( $self->_darken( _rgb($self->{legendclr}) ) );

		if( $self->{boxclr} ) {
			$self->{'3d_highlights'}[$self->{boxci}] = $self->set_clr( $self->_brighten( _rgb($self->{boxclr}) ) );
			$self->{'3d_shadows'}[$self->{boxci}]    = $self->set_clr( $self->_darken( _rgb($self->{boxclr}) ) );
		} # end if

lib/GD/Graph/axestype3d.pm  view on Meta::CPAN

# Inherit get_max_y
# Inherit get_min_y
# Inherit get_max_min_y_all
# Inherit _get_bottom
# Inherit val_to_pixel
# Inherit setup_legend


# [JW] Override draw_legend and reverse the drawing order
# if cumulate is enabled so legend matches data on chart
sub draw_legend
{
	my $self = shift;

	return unless defined $self->{legend};

	my $xl = $self->{lg_xs} + $self->{legend_spacing};
	my $y  = $self->{lg_ys} + $self->{legend_spacing} - 1;

	# If there's a frame, offset by the size and margin
	$xl += $self->{legend_frame_margin} + $self->{legend_frame_size} if $self->{legend_frame_size};
	$y += $self->{legend_frame_margin} + $self->{legend_frame_size} if $self->{legend_frame_size};

	my $i = 0;
	my $row = 1;
	my $x = $xl;	# start position of current element
	my @legends = @{$self->{legend}};
	my $i_step = 1;
	
	# If we are working in cumulate mode, then reverse the drawing order
	if( $self->{cumulate} ) {
		@legends = reverse @legends;
		$i = scalar(@legends);
		$i = $self->{_data}->num_sets if $self->{_data}->num_sets < $i;
		$i++;
		$i_step = -1;
	} # end if
	
	foreach my $legend (@legends)
	{
		$i += $i_step;

		# Legend for Pie goes over first set, and all points
		# Works in either direction
		last if $i > $self->{_data}->num_sets;
		last if $i < 1;

		my $xe = $x;	# position within an element

		next unless defined($legend) && $legend ne "";

		$self->draw_legend_marker($i, $xe, $y);

		$xe += $self->{legend_marker_width} + $self->{legend_spacing};
		my $ys = int($y + $self->{lg_el_height}/2 - $self->{lgfh}/2);

		$self->{gdta_legend}->set_text($legend);
		$self->{gdta_legend}->draw($xe, $ys);

		$x += $self->{lg_el_width};

		if (++$row > $self->{lg_cols})
		{

lib/GD/Graph/axestype3d.pm  view on Meta::CPAN

			$x = $xl;
		}
	}
	
	# If there's a frame, draw it now
	if( $self->{legend_frame_size} ) {
		$x = $self->{lg_xs} + $self->{legend_spacing};
		$y = $self->{lg_ys} + $self->{legend_spacing} - 1;
		
		for $i ( 0 .. $self->{legend_frame_size} - 1 ) {
			$self->{graph}->rectangle(
				$x + $i,
				$y + $i, 
				$x + $self->{lg_x_size} + 2 * $self->{legend_frame_margin} - $i - 1,
				$y + $self->{lg_y_size} + 2 * $self->{legend_frame_margin} - $i - 1,
				$self->{acci},
			);
		} # end for
	} # end if
	
}



# Inherit draw_legend_marker

1;

 view all matches for this distribution


GD

 view release on metacpan or  search on metacpan

demos/draw_colors.pl  view on Meta::CPAN

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);

demos/draw_colors.pl  view on Meta::CPAN


for (my $c=0; $c<$cols; $c++) {
  for (my $r=0; $r<$rows; $r++) {
    my $color = $color_names[$c*$rows + $r] or next;
    my @topleft  = ($c*$cell_width,$r*$cell_height);
    my @botright = ($topleft[0]+$cell_width,$topleft[1]+$cell_height-$legend_height);
    $img->bgcolor($color);
    $img->fgcolor($color);
    $img->rectangle(@topleft,@botright);
    $img->moveTo($topleft[0]+2,$botright[1]+$legend_height-2);
    $img->fgcolor('black');
    $img->string($color);
  }
}

 view all matches for this distribution


GDGraph-Map

 view release on metacpan or  search on metacpan

lib/GD/Graph/Map.pm  view on Meta::CPAN

my %Defaults = ( #Default Href is JavaScript code, which do nothing
                 href   => 'javascript:;',
                 lhref  => 'javascript:;',
                 hrefs  => [],
                 lhrefs => [],
                 #Default information and legend
                 info   => 'x=%x   y=%y',
                 legend => '%l',
                 #Line width for lines and linespoints graph
                 linewidth => 3,
               );

my %No_Tags = ('img_src'   => 0, 'img_usemap' => 0, 'img_ismap'   => 0,

lib/GD/Graph/Map.pm  view on Meta::CPAN

      $s .= "$x, @{[$y + $lw]}, ";
    } #foreach
    chop $s; chop $s;
    my $href = $self->{lhrefs}->[$_ - 1];
    $href = $self->{lhref} unless defined($href);
    $href =~ s/%l/$gr->{legend}->[$_ - 1]/g;
    my $info = $self->{info};
    $info =~ s/%l/$gr->{legend}->[$_ - 1]/g;
    $s .= "\" Href=\"$href\" Title=\"$info\" Alt=\"$info\" onMouseOver=\"window.status=\'$info\'; return true;\" onMouseOut=\"window.status=\'\'; return true;\"";
    if ($self->{newWindow} and not $href =~ /javascript:/i)
    { my $s_;
      map
      { $s_ .= "$1=@{[$self->{$_}]}," if $_ =~ /window_(\w+)/i and $self->{$_};

lib/GD/Graph/Map.pm  view on Meta::CPAN

      chop $s_;
      $s .= " Target=\"_$name\" onClick=\"window.open(\'\', \'_$name\', \'$s_\'); return true;  \"";
    } #if
    $s .= ">\n";
  } #foreach
  $s .= $self->imagelegend($file, $data) if defined($gr->{legend});
  $s .= "</Map>\n";
  unless ($self->{noImgMarkup})
  { $s .= "<Img UseMap=#$name Src=\"$file\" border=0 Height=@{[$gr->{height}]} Width=@{[$gr->{width}]} ";
    map
   { $s .= "$1=@{[$self->{$_}]} " if $_ =~ /img_(\w+)/i and $self->{$_};

lib/GD/Graph/Map.pm  view on Meta::CPAN

      my $href = ${$self->{hrefs}}[$_ - 1][$i];
      $href = $self->{href} unless defined($href);
      $href =~ s/%x/$data->[0][$i]/g; $href =~ s/%y/$data->[$_][$i]/g;
      $href = $1.(sprintf "%$2f", $data->[0][$i]).$3 if ($href =~ /(^.*)%(\.\d)x(.*&)/);
      $href = $1.(sprintf "%$2f", $data->[$_][$i]).$3 if ($href =~ /(^.*)%(\.\d)y(.*$)/);
      $href =~ s/%l/@{$gr->{legend}}->[$_ - 1]/g;
      my $info = $self->{info};
      $info =~ s/%x/$data->[0][$i]/g; $info =~ s/%y/$data->[$_][$i]/g;
      $info = $1.(sprintf "%$2f", $data->[0][$i]).$3 if ($info =~ /(^.*)%(\.\d)x(.*&)/);
      $info = $1.(sprintf "%$2f", $data->[$_][$i]).$3 if ($info =~ /(^.*)%(\.\d)y(.*$)/);
      $info =~ s/%l/@{$gr->{legend}}->[$_ - 1]/g;
      $s .= "Href=\"$href\" Title=\"$info\" Alt=\"$info\" onMouseOver=\"window.status=\'$info\'; return true;\" onMouseOut=\"window.status=\'\'; return true;\"";
      if ($self->{newWindow} and not $href =~ /javascript:/i)
      { my $s_;
        map
        { $s_ .= "$1=".$self->{$_}."," if (($_ =~ /window_(\w*)/i) and ($self->{$_} != 0))

lib/GD/Graph/Map.pm  view on Meta::CPAN

        $s1 .= "$x, @{[$y + $lw]}, ";
      } #foreach
      chop $s1; chop $s1;
      my $lhref = $self->{lhrefs}->[$_ - 1];
      $lhref = $self->{lhref} unless defined($lhref);
      $lhref =~ s/%l/$gr->{legend}->[$_ - 1]/g;
      my $legend = $self->{legend};
      $legend =~ s/%l/$gr->{legend}->[$_ - 1]/g;
      $s .= "\t<Area Shape=polygon Coords=\"$s1\" Href=\"$lhref\" Title=\"$legend\" Alt=\"$legend\" onMouseOver=\"window.status=\'$legend\'; return true;\" onMouseOut=\"window.status=\'\'; return true;\"";
      if ($self->{newWindow} and not $lhref =~ /javascript:/i)
      { my $s_;
        map
        { $s_ .= "$1=@{[$self->{$_}]}," if $_ =~ /window_(\w+)/i and $self->{$_};
        } keys %$self;

lib/GD/Graph/Map.pm  view on Meta::CPAN

        $s .= " Target=\"_$name\" onClick=\"window.open(\'\', \'_$name\', \'$s_\'); return true;  \"";
      } #if
      $s .= ">\n"; $s1 = "";
    } #if
  }
  $s .= $self->imagelegend($file, $data) if defined($gr->{legend});
  $s .= "</Map>\n";
  unless ($self->{noImgMarkup})
  { $s .= "<Img UseMap=#$name Src=\"$file\" border=0 Height=@{[$gr->{height}]} Width=@{[$gr->{width}]} ";
    map
    { $s .= "$1=".($self->{$_})." " if ($_ =~ /img_(\w*)/i) and defined($self->{$_})

lib/GD/Graph/Map.pm  view on Meta::CPAN

      my $href = ${$self->{hrefs}}[$_ - 1][$i];
      $href = $self->{href} unless defined($href);
      $href =~ s/%x/$data->[0][$i]/g; $href =~ s/%y/$data->[$_][$i]/g;
      $href = $1.(sprintf "%$2f", $data->[0][$i]).$3 if ($href =~ /(^.*)%(\.\d)x(.*$)/);
      $href = $1.(sprintf "%$2f", $data->[$_][$i]).$3 if ($href =~ /(^.*)%(\.\d)y(.*$)/);
      $href =~ s/%l/@{$gr->{legend}}->[$_ - 1]/g;
      my $info = $self->{info};
      $info =~ s/%x/$data->[0][$i]/g; $info =~ s/%y/$data->[$_][$i]/g;
      $info = $1.(sprintf "%$2f", $data->[0][$i]).$3 if ($info =~ /(^.*)%(\.\d)x(.*$)/);
      $info = $1.(sprintf "%$2f", $data->[$_][$i]).$3 if ($info =~ /(^.*)%(\.\d)y(.*$)/);
      $info =~ s/%l/@{$gr->{legend}}->[$_ - 1]/g;
      $s .= "Href=\"$href\" Title=\"$info\" Alt=\"$info\" onMouseOver=\"window.status=\'$info\'; return true;\" onMouseOut=\"window.status=\'\'; return true;\"";
      if ($self->{newWindow} and not $href =~ /javascript:/i)
      { my $s_;
        map
        { $s_ .= "$1=".$self->{$_}."," if (($_ =~ /window_(\w*)/i) and ($self->{$_} != 0))

lib/GD/Graph/Map.pm  view on Meta::CPAN

        $s .= " onClick=\"window.open(\'\', \'_$name\', \'$s_\'); return true;\"";
      } #if
      $s .= ">\n";
    }
  }
  $s .= $self->imagelegend($file, $data) if defined($gr->{legend});
  $s .= "</Map>\n";
  unless ($self->{noImgMarkup})
  { $s .= "<Img UseMap=#$name Src=\"$file\" border=0 Height=@{[$gr->{height}]} Width=@{[$gr->{width}]} ";
    map
    { $s .= "$1=".($self->{$_})." " if ($_ =~ /img_(\w*)/i) and defined($self->{$_})

lib/GD/Graph/Map.pm  view on Meta::CPAN

  return level_angle($a - 360) if $a > 360;
  return level_angle($a + 360) if $a < 0;
  return $a;
} #level_angle

sub imagelegend($$) #($file, \@data)
{ my $self = shift;
  my $file = shift;
  my $data = shift;
  my $gr = $self->{GDGraph};
  my $name = defined $self->{mapName} ? $self->{mapName} : time;
  my $s = '';
  my $xl = $gr->{lg_xs} + $gr->{legend_spacing};
  my $y  = $gr->{lg_ys} + $gr->{legend_spacing} - 1;
  my $i = 0;
  my $row = 1;
  my $x = $xl;
  foreach my $legend (@{$gr->{legend}})
  { $i++;
    last if $i > $gr->{_data}->num_sets;
    my $xe = $x;
    next unless defined($legend) && $legend ne "";
    my $lhref = @{$self->{lhrefs}}->[$i - 1];
    $lhref = $self->{lhref} unless defined($lhref);
    $lhref =~ s/%l/$_/g;
    $legend = $self->{legend};
    $legend =~ s/%l/$_/g;
    my $ye = $y + int($gr->{lg_el_height}/2 - $gr->{legend_marker_height}/2);
    $s .= "\t<Area Shape=rect Coords=\"$xe, $ye, ".($xe + $gr->{legend_marker_width}).", ".($ye + $gr->{legend_marker_height})."\" Href=\"$lhref\" Title=\"$legend\" Alt=\"$legend\" onMouseOver=\"window.status=\'$legend\'; return true;\" onMouseOut=\"...
    if ($self->{newWindow} and $lhref ne $self->{href}) #$xe + $gr->{legend_marker_width}
    { my $s_;
      map
      { $s_ .= "$1=".$self->{$_}."," if (($_ =~ /window_(\w*)/i) and ($self->{$_} != 0))
      } keys %{$self};
      chop $s_;
      $s .= " Target=_$name";
      $s .= " onClick=\"window.open(\'\', \'_$name\', \'$s_\'); return true;\"";
    } #if
    $s .= ">\n";
    $xe += $self->{legend_marker_width} + $self->{legend_spacing};
    $x += $gr->{lg_el_width};
    if (++$row > $gr->{lg_cols})
    { $row = 1;
      $y += $gr->{lg_el_height};
      $x = $xl;
    }
  }
  return $s;
} #imagelegend

1;

__END__

lib/GD/Graph/Map.pm  view on Meta::CPAN

  binmode PNG; #only for Windows like platforms
  print PNG $graph->plot(\@data)->png;
  close PNG;

Then create B<GD::Graph::Map> object. And set options using set routine, or set it
in constructor immediately. If it is necessary create hrefs and legend arrays:

  $map = new GD::Graph::Map($graph, newWindow => 1);

  $map->set(info => "%x slice contains %.1p% of %s (%x)");

lib/GD/Graph/Map.pm  view on Meta::CPAN


=over *

=item B<hrefs>, B<lhrefs>

Sets hyper reference for each data (hrefs), and for each legend (lhrefs).
Array @hrefs must the same size as arrays in @data list, otherwise null
elements of @hrefs will set to default. Similarly array @lhrefs must the same
size as the legend array. Default uses the simple JavaScript code 'javascript:;'
instead reference, which do nothing (but in the some browsers it can work incorrectly).

Example of I<@hrefs> array:

for the I<GD::Graph::pie> object:

lib/GD/Graph/Map.pm  view on Meta::CPAN

then   @hrefs = (["1.htm","2.htm","3.htm"],
                 ["4.htm","5.htm","6.htm"]);

Example of I<@lhrefs> array;

if    @legend = [  'one',  'two','three'];

then  @lhrefs = ["1.htm","2.htm","3.htm"];



=item B<info>, B<legend>

Set information string for the data and for the legend. It will be displayed in the status line
of your browser. Format of this string the same for each data, but you can use special
symbols for receive individual information. Now available following symbols:
I<%x> - Will be replaced on the x values in @data (first array)
I<%y> - Will be replaced on the y values in @data (other arrays)
I<%s> - Will be replaced on the sum of all y values.
I<%l> - Will be replaced on the legend. For all objects, except the B<GD::Graph::pie> object.
I<%p> - Will be replaced on the value, which show what part from all contains this data
(in percentages).

I<%s> and I<%p> symbols can useing only in the B<GD::Graph::pie> object. I<%l> symbol
vice versa available for all objects, except the B<GD::Graph::pie> object. And I<%x>, I<%y>

lib/GD/Graph/Map.pm  view on Meta::CPAN

objects.
For the numerical parameters (%x, %y, %s and %p) you can use special format
(the same as uses sprintf routine) for round data: %.d{x|y|p|s}, where 'd' is a digit
from 0 to 9.
For example %.0p or %.3x. It is desirable uses if %x, %y, %s or %p is the floating numbers.
Default is 'x=%x y=%y' for info, and '%l' for legend.

=item B<img_*>

You can set any attribute in the IMG tag (except UseMap, Src, Width, Height and Border,
they will be set automatically) use set routine: set(img_option => value), where 'option'

 view all matches for this distribution


GDGraph-XY

 view release on metacpan or  search on metacpan

xylines.pm  view on Meta::CPAN


	$self->set_x_label_font(GD::gdSmallFont);
	$self->set_y_label_font(GD::gdSmallFont);
	$self->set_x_axis_font(GD::gdTinyFont);
	$self->set_y_axis_font(GD::gdTinyFont);
	$self->set_legend_font(GD::gdTinyFont);
	$self->set_values_font(GD::gdTinyFont);
}

# PRIVATE
sub set_max_min 

 view all matches for this distribution


GDGraph

 view release on metacpan or  search on metacpan

Graph.pm  view on Meta::CPAN

    boxclr        => undef,     # Fill colour for box axes, default: not used
    accentclr     => 'gray',    # bar, area and pie outlines.

    labelclr      => 'dblue',   # labels on axes
    axislabelclr  => 'dblue',   # values on axes
    legendclr     => 'dblue',   # Text for the legend
    textclr       => 'dblue',   # All text, apart from the following 2

    valuesclr     => 'dblue',   # values printed above the points
    
    # data set colours

Graph.pm  view on Meta::CPAN

    $self->{tci}  = $self->set_clr(_rgb($self->{textclr}));
    $self->{lci}  = $self->set_clr(_rgb($self->{labelclr}));
    $self->{alci} = $self->set_clr(_rgb($self->{axislabelclr}));
    $self->{acci} = $self->set_clr(_rgb($self->{accentclr}));
    $self->{valuesci} = $self->set_clr(_rgb($self->{valuesclr}));
    $self->{legendci} = $self->set_clr(_rgb($self->{legendclr}));
    $self->{boxci} = $self->set_clr(_rgb($self->{boxclr})) 
        if $self->{boxclr};

    $self->{graph}->transparent($self->{bgci}) if $self->{transparent};
    $self->{graph}->interlaced( $self->{interlaced} || undef ); # required by GD.pm

Graph.pm  view on Meta::CPAN


Depth of a shadow, positive for right/down shadow, negative for left/up
shadow, 0 for no shadow (default).
Also see the C<shadowclr> and C<bar_spacing> options.

=item labelclr, axislabelclr, legendclr, valuesclr, textclr

Text Colours used for the chart: label (labels for the axes or pie),
axis label (misnomer: values printed along the axes, or on a pie slice),
legend text, shown values text, and all other text.

All colours should have a valid value as described in L<"COLOURS">.

=item dclrs (short for datacolours)

Graph.pm  view on Meta::CPAN


Default: lines

=back

=head2 Graph legends (axestype graphs only)

At the moment legend support is minimal.

B<Methods>

=over 4

=item $graph-E<gt>set_legend(I<@legend_keys>);

Sets the keys for the legend. The elements of @legend_keys correspond
to the data sets as provided to I<plot()>.

If a key is I<undef> or an empty string, the legend entry will be skipped.

=item $graph-E<gt>set_legend_font(I<font name>);

Sets the font for the legend text (see L<"FONTS">).
Default: GD::gdTinyFont.

=back

B<Options>

=over 4

=item legend_placement

Where to put the legend. This should be a two letter key of the form:
'B[LCR]|R[TCB]'. The first letter indicates the placement (I<B>ottom or
I<R>ight), and the second letter the alignment (I<L>eft,
I<R>ight, I<C>enter, I<T>op, or I<B>ottom).
Default: 'BC'

If the legend is placed at the bottom, some calculations will be made
to ensure that there is some 'intelligent' wrapping going on. if the
legend is placed at the right, all entries will be placed below each
other.

=item legend_spacing

The number of pixels to place around a legend item, and between a
legend 'marker' and the text.
Default: 4

=item legend_marker_width, legend_marker_height

The width and height of a legend 'marker' in pixels.
Defaults: 12, 8

=item lg_cols

If you, for some reason, need to force the legend at the bottom to
have a specific number of columns, you can use this.
Default: computed

=back

Graph.pm  view on Meta::CPAN

things, since all font handling in GD::Graph is delegated to there.

Examples:

    $graph->set_title_font('/fonts/arial.ttf', 18);
    $graph->set_legend_font(gdTinyFont);
    $graph->set_legend_font(
        ['verdana', 'arial', gdMediumBoldFont], 12)

(The above discussion is based on GD::Text 0.65. Older versions have
more restrictive behaviour).

 view all matches for this distribution


GIFgraph

 view release on metacpan or  search on metacpan

samples/sample12.pl  view on Meta::CPAN

	y_tick_number => 8,
	y_label_skip => 2,
	bar_spacing => 4,
);

$my_graph->set_legend( 'Data set 1', 'Data set 2' );

$my_graph->plot_to_gif( "sample12.gif", \@data );

exit;

 view all matches for this distribution


GIFgraph_Map

 view release on metacpan or  search on metacpan

GIFgraph/Map.pm  view on Meta::CPAN

                 href   => 'javascript:;',
                 hrefs  => [],
                 lhrefs => [],
                 #Open new navigator window?
                 newWindow => 0,
                 #Default information and legend
                 info   => 'x=%x   y=%y',
                 legend => '%l',
               );

my @No_Tags = ('img_src', 'img_usemap', 'img_ismap', 'img_width', 
               'img_height', 'img_border');

GIFgraph/Map.pm  view on Meta::CPAN

      $href = $self->{href} unless defined($href);
      my $info = $self->{info};
      $info =~ s/%x/$data->[0][$i]/g; $info =~ s/%y/$data->[$_][$i]/g;
      $info = $1.(sprintf "%$2f", $data->[0][$i]).$3 if ($info =~ /(^.*)%(\.\d)x(.*&)/);
      $info = $1.(sprintf "%$2f", $data->[$_][$i]).$3 if ($info =~ /(^.*)%(\.\d)y(.*$)/);
      $info =~ s/%l/@{$gr->{legend}}->[$_ - 1]/g;
      $s .= "Href=\"$href\" Alt=\"$info\" onMouseOver=\"window.status=\'$info\'; return true;\" onMouseOut=\"window.status=\'\'; return true;\"";
      if ($self->{newWindow} and not $href =~ /javascript:/)
      { my $s_;
        map
        { $s_ .= "$1=".$self->{$_}."," if (($_ =~ /window_(\w*)/) and ($self->{$_} != 0))

GIFgraph/Map.pm  view on Meta::CPAN

        $s .= " onClick=\"window.open(\'\', \'".($name + 1)."\', \'$s_\'); return true;\"";
      } #if
      $s .= ">\n";
    } #foreach
  } #foreach
  if (defined($gr->{legend}))
  { my $xl = $gr->{lg_xs} + $gr->{legend_spacing};
    my $y = $gr->{lg_ys} + $gr->{legend_spacing} - 1;
    my $i = 0;
    my $row = 1;
    my $x = $xl;
    foreach (@{$gr->{legend}})
    { $i++;
      last if ($i > $gr->{numsets});
      my $xe = $x;
      next if (!defined($_) or $_ eq "");
      my $lhref = @{$self->{lhrefs}}->[$i - 1];
      $lhref = $self->{href} unless defined($lhref);
      my $legend = $self->{legend};
      $legend =~ s/%l/$_/g;
      my $old_ms = $gr->{marker_size};
      my $ms = _min($gr->{legend_marker_height}, $gr->{legend_marker_width});
      ($gr->{marker_size} > $ms/2) and $gr->{marker_size} = $ms/2;
      my $x1 += $xe + int($gr->{legend_marker_width}/2);
      my $y1 += $y + int($gr->{lg_el_height}/2);
      my $n = $gr->pick_marker($i);
      my $l = $x1 - $gr->{marker_size};
      my $r = $x1 - $gr->{marker_size} + $gr->{lg_el_width};
      my $b = $y1 + $gr->{marker_size};
      my $t = $y1 - $gr->{marker_size};
      $s .= "\t<Area Shape=\"rect\" Coords=\"$l, $t, $r, $b\" Href=\"$lhref\" Alt=\"$legend\" onMouseOver=\"window.status=\'$legend\'; return true;\" onMouseOut=\"window.status=\'\'; return true;\"";
      if ($self->{newWindow} and $lhref ne $self->{href})
      { my $s_;
        map
        { $s_ .= "$1=".$self->{$_}."," if (($_ =~ /window_(\w*)/) and ($self->{$_} != 0))
        } keys %{$self};

GIFgraph/Map.pm  view on Meta::CPAN

        $s .= " Target=\"".($name + 1)."\"";
        $s .= " onClick=\"window.open(\'\', \'".($name + 1)."\', \'$s_\'); return true;\"";
      } #if
      $s .= ">\n";
      $gr->{marker_size} = $old_ms;
      $xe += $gr->{legend_marker_width} + $gr->{legend_spacing};
      my $ys = int($y + $gr->{lg_el_height}/2 - $gr->{lgfh}/2);
      $x += $gr->{lg_el_width};
      if (++$row > $gr->{lg_cols})
      { $row = 1;
        $y += $gr->{lg_el_height};

GIFgraph/Map.pm  view on Meta::CPAN

      $href = $self->{href} unless defined($href);
      my $info = $self->{info};
      $info =~ s/%x/$data->[0][$_]/g; $info =~ s/%y/$data->[$i][$_]/g;
      $info = $1.(sprintf "%$2f", $data->[0][$_]).$3 if ($info =~ /(^.*)%(\.\d)x(.*$)/);
      $info = $1.(sprintf "%$2f", $data->[$i][$_]).$3 if ($info =~ /(^.*)%(\.\d)y(.*$)/);
      $info =~ s/%l/@{$gr->{legend}}->[$i - 1]/g;
      $s .= "Href=\"$href\" Alt=\"$info\" onMouseOver=\"window.status=\'$info\'; return true;\" onMouseOut=\"window.status=\'\'; return true;\"";
      if ($self->{newWindow} and not $href =~ /javascript:/)
      { my $s_;
        map
        { $s_ .= "$1=".$self->{$_}."," if (($_ =~ /window_(\w*)/) and ($self->{$_} != 0))

GIFgraph/Map.pm  view on Meta::CPAN

        $s .= " onClick=\"window.open(\'\', \'".($name + 1)."\', \'$s_\'); return true;\"";
      } #if
      $s .= ">\n";
    } #foreach
  } #foreach
  if (defined($gr->{legend}))
  { my $xl = $gr->{lg_xs} + $gr->{legend_spacing};
    my $y = $gr->{lg_ys} + $gr->{legend_spacing} - 1;
    my $i = 0;
    my $row = 1;
    my $x = $xl;
    foreach (@{$gr->{legend}})
    { $i++;
      last if ($i > $gr->{numsets});
      my $xe = $x;
      next if (!defined($_) or $_ eq "");
      my $lhref = @{$self->{lhrefs}}->[$i - 1];
      $lhref = $self->{href} unless defined($lhref);
      my $legend = $self->{legend};
      $legend =~ s/%l/$_/g;	
      my $ye = $y + int($gr->{lg_el_height}/2 - $gr->{legend_marker_height}/2);
      $s .= "\t<Area Shape=\"rect\" Coords=\"$xe, $ye, ".($xe + $gr->{lg_el_width}).", ".($ye + $gr->{legend_marker_height})."\" Href=\"$lhref\" Alt=\"$legend\" onMouseOver=\"window.status=\'$legend\'; return true;\" onMouseOut=\"window.status=\'\'; ...
      if ($self->{newWindow} and $lhref ne $self->{href})
      { my $s_;
        map
        { $s_ .= "$1=".$self->{$_}."," if (($_ =~ /window_(\w*)/) and ($self->{$_} != 0))
        } keys %{$self};
        chop $s_;
        $s .= " Target=\"".($name + 1)."\"";
        $s .= " onClick=\"window.open(\'\', \'".($name + 1)."\', \'$s_\'); return true;\"";
      } #if
      $s .= ">\n";
      $xe += $gr->{legend_marker_width} + $gr->{legend_spacing};
      my $ys = int($y + $gr->{lg_el_height}/2 - $gr->{lgfh}/2);
      $x += $gr->{lg_el_width};
      if (++$row > $gr->{lg_cols})
      { $row = 1;
	$y += $gr->{lg_el_height};

GIFgraph/Map.pm  view on Meta::CPAN


=over *

=item B<hrefs>, B<lhrefs>

Set hyper reference for each data (hrefs), and for each legend (lhrefs).
Array @hrefs must the same size as arrays in @data list, otherwise null
elements of @hrefs set to default. Similarly array @lhrefs must the same
size as legend array. Default use the simple JavaScript code 'javascript:;'
instead reference, which do nothing.

Example of I<@hrefs> array:

for I<GIFgraph::pie>

GIFgraph/Map.pm  view on Meta::CPAN

then   @hrefs = (["1.htm","2.htm","3.htm"],
                 ["4.htm","5.htm","6.htm"]);

Example of I<@lhrefs> array;

if    @legend = [  'one',  'two','three'];

then  @lhrefs = ["1.htm","2.htm","3.htm"];



=item B<info>, B<legend>

Set information string for data and for legend. It will be show in status line of your
browser. Format of this string the same for each data, but you may use special
symbols for receive individual information. Now available following symbols:
I<%x> - Is replaced on x values in @data (first array)
I<%y> - Is replaced on y values in @data (other arrays)
I<%s> - Is replaced on sum of all y values. Only for GIFgraph::pie object.
I<%p> - Is replaced on value, which show what part of all contains this data. Only for
B<GIFgraph::pie> object.
%l - Is replaced on legend. Only for B<GIFgraph::bars>, B<GIFgraph::points> and
B<GIFgraph::linespoints> objects.
For %x, %y, %s and %p parameters you may use special format (the same as use
sprintf routine) for round data: %.d{x|y|p|s}, where d is a digit from 0 to 9. For example
%.0p or %.3x. It is desirable use if %x, %y, %s or %p if floating numbers
Default is 'x=%x y=%y' for info, and '%l' for legend.

=item B<img_*>

You can set any attribute in IMG tag (except UseMap, Src, Width, Height and Border,
they will be set automatically) use set routine: set(img_option => value), where option

 view all matches for this distribution


Gadabout

 view release on metacpan or  search on metacpan

Gadabout.pm  view on Meta::CPAN

sub SetGraphSize{
  my $self = shift;
  my $noLegend = shift;
  $noLegend = 0 if (!defined($noLegend));
  if (!$self->{noLegend}) {
    $self->{legendHeight} = $self->{perLegendHeight} * ($self->{num_data_sets} + 1);
  } else {
    $self->{legendHeight} = 0;
  }

  $self->{graph_height} = $self->{image_height} - (2 * $self->{ypad}) - $self->{legendHeight};
  $self->{graph_width}  = $self->{image_width}  - (2 * $self->{xpad});
} # sub SetGraphSize


sub CreateColor{

Gadabout.pm  view on Meta::CPAN

sub AddData{
  my ($self, $xdata, $ydata, $name) = @_;
  $name = "" if (!defined($name));

  $self->SetGraphSize($self->{image_height},$self->{image_width});
  $self->{legendText}[$self->{num_data_sets}] = $name;

  #sort(@xdata);

  my $dataSetIndex = $self->{num_data_sets};
  for (my $i=0; $i < @$xdata; $i++){

Gadabout.pm  view on Meta::CPAN


sub LineGraph{
  my ($self, $dataset, $color) = @_;

  $self->{current_dataset} = $dataset;
  $self->{legend}{$dataset}{'LineGraph'} = {"color" => $color};

  my $lastx = $self->{data_set}[$dataset]{"x"}[0];
  my $lasty = $self->{data_set}[$dataset]{"y"}[0];
		
  for (my $i = 1; $i < $self->{num_points}[$dataset]; $i++) {

Gadabout.pm  view on Meta::CPAN

  my $min = $self->min($self->{ymin}, $self->{axis2}{ymin});

  my ($graph_left, $graph_bottom) = $self->translate($self->{xmin},$min);

  $self->{current_dataset} = $dataset;
  $self->{legend}{$dataset}{'FilledLineGraph'} = {'color' => $color};

  my ($last_x, $last_y) = $self->translate($self->{data_set}[$dataset]{"x"}[0],$self->{data_set}[$dataset]{"y"}[0]);
  $graph_bottom = int($graph_bottom+.5);
  my $first_x  = int($last_x+.5);
  my $first_y  = int($last_y+.5);

Gadabout.pm  view on Meta::CPAN



sub DrawLegend{
  my $self = shift;

  if (defined($self->{legend})) { 
    my $legend_top  = $self->{graph_height} + 2 * $self->{ypad};
    my $current_top = $legend_top;

    $self->DrawText($self->{font},10,$legend_top - 18,"Legend:","black",0);
    $self->DrawLine(10,$legend_top - 4,47,$legend_top - 4,"black");

    my $dataset;
    my $type;
    my $datasetInfo;
    my $legendInfo;
    my $tmpHash = $self->{legend};
    while (($dataset, $legendInfo) = each %$tmpHash) {
      my $legend_left = 10;
      while(($type, $datasetInfo) = each %$legendInfo) {
        my $legendMod;
        if (exists($legendInfo->{'FilledLineGraph'}) || exists($legendInfo->{'VBarGraph'})) {
          $legendMod = 0;
        } else {
          $legendMod = 8;
        }

        if ($type eq "FilledLineGraph"){
          $self->DrawFilledRectangle($legend_left,$current_top,15,15,$datasetInfo->{"color"});
        }
        else{
          if ($type eq "DashedLineGraph"){
            $self->DrawDashedLine($legend_left,$current_top + $legendMod, $legend_left + 15, $current_top + $legendMod, 3, 4, $datasetInfo->{"color"});
          }
          else{
            if ($type eq "ScatterGraph"){
              $self->DrawBrush($legend_left + 8,$current_top + $legendMod,$datasetInfo->{'shape'},$datasetInfo->{"color"});
            }
            else{
              if ($type eq "LineGraph"){
                $self->DrawLine($legend_left,$current_top + $legendMod, $legend_left + 15, $current_top + $legendMod, $datasetInfo->{"color"});
              }
              else{
                if ($type eq "VBarGraph"){
                  $self->DrawGradientRectangle($legend_left + (15 - $self->{vBarWidth}) / 2, $current_top , $self->{vBarWidth}, 15, $datasetInfo->{"color"});
                }
              }
            }
          }
        }

Gadabout.pm  view on Meta::CPAN

        $mesg = " (Right Hand Scale)";
      } else {
        $mesg = "";
      }

      $legend_left += 20;
      my $label;
      if (defined($self->{legendText}[$dataset])){
        $label = $self->{legendText}[$dataset];
      }
      else{
        $label = "Dataset: " . $dataset;
      }
      $label = $label . $mesg;
      $self->DrawText($self->{font}, $legend_left, $current_top, $label, "black", 0);
      $current_top += 20;
      #$dataset++;
    }
  }
} #sub DrawLegend

Gadabout.pm  view on Meta::CPAN

  my $self = shift;
  my $dataset = shift;
  my $shape = shift;
  my $color = shift;
  $self->{current_dataset} = $dataset;
  $self->{legend}{$dataset}{'ScatterGraph'} = {"color" => $color, 'shape' => $shape};

  reset($self->{data_set}[$dataset]{"x"});

  for (my $i=0; $i < $self->{num_points}[$dataset]; $i++) {
    my $x = $self->{data_set}[$dataset]{"x"}[$i];

Gadabout.pm  view on Meta::CPAN

sub VBarGraph{
  my $self = shift;
  my $dataset = shift;
  my $color = shift;
  $self->{current_dataset} = $dataset;
  $self->{legend}{$dataset}{'VBarGraph'} = {"color" => $color};

  for (my $i = 0; $i < $self->{num_points}[$dataset]; $i++) {
    $self->GraphVBar($self->{data_set}[$dataset]{"x"}[$i], $self->{data_set}[$dataset]{"y"}[$i], $color);
  }
}#sub BarGraph

Gadabout.pm  view on Meta::CPAN

  my $startHeightMod  = $pieProps->{"startHeightMod"};
  my $edgeColor       = $pieProps->{"edgeColor"};
  my $maxDepth        = $pieProps->{"maxDepth"};

  my $titlePad        = 15;
  my $legendBoxHeight = 15;
  my $legendBoxSpace  = 8;
  my $legendHeightMod = $legendBoxHeight + $legendBoxSpace + 1;
  my $maxMod = $self->max($defaultRadMod,($self->ArrayMax($radMod)));
  $self->{image_width} = $self->max($self->{image_width},$maxMod+(0.75 * $self->{image_width})); # + ($maxLength * 1));
  my $radius = ($self->{image_width} - 10) * .2;
  #my $radius = ($self->{image_width} - 10) * .3;

  $self->{image_height} = $self->max(2 * ($radius + $maxMod/2) + $self->{ypad},scalar(@$data) * $legendHeightMod + $titlePad);

  $self->InitGraph($self->{image_width},$self->{image_height});

  my $color          = $self->GeneratePieChartColors(scalar(@$data));

  #$radius = ($self->{image_width} - 10) * .3;
  $radius      = $self->min(($self->{image_width} - 10-(.75*$maxMod)) * .2,($self->{image_height} - 40-(.75*$maxMod)) * .5);
  my $absCenterX  = int(($radius + ($radius / 10) + (.75*$maxMod)) + 20 +.5);
  my $absCenterY  = int($radius + 10 + .75*$maxMod +.5);
  my $legend_left = 2 * $absCenterX;
  my $legend_top  = 10;
  my $degreeSteps = 6;

  if (defined($title)) {
    $self->DrawText($self->{font},$legend_left,$legend_top,$title,"black",0);
    $self->DrawLine($legend_left - 2,$legend_top + $titlePad,$legend_left + (length($title) * 5.2),$legend_top + $titlePad,"black");
    $legend_top =  $legend_top + 25;
  }

  #arsort($data);

  my $total = 0;

Gadabout.pm  view on Meta::CPAN

    my $depth;
    my $order  = $self->GetPerspectiveXY($absCenterX,$absCenterY,$orderX,$orderY,$dMod * $depth,$xAngle,$yAngle,$zAngle);
    $polyOrder{$pieceNumber} = $order->{"y"};

    if (defined($total)) {
      $self->DrawFilledRectangle($legend_left,$legend_top,$legendBoxHeight,$legendBoxHeight,$color->[$colorCount]);
      $self->DrawRectangle($legend_left,$legend_top,$legendBoxHeight,$legendBoxHeight,"black");

      my $totalPercentage = ($total ? (int(($value / $total * 1000)+.5) / 10) : "0");
      my $strLegend = " - " . @$name->[$pieceNumber] . ": " . @$data->[$pieceNumber] . " (" . $totalPercentage . "%)";
      $self->DrawText($self->{font},$legend_left + 20, $legend_top, $strLegend,"black",0);
      $legend_top = $legend_top + $legendBoxHeight + $legendBoxSpace;
      $pieColors[$pieceNumber] = $colorCount;
      $colorCount++;
    }

  }

Gadabout.pm  view on Meta::CPAN

    my $offSet = 6;
    my $count  = ceil(($totalDataSets / 2) - $totalDataSets);

    my %tempHash = %$self->{chartData}[$chartID];
    while (my ($foo,$dataset) = each %tempHash) {
      $self->{legend}{$dataset}{"VBarGraph"} = {"color" => @$colors[$foo]};

      my $xOffset = $offSet * $count;

      for (my $i = 0; $i < $self->{num_points}[$dataset]; $i++) {
        $self->GraphVBar($self->{data_set}[$dataset]{"x"}[$i], $self->{data_set}[$dataset]{"y"}[$i], @$colors[$foo], $xOffset);

 view all matches for this distribution


Galileo

 view release on metacpan or  search on metacpan

lib/Galileo/files/public/assets/bootstrap/css/bootstrap.min.css  view on Meta::CPAN

 * Copyright 2012 Twitter, Inc
 * Licensed under the Apache License v2.0
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Designed and built with all the love in the world @twitter by @mdo and @fat.
 */article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-si...

 view all matches for this distribution


Game-Collisions

 view release on metacpan or  search on metacpan

nytprof/js/jquery-min.js  view on Meta::CPAN

/*! jQuery v1.12.4 | (c) jQuery Foundation | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this...
}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(M(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"str...
marginLeft:0},function(){return a.getBoundingClientRect().left}):0))+"px":void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+V[d]+...
padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return Y(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement...

 view all matches for this distribution


Game-HexDescribe

 view release on metacpan or  search on metacpan

share/hex-describe-schroeder-table.txt  view on Meta::CPAN

;fire giant temple of Marduk
1,The front of the temple consists of a sea of sculptures: a thousand stone soldiers, staring out at any visitors, wielding their [swords|spears|halbers], waiting for a battle that never comes.
1,Above the entrance to this temple you see a giant chariot. Inside it are an archer and a driver. Giant scythes project out from the wheels to cut down soldiers that oppose them.

;fire giant temple interior
1,The inside of this temple is a domed chamber nearly 100ft high. There are stone benches sit on and [fire material] statues of fire giants to look at. If you know the legends you can see the statues of [fire giant statues].
1,The inside of the temple is dizzying array of platforms connected by short stairs, with [fire material] trees burning under a roof 60ft above. Along the walls are rows of statues. If you know the history of dwarves and giants, you’ll recognise th...
1,The inside of this temple might at one time have been glorious but now it is filled with boiling grey mud and dancing shadows. The fires burning along the walls show fallen statues and broken columns disappearing the blubbering mass. The stink of s...

;fire giant statues
2,*[with fire giant name]* and *[and fire giant name]*, [fire giant legend summary]
1,*[fire giant name]* the dwarf kings they had enslaved: *[with dwarf name]*, *[and dwarf name]*, and *[and dwarf name]*
1,*[fire giant name]* and the dragon they had enslaved, *[red dragon name]*

;fire giant legend summary
1,who separated fire from earth at the beginning of time
1,who enslaved the ifrit *[ifrit name]* and forced it to [fire giant legendary project]
1,who fought over *[and fire giant name]* and [both died|destroyed the city at the centre of the world] in the process
1,who fought over *[and fire giant name]* and how *[same fire giant name]* was then [crushed|buried|chained for all eternity] under the mountain of *[Sky|Earth|Despair|Hopelessness]*

;fire giant legendary project
1,build the bridge of the river of [ash|dreams|fear]
1,build the ship of the [lead|iron|salt] sea
1,build the rainbow bridge for the gods
1,build the eternal stairs
1,forge the axe to fell the world tree

share/hex-describe-schroeder-table.txt  view on Meta::CPAN

1,eater
1,father

;dwarves
3,This is a small forge. [5d8] **dwarves** live and work here ([dwarf stats]) led by [dwarf with portrait] (level [1d6+2 as level]). [luxurious context] [dwarven treasure]
1,This is a legendary forge stronghold. [5d8x10] **dwarves** live and work here ([dwarf stats]) led by [dwarf with portrait] (level [1d4+8 as level]). They are divided into [3d6] families, each led by a clan elder (level [1d6+2]). [dwarven stronghold...

;dwarf stats
1,HD 1 AC 4 1d6 D1 MV 6 ML 8 XP 100

;duergar stats

share/hex-describe-schroeder-table.txt  view on Meta::CPAN


;neolithic magic weapon
1,An *arrow* +1 with an obsidian tip.
1,A *sling stone* +1.
1,An *arrow* +1/+3 vs. reptiles, a relic from the *Old Lizard Wars*.
1,The ancient spear *Scale Eater*[here store Scale Eater as legendary weapon] +1/+3 vs. reptiles, a relic of the *Old Lizard Wars*, blessed by *Pazuzu*.
1,A *javelin of thunder* that explodes like a <a class="spell" href="#fireball">fireball</a> dealing 6d6 to all nearby, save vs. spells for half.
1,The ancient bow *Giant Killer*[here store Giant Killer as legendary weapon] +1/+3 vs. giants and extinct megafauna, e.g. sabre tooth tigers, mammoths, or giant elk.

;neolithic wondrous item
1,A *stone of orientation* that always points north.
1,A *stone of fire* that always lights a perfect campfire when struck with iron.
1,An *eternal torch* that produces an eternal flame, temporarily suppressed under water.

share/hex-describe-schroeder-table.txt  view on Meta::CPAN


;light elves on the march
1,There are [save 1d6+4 as level][save spellbook for elves][4d6] **light elves** ([elf stats]) in gleaming armour, with lances and shields on impossibly thin grey horses with long manes, led by [elf with portrait] (level [same level]). [same spellboo...

;light elf mission
1,The flowing letters on their white banners identify them as *[name for a clan of the light elves 1]* elves. “Have you seen the *[nearby name for a light elf legendary item]*? If you bring it to us, we will grant you a realm of your own on the Ast...
1,The flowing letters on their white banners identify them as *[name for a clan of the light elves 2]* elves. “Have you seen any other light elves? Take heed for the *[name for a clan of the light elves 1]* are ridden by a strange madness. Avoid th...

;clan of the light elves
# there are exactly two such clans per map
1,[name for a clan of the light elves 1]

share/hex-describe-schroeder-table.txt  view on Meta::CPAN

1,Empress
1,Flower
1,Tree
1,Wilderness

;name for a light elf legendary item
# they are all looking for the same item
1,[light elf legendary item]

;light elf legendary item
1,[capitalize positive adjective] [capitalize metal jewelry singular] of [elf name]
1,[capitalize positive adjective] [capitalize vessel desc] of [elf name]

;positive adjective
1,great
1,legendary
1,holy
1,astral
1,arcane

;wood elves

share/hex-describe-schroeder-table.txt  view on Meta::CPAN

;druids
1,[druid warning sign] Here stands [druid circle] [the locals call it] *[druid circle name]*. [druid allies] [druid trails]
1,[druid warning sign] At last you reach [druid circle] [the locals call it] *[druid circle name]*. [druid allies] [druid trails]

;the locals call it
1,Local legends have named this place
1,In the old days, they called it
1,In *[old elf ballad name]*, this place was called
1,In *The Travels of [old name]*, this place was called

;druid trails

share/hex-describe-schroeder-table.txt  view on Meta::CPAN


;bard
1,The [bard adjective] [singing humanoid] **bard** *[[same singing humanoid] with portrait]* is here, playing the [instrument] and [with performing] *[with story]* and [and performing] *[and story]*. [audience reaction] If you ask them about the war,...

;bard mission
1,They’re looking for a legendary weapon called *[nearby legendary weapon]*. Have you seen it?
1,They’re looking for a book called *[nearby library book]*. Have you seen it?
1,[maybe a book]

;bard adjective
1,wandering

share/hex-describe-schroeder-table.txt  view on Meta::CPAN

# neutrality vs law
1,A volatile truce has recently been formed between the two local secret societies. Both are still unsure and suspicious of each other, and will be watching any visitors closely to try to figure out their allegiances.<p>The society of the *[name for ...
# neutrality vs chaos
1,Talk of a treaty between the two local secret societies seems to be the biggest bit of gossip around town.<p>The society of the *[name for a secret society (neutrality)]* is led by [secret society boss] [description for a secret society (neutrality...
# law vs chaos
1,Strife is turning sibling against sibling and parents against their children.<p>The legendary *[story mcguffin] of [human story hero]* used to belong to the *[name for a secret society (law)]*, but now it is gone. Their leader is [secret society bo...
# neutrality vs chaos
1,The locals are forced to pay protection money to *[name for a secret society (chaos)]*, led by [secret society boss] [description for a secret society (chaos)]<p>The recent arrival of *[name for a secret society (neutrality)]* has disrupted this lu...
# neutrality vs law
1,The *[name for a secret society (law)]* are recruiting new members for an ongoing feud. They are led by [secret society boss] [description for a secret society (law)]<p>They are trying to drive the *[name for a secret society (neutrality)]* out of ...

share/hex-describe-schroeder-table.txt  view on Meta::CPAN

1,[save 1d6+1 as level][save spellbook for elves][3d12] **tree elves** ([elf stats]) led by [wood|tree|night|moon] [guardian|prince|princess|custodian] [elf with portrait] (level [same level]). [same spellbook for elves] [leader treasure] [ancient tr...
1,[save 1d6+1 as level][save spellbook for elves][3d12] **netherworld elves** ([elf stats]) led by [earth|tunnel|night|moon] [prince|princess|daughter|son|hunter|justicar|inquisitor] [elf with portrait] (level [same level]). [same spellbook for elves...
1,[save 1d6+4 as level][save spellbook for elves][4d6] **light elves** ([elf stats]) in gleaming armour, with spears and shields, led by [elf with portrait] (level [same level]). [same spellbook for elves] [leader treasure] They are accompanied by [2...

;Yggdrasil mission
1,They want to avenge the death of *[elf name]*, legendary author of [store elf as singing humanoid]*[story]*, killed by the fire giant *[fire giant name]* in Muspelheim. Their current location is unknown. This is going to be a long side-quest.
1,They went to see the demon-oracle of *[demon name]* and got the answer they needed. Now all they need to do is get back home.
1,They succeeded in bringing down the thief of the elven *long sword* +1 with [elven inscription][here store the sword of [same owner] as elf treasure]
1,They failed in tracking the thief of the elven *long sword* +1 with [elven inscription]. It must still be down there somewhere, in Muspelheim.
1,They succeeded in bringing down the thief of [elven ring of power][here store the ring of [same owner] as elf treasure]
1,They failed in tracking the thief of [elven ring of power] It must still be down there somewhere, in Muspelheim.

share/hex-describe-schroeder-table.txt  view on Meta::CPAN

;relic of Pazuzu
1,small four-winged vulture demon statuette of *Pazuzu*
;relic of Freya
1,small dark wood wolf sculpture dedicated to *Freya*
;relic of Odin
1,legendary eye patch of *Odin* containing the *truth gem*
;relic of Thor
1,small silver hammer amulet of *Thor*
;relic of Mitra
1,magic *fire stone* of *Mitra*

share/hex-describe-schroeder-table.txt  view on Meta::CPAN

5,An elven *long bow* +1 with [elven inscription][here store the long bow of [same owner] as elf treasure]
5,A dwarven *short sword* +2 with [dwarven inscription]
2,A dwarven *crossbow* +2.
2,A goblin assassin’s black iron *crossbow* +1, decorated with the seven heads of *Set*.
1,A goblin assassin’s *short bow* +1 with plenty of notches along its side.
1,The orcish zweihänder *Wall Cutter*[here store Wall Cutter as legendary weapon] +1/+3 vs. city dwellers, in the [orc sword tradition].
1,An orcish *mace* +1 with [orcish runes].
1,An orcish *mace* +1 marked with the runes of *[evil power]*.
1,The orcish spear *Dog Impaler*[here store Dog Impaler as legendary weapon] +1/+3 vs. elves, created by *[orc name]* in *[orc war]*.
1,The orcish sword *Monkey Slicer*[here store Monkey Slicer as legendary weapon] +1/+3 vs. humans used by *[orc name]* in *[orc war]*.
1,The ancient spear *Fur Hunter*[here store Fur Hunter as legendary weapon] +1/+3 vs. mammals, a relic of the *Old Lizard Wars*, blessed by *Set*.
1,The long sword *Moonfire*[here store Moonfire as legendary weapon] +1/+3 vs. lycanthropes, inscribed with silver runes of death and banishment, forged by the high inquisitors of *[wight realm]*.
1,The long sword *Razorblade*[here store Razorblade as legendary weapon] +1/+3 vs. spell casters, forged by ancient machines in the *Philosophers’ War*.
1,The holy long sword *Angelfire*[here store Angelfire as legendary weapon] +1/+3 vs. undead, forged in Asgard by *[dwarf name]* during the *Vampire Wars*.
1,The long sword *Meteorstrike*[here store Meteorstrike as legendary weapon] +1/+3 vs. dragons, an old elven sword forged in the *Dragon Wars*.
1,The long sword *Dragonslayer*[here store Dragonslayer as legendary weapon] +1/+3 vs. dragons, blessed by *Marduk*.
1,The dwarven hammer *Ironslayer*[here store Ironslayer as legendary weapon] +1/+3 vs. armoured foes, made by the legendary *[dwarf name]* of *[dwarf forge]*.
1,A *long sword of light* +3 (60ft), made in Asgard for the valkyrie *[valkyrie name]*[here store [same valkyrie name]’s sword as legendary weapon] (the sword rejects anybody who refuses to join three fights while carrying the sword).
1,The *Club of the Slayer*[here store club of the slayer as legendary weapon] +1/+3 vs. giants, blessed by *Marduk*.
1,A smoking, quivering *black arrow of death* +2, carrying the curse of *Nergal*, ready to take root in a target: if hit, save vs. death or die; the arrow’s curse is lost when shot whether it hits or misses.
1,The two handed *Icekiller*[here store Icekiller as legendary weapon] +3, forged by the frost giant *[frost giant name]* in Jotunheim; when the blade is drawn, snow flakes form; when it is stuck into water, a layer of ice forms (10ft); when left uns...
1,The long sword *Swampfire*[here store Swampfire as legendary weapon] +1/+3 vs. runners, forged in the depths of Myrkheim by frogling priests of Tsathoggua; it eeks a phosphorous glowing liquid and smells of rotten eggs; when left unsheathed, every...
1,The *Trident of Fishes*[here store Trident of Fishes as legendary weapon] +1 gives you long, webbed toes and the ability to breathe under water when you step into it, and you can speak the language of fishes.
1,The ancient war hammer *Earth Hammer*[here store Earth Hammer as legendary weapon] +3, made by *[orc name]* in the *War of the Landgrab*: it can smash any structure built by man in three blows.
1,The long bow *Life Ender*[here store Life Ender as legendary weapon] +1/+3 vs. the living, forged in the *Vampire Wars*
1,[neolithic magic weapon]

;magic weapon for magic user
5,An elven *dagger* +1 with [elven inscription][here store the dagger of [same owner] as elf treasure]
3,A goblin assassin’s *dagger* +1 with grip covered by rats’ teeth and lizard skin.
2,A *dagger* +1 consecrated to *[power]*.
1,A *dagger* +1 with the pommel being a small talking head of *[power]* always there to recommend a violent course of action.
1,A *dagger* +1 consecrated to *[evil power]* poisoning your thoughts with images of you stabbing anybody you are talking to.
1,The dagger *Lifeblood* +1 which allows you to transfer the power of life by cutting somebody and having somebody else drink it.
1,The dagger *Stonecutter*[here store Stonecutter as legendary weapon] +1 which allows you to slowly cut through stone.
1,A magic *tongue dagger* +1 with a sticky tongue wrapped around its grip which can pick up unguarded items within 2m, consecrated to Tsathoggua.
3,A dwarven *dagger* +2 with [dwarven inscription]
1,The dagger *Tin Opener*[here store Tin Opener as legendary weapon] +1/+3 vs. armoured foes, with etchings on its blade showing a peasant stabbing a knight into the visor.
1,The black dagger *Kingslayer*[here store Kingslayer as legendary weapon] +1, blessed by *Set*: a target hit in the surprise round must save vs. poison or die.
1,The dagger *Heart Eater*[here store Heart Eater as legendary weapon] +1/+3 vs. humans, with etchings on its blade showing a human sacrifice.
1,The elven silver dagger *Celestial Guardian*[here store Celestial Guardian as legendary weapon] +1/+3 vs. devils.
1,A magic silver rune dagger *Moonshine*[here store Moonshine as legendary weapon] +1/+3 vs. were-creatures.

;magic armour
3,[magic armour for magic user]
4,A suit of elven *plate armour* +1 with [elven inscription][here store the armour of [same owner] as elf treasure]
2,A suit of dwarven *plate armour* +2 with [dwarven inscription]

share/hex-describe-schroeder-table.txt  view on Meta::CPAN

1,horse, allows you to ride
1,black cat, allows you to sneak

;unique item
1,
0,The *[here name for a light elf legendary item]*, an ancient light elf heirloom.

;spellbooks
1,<h1 id="appendix-a">Appendix A: Spellbooks</h1><p>These spells are from the <a href="https://alexschroeder.ch/pdfs/spellcasters/">Spellcasters</a> project.<div style="font-size: smaller; column-count: 2">[halberds & helmets: spellbooks]</div>

# Use make hex-describe in the spellcasters working directory to generate the following

 view all matches for this distribution


Game-TextMapper

 view release on metacpan or  search on metacpan

lib/Game/TextMapper/Traveller.pm  view on Meta::CPAN

	$text .= sprintf("%02d%02d @$tile\n", $x + 1, $y + 1);
      }
    }
  }
  $text .= join("\n", @$comms, "\ninclude traveller.txt\n");
  $text .= $self->legend();
  return $text;
}

sub legend {
  my $self = shift;
  my $template = qq{# frame and legend};
  my $x = int(($self->cols + 1) * 1.5 * $dx);
  my $y = int(($self->rows + 1) * $dy + 5);
  $template .= qq{
other <rect fill="none" stroke="black" stroke-width="10" x="0" y="-50" width="$x" height="$y" />},
  $x = int(($self->cols + 1) * 0.75 * $dx);

 view all matches for this distribution


Game-TileMap

 view release on metacpan or  search on metacpan

lib/Game/TileMap.pm  view on Meta::CPAN

use Carp qw(croak);

use Game::TileMap::Legend;
use Game::TileMap::Tile;

has param 'legend' => (

	# isa => InstanceOf ['Game::TileMap::Legend'],
);

has field 'coordinates' => (

lib/Game/TileMap.pm  view on Meta::CPAN

with qw(
	Game::TileMap::Role::Checks
	Game::TileMap::Role::Helpers
);

sub new_legend
{
	my $self = shift;

	return Game::TileMap::Legend->new(@_);
}

lib/Game/TileMap.pm  view on Meta::CPAN

}

sub from_string
{
	my ($self, $map_str) = @_;
	my $per_tile = $self->legend->characters_per_tile;

	my @map_lines =
		reverse
		grep { length }
		map { s/\s//g; $_ }

lib/Game/TileMap.pm  view on Meta::CPAN

	my @map;
	foreach my $line (@map_lines) {
		my @objects;
		while (length $line) {
			my $marker = substr $line, 0, $per_tile, '';
			push @objects, ($self->legend->objects->{$marker} // croak "Invalid map marker '$marker'");
		}

		push @map, \@objects;
	}

lib/Game/TileMap.pm  view on Meta::CPAN

			if @{$map[$line]} != $map_size[0];

		for my $col (0 .. $#{$map[$line]}) {
			my $prev_obj = $map[$line][$col];
			my $obj = Game::TileMap::Tile->new(
				legend => $self->legend,
				contents => $prev_obj,
				x => $col,
				y => $line,
			);

			$new_map[$col][$line] = $obj;
			push @{$guide{$self->legend->get_class_of_object($prev_obj)}}, $obj;
		}
	}

	$self->_set_coordinates(\@new_map);
	$self->_set_size_x($map_size[0]);

lib/Game/TileMap.pm  view on Meta::CPAN

}

sub to_string_and_mark
{
	my ($self, $mark_positions, $with) = @_;
	$with //= '!' x $self->legend->characters_per_tile;

	my @lines;
	my %markers_rev = map {
		$self->legend->objects->{$_} => $_
	} keys %{$self->legend->objects};

	my $mark = \undef;
	my $coordinates = $self->coordinates;
	if ($mark_positions) {
		$coordinates = dclone $coordinates;

lib/Game/TileMap.pm  view on Meta::CPAN


=head1 SYNOPSIS

	use Game::TileMap;

	# first, create a map legend

	my $legend = Game::TileMap->new_legend;

	$legend
		->add_wall('#')
		->add_void('.')
		->add_terrain('_' => 'pavement')
		->add_object('monster_spawns', 'a' => 'spawn_a')
		->add_object('monster_spawns', 'b' => 'spawn_b')

lib/Game/TileMap.pm  view on Meta::CPAN

	.__.......

	MAP

	my $map = Game::TileMap->new(
		legend => $legend,
		map => $map_str
	);

	# map can be queried to get some info about its contents
	my @monsters = $map->get_all_of_class('monster_spawns');

lib/Game/TileMap.pm  view on Meta::CPAN

Maps can be created out of strings or arrays of arrays and are stored as an
array of array of L<Game::TileMap::Tile>. Some helpful features are in place:

=over

=item * map markers (usually just single characters) are translated into objects specified in the legend

Map characters can't be whitespace (whitespace is removed before processing -
can be used for improved visibility).

Legend objects can't be falsy, but other than that they can be anything
(string, object, reference).

=item * each legend object is assigned to a class, which you can query for later

If you add a class C<surroundings>:

	$legend->add_object('surroundings', '@' => 'trash bin')
	       ->add_object('surroundings', '=' => 'desk')
	       ->add_object('surroundings', 'H' => 'locker')
	       ->add_object('surroundings', 'L' => 'chair');

Then you can easily get information about locations of those tiles on a map:

lib/Game/TileMap.pm  view on Meta::CPAN


	$map->coordinates->[3][5]; # actual point at [3;5]

=item * supports multi-character maps

	my $legend = Game::TileMap->new_legend(characters_per_tile => 2);

	$legend
		->add_wall('##')
		->add_void('..')
		->add_terrain('__' => 'pavement')
		->add_terrain('_~' => 'mud')
		->add_terrain('_,' => 'grass')

lib/Game/TileMap.pm  view on Meta::CPAN


=back

=head2 Attributes

=head3 legend

A reference to map legend. Required in constructor.

=head3 coordinates

The constructed map: array of array of L<Game::TileMap::Tile>.

lib/Game/TileMap.pm  view on Meta::CPAN


Vertical size of the map.

=head2 Methods

=head3 new_legend

Static method which returns a new instance of L<Game::TileMap::Legend>. Note
that legends are reusable.

=head3 new

Moose-flavored constructor. Possible arguments are:

lib/Game/TileMap.pm  view on Meta::CPAN


Optional.

Map input that will be passed to L<from_string> or L<from_array>.

=item * C<< legend => InstanceOf ['Game::TileMap::Legend'] >>

Required.

Legend of the map, which describes its contents.

=back

=head3 from_string

	my $map = Game::TileMap->new(legend => $legend);
	$map->from_string($map_str);

Creates a map from a string.

=head3 from_array

	my $map = Game::TileMap->new(legend => $legend);
	$map->from_array($map_aref);

Creates a map from an array.

=head3 to_string

 view all matches for this distribution


Game-WordBrain

 view release on metacpan or  search on metacpan

lib/Game/WordBrain/WordList.pm  view on Meta::CPAN

legatos
legature
legatus
legbar
lege
legend
legend's
legenda
legendarian
legendaries
legendarily
legendary
legendic
legendist
legendize
legendized
legendizing
legendless
legendries
legendry
legends
leger
legerdemain
legerdemainist
legerete
legerities

lib/Game/WordBrain/WordList.pm  view on Meta::CPAN

outlearned
outlearning
outlearns
outlearnt
outled
outlegend
outlength
outlengthen
outler
outlet
outlet's

lib/Game/WordBrain/WordList.pm  view on Meta::CPAN

prelecturing
prelegacy
prelegal
prelegate
prelegatee
prelegend
prelegendary
prelegislative
prelexical
preliability
preliable
prelibation

lib/Game/WordBrain/WordList.pm  view on Meta::CPAN

pseudolaminated
pseudolateral
pseudolatry
pseudolegal
pseudolegality
pseudolegendary
pseudolegislative
pseudoleucite
pseudoleucocyte
pseudoleukemia
pseudoleukemic

lib/Game/WordBrain/WordList.pm  view on Meta::CPAN

semilate
semilatent
semilatus
semileafless
semilegal
semilegendary
semilegislative
semilegislatively
semilens
semilenticular
semilethal

 view all matches for this distribution


Games-Axmud

 view release on metacpan or  search on metacpan

lib/Games/Axmud/Client.pm  view on Meta::CPAN

                'iberia'            => '1.0.0',   # Iberia MUD / iberiamud.com 5900
                'icesus'            => '1.1.0',   # Icesus / naga.icesus.org 4000
                'ifmud'             => '1.0.275', # ifMUD / ifmud.port4000.com 4000
                'imperian'          => '1.0.376', # Imperian: Sundered Heavens / imperian.com 23
                'islands'           => '1.1.0',   # Islands / play.islands-game.live 3000
                'kallisti'          => '1.1.0',   # Legends of Kallisti / legendsofkallisti.com 4000
                'lambda'            => '1.1.0',   # LambdaMOO / lambda.moo.mud.org 8888
                'legendmud'         => '1.0.275', # LegendMUD / mud.legendmud.org 9999
                'lostsouls'         => '1.1.0',   # Lost Souls / lostsouls.org 23
                'lowlands'          => '1.3.0',   # Lowlands / lolamud.net 6969
                'luminari'          => '1.1.0',   # Luminari MUD / luminarimud.com 4100
                'lusternia'         => '1.0.0',   # Lusternia / lusternia.com 23
                'magica'            => '1.0.140', # Materia Magica / materiamagica.com 4000

lib/Games/Axmud/Client.pm  view on Meta::CPAN

                'merentha'          => '1.0.050', # Merentha / mud.merentha.com 10000
                'midnightsun'       => '1.1.270', # Midnight Sun / midnightsun2.org 3000
                'miriani'           => '1.1.050', # Miriani / toastsoft.net 1234
                'morgengrauen'      => '1.1.0',   # MorgenGrauen / mg.mud.de 23
                'mud1'              => '1.1.0',   # MUD1 (British Legends)
                                                  #     / british-legends.com 27750
                'mud2'              => '1.1.0',   # MUD2 (Canadian server) / mud2.com 23
                'mudii'             => '1.1.0',   # MUD2 (UK server) / mud2.com 23
                'mume'              => '1.1.050', # MUME / mume.org 23
                'nannymud'          => '1.1.270', # NannyMUD / mud.lysator.liu.se 2000
                'nanvaent'          => '1.0.0',   # Nanvaent / nanvaent.org 23

 view all matches for this distribution


( run in 2.200 seconds using v1.01-cache-2.11-cpan-49f99fa48dc )