view release on metacpan or search on metacpan
clib/src/panda/net/pton.impl view on Meta::CPAN
/*
* Note that int32_t and int16_t need only be "at least" large enough
* to contain a value of the specified size. On some systems, like
* Crays, there is no such thing as an integer variable with 16 bits.
* Keep this in mind if you think this function should have been coded
* to use pointer overlays. All the world's not a VAX.
*/
char tmp[UV__INET6_ADDRSTRLEN], *tp;
struct { int base, len; } best, cur;
unsigned int words[sizeof(struct in6_addr) / sizeof(uint16_t)];
int i;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Net/VNC.pm view on Meta::CPAN
&& defined $cursor->{x} )
{
#$cursor->{image}->save('cursor.png'); # temporary -- debugging
$image
= $image->clone(); # make a duplicate so we can overlay the cursor
$image->blend(
$cursor->{image},
1, # don't modify destination alpha
0, 0, $cursor->{width}, $cursor->{height}, # source dimensions
$cursor->{x}, $cursor->{y}, $cursor->{width},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Net/Z3950/FOLIO/Config.pm view on Meta::CPAN
my $cfg = _compileConfigFile($cfgbase, undef, MISSING_ERROR);
my $isFirst = 1;
while (@extras) {
my $extra = shift @extras;
my $overlay = _compileConfigFile($cfgbase, $extra, $isFirst ? MISSING_TENANT : MISSING_FILTER);
$isFirst = 0;
_mergeConfig($cfg, $overlay);
}
my $path = $cfgbase;
if ($path =~ /\//) {
$path =~ s/(.*)?\/.*/$1/;
lib/Net/Z3950/FOLIO/Config.pm view on Meta::CPAN
return $val;
}
sub _mergeConfig {
my($base, $overlay) = @_;
my %complex_keys = (
okapi => 1,
login => 1,
indexMap => 1,
lib/Net/Z3950/FOLIO/Config.pm view on Meta::CPAN
circulation => 1,
},
);
foreach my $key (keys (%complex_keys)) {
if (defined $overlay->{$key}) {
if (ref $base->{$key} eq 'HASH') {
_mergeHash($base->{$key}, $overlay->{$key}, $complex_keys{$key});
} else {
$base->{$key} = $overlay->{$key};
}
}
}
foreach my $key (sort keys %$overlay) {
if (!$complex_keys{$key}) {
$base->{$key} = $overlay->{$key};
}
}
}
sub _mergeHash {
my($base, $overlay, $keysOfsubStructures) = @_;
foreach my $key (sort keys %$overlay) {
if (ref $keysOfsubStructures eq 'HASH' && $keysOfsubStructures->{$key}) {
_mergeHash($base->{$key}, $overlay->{$key}, $keysOfsubStructures->{$key});
} else {
$base->{$key} = $overlay->{$key};
}
}
}
=encoding utf-8
view all matches for this distribution
view release on metacpan or search on metacpan
=item initialise()
Called by B<new()> to initialise the new object. Initialisation keys
may be specified as a hash, supplied as a parameter to the new
object, or as a filename or file handle containing a frozen
B<NetServer::SMTP> object which is users to overlay the object.
Recognized keys are:
=over 4
$file->close();
($self, @junk) = thaw($frozen);
$self->{spooledfile} = $fn;
return $self;
} elsif (scalar(@_) % 2 == 0) {
# it's an initialisation hash -- overlay it on $self
%$self = (@_);
return $self;
} else {
croak "Don't know how to initialise from [", join("][", @_), "]\n";
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Number/Phone.pm view on Meta::CPAN
=item country
The two letter ISO country code for the country in which the call will
terminate. This is implemented in the superclass and you will only have
to implement your own version for countries where part of the number
range is overlayed with another country.
Exception: for the UK, return 'uk', not 'gb'.
Specifically, the superclass implementation looks at the class name and
returns the last two-letter code it finds. eg ...
view all matches for this distribution
view release on metacpan or search on metacpan
t/fam/sprites/note_add.png
t/fam/sprites/note_delete.png
t/fam/sprites/note_edit.png
t/fam/sprites/note_error.png
t/fam/sprites/note_go.png
t/fam/sprites/overlays.png
t/fam/sprites/package.png
t/fam/sprites/package_add.png
t/fam/sprites/package_delete.png
t/fam/sprites/package_go.png
t/fam/sprites/package_green.png
view all matches for this distribution
view release on metacpan or search on metacpan
lib/OCR/OcrSpace.pm view on Meta::CPAN
{"ParsedResults":[{"TextOverlay":{"Lines":[{"LineText":"Current","Words":[{"WordText":"Current","Left":11.666666030883789,"Top":59.166664123535156,"Height":14.999999046325684,"Width":54.999996185302734}],"MaxHeight":14.999999046325684,"MinTop":59...
=head2 Sample Ouput error
{"OCRExitCode":99,"IsErroredOnProcessing":true,"ErrorMessage":["Parameter name 'attributes' is invalid. Valid parameters: apikey,url,language,isoverlayrequired,base64image,iscreatesearchablepdf,issearchablepdfhidetextlayer,filetype,addressparsing...
=cut
####################
# internal function
view all matches for this distribution
view release on metacpan or search on metacpan
implemented.
The above illustrates how to define the various restrictions to a particular
property. Keep in mind that this is only the prototype so it does not directly
deal with data passed into a constructor. One way of seeing it is as a template
that is overlayed with the actual data from the constructor.
Providing a definition of a property is always optional. If none is provided then
various logical defaults apply. If one does not provide definitions then it will
be considered that the elements (or properties) in the prototype are not exclusive
but they are required. In other words one could add properties dynamically but the
view all matches for this distribution
view release on metacpan or search on metacpan
lib/OOPS/TxHash.pm view on Meta::CPAN
use strict;
sub commit
{
my $self = shift;
my ($under, $overlay, $whiteout) = @$self;
for my $key (keys %$whiteout) {
delete $under->{$key};
}
@$under{keys %$overlay} = values %$overlay;
%$overlay = ();
%$whiteout = ();
}
sub abort
{
my $self = shift;
my ($under, $overlay, $whiteout, $count) = @$self;
%$overlay = ();
%$whiteout = ();
$$count = keys %$under;
}
sub TIEHASH
lib/OOPS/TxHash.pm view on Meta::CPAN
}
sub FETCH
{
my $self = shift;
my ($under, $overlay, $whiteout) = @$self;
my $key = shift;
return undef if exists $whiteout->{$key};
return $overlay->{$key} if exists $overlay->{$key};
return $under->{$key};
}
sub STORE
{
my $self = shift;
my ($under, $overlay, $whiteout, $count) = @$self;
my ($key, $value) = @_;
$$count++ if exists $whiteout->{$key}
or ! (exists $under->{$key} or exists $overlay->{$key});
$overlay->{$key} = $value;
delete $whiteout->{$key};
return $value;
}
sub DELETE
{
my $self = shift;
my ($under, $overlay, $whiteout, $count) = @$self;
my $key = shift;
my $old = $self->FETCH($key);
return $old if exists $whiteout->{$key};
$$count-- if exists $under->{$key} or exists $overlay->{$key};
$whiteout->{$key} = 1;
delete $overlay->{$key};
return $old;
}
sub CLEAR
{
my $self = shift;
my ($under, $overlay, $whiteout, $count) = @$self;
for my $key (keys %$overlay) {
$$count-- unless $whiteout->{$key};
}
%$overlay = ();
for my $key (keys %$under) {
$$count-- unless $whiteout->{$key};
}
@$whiteout{keys %$under} = (1) x scalar(keys %$under);
}
sub EXISTS
{
my $self = shift;
my ($under, $overlay, $whiteout) = @$self;
my $key = shift;
return 0 if exists $whiteout->{$key};
return 1 if exists $overlay->{$key};
return 1 if exists $under->{$key};
return 0;
}
sub FIRSTKEY
{
my $self = shift;
my ($under, $overlay, $whiteout, $count, $doneunder) = @$self;
keys %$under;
keys %$overlay;
$$doneunder = 0;
return $self->NEXTKEY;
}
sub NEXTKEY
{
my $self = shift;
my ($under, $overlay, $whiteout, $count, $doneunder) = @$self;
my ($key, $value);
unless ($$doneunder) {
while (($key, $value) = each(%$under)) {
next if $whiteout->{$key};
return $key;
}
$$doneunder = 1;
}
while (($key, $value) = each(%$overlay)) {
next if $whiteout->{$key};
return $key;
}
return ();
}
sub SCALAR
{
my $self = shift;
my ($under, $overlay, $whiteout, $count) = @$self;
return $$count;
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ORLite.pm view on Meta::CPAN
Secondly, it will create one sub-package underneath the namespace of the root
module for each table or view it finds in the database.
Once the basic table support has been generated, it will also try to load an
"overlay" module of the same name. Thus, by created a Foo::TableName module on
disk containing "extra" code, you can extend the original and add additional
functionality to it.
=head1 OPTIONS
view all matches for this distribution
view release on metacpan or search on metacpan
lib/OSS/LDAPops.pm view on Meta::CPAN
notifypasswordexpiry.pl - a script to send an email to users when their password expires.
=item *
ppolicy.ldif - an example password policy to use with the ppolicy overlay.
=item *
Several other example files, to asisst in setting up *NIX servers to use the directory are also included.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Object/Configure.pm view on Meta::CPAN
[My__Module]
logger.file = /var/log/mymodule.log
The C<configure()> function will read this file,
overlay it onto your default parameters,
and initialize the logger accordingly.
If the file is not readable and no config_dirs are provided,
the module will throw an error.
To be clear, in this case, inheritance is not followed.
lib/Object/Configure.pm view on Meta::CPAN
}
# Deep merge two hash references
# Second hash takes precedence over first
sub _deep_merge {
my ($base, $overlay) = @_;
return $overlay unless ref($base) eq 'HASH';
return $base unless ref($overlay) eq 'HASH';
my $result = { %$base };
foreach my $key (keys %$overlay) {
if (ref($overlay->{$key}) eq 'HASH' && ref($result->{$key}) eq 'HASH') {
$result->{$key} = _deep_merge($result->{$key}, $overlay->{$key});
} else {
$result->{$key} = $overlay->{$key};
}
}
return $result;
}
view all matches for this distribution
view release on metacpan or search on metacpan
examples/basic.pl view on Meta::CPAN
$light->setType(LT_DIRECTIONAL);
$light->setDirection(-1,-1,-1);
# Perl note: see Ogre::BetaGUI::GUI createOverlay for a similar example
# (note also createOverlayContainer is specific to Perl Ogre)
my $overlayMgr = Ogre::OverlayManager->getSingletonPtr;
my $panel = $overlayMgr->createOverlayContainer("Panel", "PanelName");
$panel->setMetricsMode(GMM_PIXELS);
$panel->setPosition(10, 10);
$panel->setDimensions(100, 100);
my $textArea = $overlayMgr->createTextAreaOverlayElement("TextArea", "TextAreaName");
$textArea->setMetricsMode(GMM_PIXELS);
$textArea->setPosition(0, 0);
$textArea->setDimensions(100, 100);
$textArea->setCharHeight(16);
$textArea->setFontName("Arial");
$textArea->setCaption("Hello, World!");
my $overlay = $overlayMgr->create("AverageFps");
$overlay->add2D($panel);
$panel->addChild($textArea);
$overlay->show();
}
sub setupResources {
my ($self) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
examples/resources.cfg view on Meta::CPAN
FileSystem=Samples/Media/fonts
FileSystem=Samples/Media/materials/programs
FileSystem=Samples/Media/materials/scripts
FileSystem=Samples/Media/materials/textures
FileSystem=Samples/Media/models
FileSystem=Samples/Media/overlays
FileSystem=Samples/Media/particle
FileSystem=Samples/Media/gui
FileSystem=Samples/Media/DeferredShadingMedia
FileSystem=Samples/Media/PCZAppMedia
Zip=Samples/Media/packs/cubemap.zip
view all matches for this distribution
view release on metacpan or search on metacpan
Ogre/ExampleFrameListener.pm view on Meta::CPAN
sub updateStats {
my ($self) = @_;
# there's a `try' block around this in C++,
# not sure why - maybe for when these overlay elements
# don't exist?
my $om = Ogre::OverlayManager->getSingletonPtr();
my $guiAvg = $om->getOverlayElement("Core/AverageFps");
my $guiCurr = $om->getOverlayElement("Core/CurrFps");
view all matches for this distribution
view release on metacpan or search on metacpan
include/GL/freeglut_std.h view on Meta::CPAN
*/
FGAPI void FGAPIENTRY glutWarpPointer( int x, int y );
FGAPI void FGAPIENTRY glutSetCursor( int cursor );
/*
* Overlay stuff, see freeglut_overlay.c
*/
FGAPI void FGAPIENTRY glutEstablishOverlay( void );
FGAPI void FGAPIENTRY glutRemoveOverlay( void );
FGAPI void FGAPIENTRY glutUseLayer( GLenum layer );
FGAPI void FGAPIENTRY glutPostOverlayRedisplay( void );
view all matches for this distribution
view release on metacpan or search on metacpan
include/GL/glxew.h view on Meta::CPAN
#define GLXEW_OML_sync_control GLXEW_GET_VAR(__GLXEW_OML_sync_control)
#endif /* GLX_OML_sync_control */
/* ------------------------ GLX_SGIS_blended_overlay ----------------------- */
#ifndef GLX_SGIS_blended_overlay
#define GLX_SGIS_blended_overlay 1
#define GLX_BLENDED_RGBA_SGIS 0x8025
#define GLXEW_SGIS_blended_overlay GLXEW_GET_VAR(__GLXEW_SGIS_blended_overlay)
#endif /* GLX_SGIS_blended_overlay */
/* -------------------------- GLX_SGIS_color_range ------------------------- */
#ifndef GLX_SGIS_color_range
#define GLX_SGIS_color_range 1
include/GL/glxew.h view on Meta::CPAN
/* --------------------- GLX_SUN_get_transparent_index --------------------- */
#ifndef GLX_SUN_get_transparent_index
#define GLX_SUN_get_transparent_index 1
typedef Status ( * PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display* dpy, Window overlay, Window underlay, unsigned long* pTransparentIndex);
#define glXGetTransparentIndexSUN GLXEW_GET_FUN(__glewXGetTransparentIndexSUN)
#define GLXEW_SUN_get_transparent_index GLXEW_GET_VAR(__GLXEW_SUN_get_transparent_index)
include/GL/glxew.h view on Meta::CPAN
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_vertex_array_range;
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_capture;
GLXEW_VAR_EXPORT GLboolean __GLXEW_NV_video_out;
GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_swap_method;
GLXEW_VAR_EXPORT GLboolean __GLXEW_OML_sync_control;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_blended_overlay;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_color_range;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_multisample;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIS_shared_multisample;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_fbconfig;
GLXEW_VAR_EXPORT GLboolean __GLXEW_SGIX_hyperpipe;
view all matches for this distribution
view release on metacpan or search on metacpan
include/GL/freeglut_std.h view on Meta::CPAN
*/
FGAPI void FGAPIENTRY glutWarpPointer( int x, int y );
FGAPI void FGAPIENTRY glutSetCursor( int cursor );
/*
* Overlay stuff, see freeglut_overlay.c
*/
FGAPI void FGAPIENTRY glutEstablishOverlay( void );
FGAPI void FGAPIENTRY glutRemoveOverlay( void );
FGAPI void FGAPIENTRY glutUseLayer( GLenum layer );
FGAPI void FGAPIENTRY glutPostOverlayRedisplay( void );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/auto/OpusVL/AppKit/root/static/css/vader/jquery-ui-1.9.0.custom.css view on Meta::CPAN
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.ui-resizable { position: relative;}
.ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; }
.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
lib/auto/OpusVL/AppKit/root/static/css/vader/jquery-ui-1.9.0.custom.css view on Meta::CPAN
.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; -khtml-border-top-right-radius: 5px; border-top-right-radius: 5px; }
.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; -khtml-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; }
.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; -khtml-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; }
/* Overlays */
.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .3;filter:Alpha(Opacity=30); }
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .3;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius:...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Otogiri/Plugin/TableInfo/PgKeywords.pm view on Meta::CPAN
'nchar',
'none',
'nullif',
'numeric',
'out',
'overlay',
'position',
'precision',
'real',
'row',
'setof',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/PAGI/Server.pm view on Meta::CPAN
=item * Network filesystems (NFS, SMB, cloud storage)
=item * High-latency storage (spinning disks under load)
=item * Docker volumes with overlay filesystem
=back
The default (64KB) is optimized for local SSDs where small synchronous reads
are faster than the overhead of async I/O.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/PDF/API2/Tweaks.pm view on Meta::CPAN
=head1 SYNOPSIS
PDF::API2::Tweaks provides a number of extensions to PDF::API2.
Most of the extensions deal with producing PDF overlays, to fill in
forms. For example,
# Open an existing PDF file
my $pdf = PDF::API2->open($form);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/PDF/API2/Resource/Glyphs.pm view on Meta::CPAN
'815' => 'breveinvertedbelowcmb',
'816' => 'tildebelowcmb',
'817' => 'macronbelowcmb',
'818' => 'lowlinecmb',
'819' => 'dbllowlinecmb',
'820' => 'tildeoverlaycmb',
'821' => 'strokeshortoverlaycmb',
'822' => 'strokelongoverlaycmb',
'823' => 'solidusshortoverlaycmb',
'824' => 'soliduslongoverlaycmb',
'825' => 'ringhalfrightbelowcmb',
'826' => 'bridgeinvertedbelowcmb',
'827' => 'squarebelowcmb',
'828' => 'seagullbelowcmb',
'829' => 'xabovecmb',
lib/PDF/API2/Resource/Glyphs.pm view on Meta::CPAN
'softsigncyrillic' => '1100',
'sohiragana' => '12381',
'sokatakana' => '12477',
'sokatakanahalfwidth' => '65407',
'sol' => '47',
'soliduslongoverlaycmb' => '824',
'solidusshortoverlaycmb' => '823',
'sorusithai' => '3625',
'sosalathai' => '3624',
'sosothai' => '3595',
'sosuathai' => '3626',
'space' => '32',
lib/PDF/API2/Resource/Glyphs.pm view on Meta::CPAN
'starf' => '9733',
'starofdavid' => '61529',
'starshadow' => '61622',
'sterling' => '163',
'sterlingmonospace' => '65505',
'strokelongoverlaycmb' => '822',
'strokeshortoverlaycmb' => '821',
'sub' => '8834',
'sube' => '8838',
'subnE' => '8842',
'subset' => '8834',
'subsetnotequal' => '8842',
lib/PDF/API2/Resource/Glyphs.pm view on Meta::CPAN
'tildebelowcmb' => '816',
'tildecmb' => '771',
'tildecomb' => '771',
'tildedoublecmb' => '864',
'tildeoperator' => '8764',
'tildeoverlaycmb' => '820',
'tildeverticalcmb' => '830',
'times' => '215',
'timesb' => '8864',
'timescircle' => '8855',
'tipehahebrew' => '1430',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/PDF/API3/Compat/API2/Resource/uniglyph.txt view on Meta::CPAN
0x032F ; breveinvertedbelowcmb ; 0 # Adobe Glyph List (Sept/02) # COMBINING INVERTED BREVE BELOW
0x0330 ; tildebelowcmb ; 0 # Adobe Glyph List (Sept/02) # COMBINING TILDE BELOW
0x0331 ; macronbelowcmb ; 0 # Adobe Glyph List (Sept/02) # COMBINING MACRON BELOW
0x0332 ; lowlinecmb ; 0 # Adobe Glyph List (Sept/02) # COMBINING LOW LINE
0x0333 ; dbllowlinecmb ; 0 # Adobe Glyph List (Sept/02) # COMBINING DOUBLE LOW LINE
0x0334 ; tildeoverlaycmb ; 0 # Adobe Glyph List (Sept/02) # COMBINING TILDE OVERLAY
0x0335 ; strokeshortoverlaycmb ; 0 # Adobe Glyph List (Sept/02) # COMBINING SHORT STROKE OVERLAY
0x0336 ; strokelongoverlaycmb ; 0 # Adobe Glyph List (Sept/02) # COMBINING LONG STROKE OVERLAY
0x0337 ; solidusshortoverlaycmb ; 0 # Adobe Glyph List (Sept/02) # COMBINING SHORT SOLIDUS OVERLAY
0x0338 ; soliduslongoverlaycmb ; 0 # Adobe Glyph List (Sept/02) # COMBINING LONG SOLIDUS OVERLAY
0x0339 ; ringhalfrightbelowcmb ; 0 # Adobe Glyph List (Sept/02) # COMBINING RIGHT HALF RING BELOW
0x033A ; bridgeinvertedbelowcmb ; 0 # Adobe Glyph List (Sept/02) # COMBINING INVERTED BRIDGE BELOW
0x033B ; squarebelowcmb ; 0 # Adobe Glyph List (Sept/02) # COMBINING SQUARE BELOW
0x033C ; seagullbelowcmb ; 0 # Adobe Glyph List (Sept/02) # COMBINING SEAGULL BELOW
0x033D ; xabovecmb ; 0 # Adobe Glyph List (Sept/02) # COMBINING X ABOVE
view all matches for this distribution
view release on metacpan or search on metacpan
examples/BarCode.pl view on Meta::CPAN
# CODE B: ASCII sp..DEL (x20..x7F) with | (x7C) replaced by a hook symbol
# CODE C: numeric decimal 00..99
# all alphabets have additional EAN-128-specific controls in alphabet
# superset of CODE 128, with FNC1 required after START CODE x
# length: there appears to be a lengh limit of around 8 digits per (group), and
# codes will overlay each other if too long. if groups short enough,
# length is unlimited
@cellLoc = makeCellLoc(0);
@cellSize = (170, 131);
$grfx->save();
view all matches for this distribution
view release on metacpan or search on metacpan
OverlayChart.pm view on Meta::CPAN
'1 0.8 0.9', '0 1 1', '0.9 0 0.55', '0.2 0.2 0.2','0.55 0.9 0.9'];
}
return $self;
}
sub overlay
{ my $self = shift;
my %param = @_;
for (keys %param)
{ my $key = lc($_);
if ($possible{$key})
OverlayChart.pm view on Meta::CPAN
}
}
$self->{xdensity} = 1 if (! exists $self->{xdensity});
$self->{ydensity} = 1 if (! exists $self->{ydensity});
$self->{level} = 'overlay';
return $self;
}
sub add
{ my $self = shift;
OverlayChart.pm view on Meta::CPAN
{ for (@{$param{'merge'}})
{ if ($_->{type} ne 'percentbars')
{ push @array, $_;
}
}
for my $overlay (@array)
{ my ($tmax, $tmin, $tmaxSum, $tminSum, $tnum) = $overlay->analysera();
if (($overlay->{type} eq 'totalbars') || ($overlay->{type} eq 'area'))
{ $tmaxSum = sprintf ("%.0f", ($tmaxSum / $overlay->{ydensity}));
$tminSum = sprintf ("%.0f", ($tminSum / $overlay->{ydensity}));
$chartMax = $tmaxSum if ($tmaxSum > $chartMax);
$chartMin = $tminSum if ($tminSum < $chartMin);
}
else
{ $tmax = sprintf ("%.0f", ($tmax / $overlay->{ydensity}));
$tmin = sprintf ("%.0f", ($tmin / $overlay->{ydensity}));
$chartMax = $tmax if ($tmax > $chartMax);
$chartMin = $tmin if ($tmin < $chartMin);
}
$tnum = sprintf ("%.0f", ($tnum / $overlay->{xdensity}));
$num = $tnum if ($tnum > $num);
$tnum = sprintf ("%.0f", ($self->{num} / $overlay->{xdensity}));
$num = $tnum if ($tnum > $num);
if ((defined $overlay->{rightscale})
&& (! defined $rightScale))
{ $rightScale = $overlay;
}
if ((defined $overlay->{topscale})
&& (! defined $topScale))
{ $topScale = $overlay;
}
$overlay->{x} = $self->{x};
$overlay->{xsize} = $self->{xsize};
$overlay->{size} = $self->{size};
$overlay->{y} = $self->{y};
$overlay->{ysize} = $self->{ysize};
}
}
my $xSteps = $#{$self->{col}} + 1;
$xSteps = $num if ($num > $xSteps);
my $groups = $#{$self->{sequence}} + 1;
OverlayChart.pm view on Meta::CPAN
my $tStart = $xStart + 20;
unshift @array, $self;
for my $overlay (@array)
{ if (defined $overlay->{groupstitle})
{ my $yTemp = $yStart;
if ($yTemp < ($y0 + 20))
{ $yTemp = $y0 - 20;
$yStart = $yTemp - 20;
}
$str .= "0 0 0 rg\n";
$str .= "BT\n";
$str .= "/$font 12 Tf\n";
$str .= "$xStart $yTemp Td\n";
$str .= '(' . $overlay->{groupstitle} . ') Tj' . "\n";
$str .= "ET\n";
$yStart -= $iStep;
}
if (defined $overlay->{groupstext})
{ my $yTemp = $yStart;
if ($yTemp < ($y0 + 20))
{ $yTemp = $y0 - 20;
$yStart = $yTemp - 20;
}
$str .= "0 0 0 rg\n";
$str .= "BT\n";
$str .= "/$font 12 Tf\n";
$str .= "$xStart $yTemp Td\n";
$str .= '(' . $overlay->{groupstext} . ') Tj' . "\n";
$str .= "ET\n";
$yStart -= $iStep;
}
my @color = (defined $overlay->{color}) ? @{$overlay->{color}} : ();
my $groups = $#{$overlay->{sequence}} + 1;
for (my $i = 0; $i < $groups; $i++)
{ if (! defined $color[$i])
{ $col1 = $col3;
my $alt1 = sprintf("%.2f", (rand(1)));
my $alt2 = sprintf("%.2f", (rand(1)));
$col2 = abs($col2 - $col3) > abs(1 - $col3) ? $col3 : (1 - $col3);
$col3 = abs($col3 - $alt1) > abs($col3 - $alt2) ? $alt1 : $alt2;
$color[$i] = "$col1 $col2 $col3";
}
if ((defined $overlay->{nogroups}) && ($overlay->{nogroups}))
{ next;
}
my $name = $overlay->{sequence}->[$i];
$str .= "$color[$i] rg\n";
if (($yStart < ($y0 + 13)) && ($yStart > ($y0 - 18)))
{ $yStart = $y0 - 20;
}
$str .= "$xStart $yStart 10 7 re\n";
OverlayChart.pm view on Meta::CPAN
{ $str .= '(' . $i . ') Tj' . "\n";
}
$str .= "ET\n";
if ((defined $self->{iparam})
&& (defined $overlay->{boxAction}->{$name}))
{ $overlay->insert($xStart,
$yStart,
10,
7,
$self->{iparam},
$overlay->{boxAction}->{$name},
$overlay->{boxToolTip}->{$name});
}
$yStart -= $iStep;
}
@{$overlay->{color}} = @color;
}
for my $overlay ( reverse @array)
{ $str .= "0 0 0 RG\n0 j\n0 J\n";
if ($overlay->{type} eq 'bars')
{ $str .= $overlay->draw_bars($xSteps, $xCor, $y0, $labelStep, $prop);
}
elsif ($overlay->{type} eq 'totalbars')
{ $str .= $overlay->draw_totalbars($xSteps, $xCor, $y0, $labelStep, $prop);
}
elsif ($overlay->{type} eq 'lines')
{ $str .= $overlay->draw_lines($xSteps, $xCor, $yCor, $labelStep, $prop, $min);
}
elsif ($overlay->{type} eq 'percentbars')
{ $str .= $overlay->draw_percentbars($xSteps, $xCor, $y0, $labelStep, $prop);
}
elsif ($overlay->{type} eq 'area')
{ $str .= $overlay->draw_area($xSteps, $xCor, $y0, $labelStep, $prop);
}
}
$str .= "Q\n";
PDF::Reuse::prAdd($str);
OverlayChart.pm view on Meta::CPAN
To force the program start with a specific min (negative) value for the scale along the y-axis.
=item merge
To merge different graph-objects into one chart. The graph-objects should be put
in an anonymous array. Each graph-object should use the "overlay" method.
Ex :
$val->draw(x => 20,
y => 460,
width => 400,
OverlayChart.pm view on Meta::CPAN
type => 'lines',
noMarker => 1,
groupstitle => 'Left Scale',
title => 'Amazon',
yUnit => 'USD',
merge => [ $sek->overlay ( type => 'lines',
yDensity => $sekDensity,
noMarker => 1),
$spIndex->overlay( type => 'lines',
yDensity => $spDensity,
noMarker => 1),
$vol->overlay ( type => 'area',
rightScale => 1,
yDensity => $volumeDensity,
groupstitle => 'Right Scale'),] );
In the example above 4 objects are combined into 1 chart. Each object can have its'
own density (but it is not necessary) and some other characteristics described under
"overlay". The objects are painted in reversed order: $vol, $spIndex, $sek and at
last $val, which automatically gets the left scale and also the normative density
of the chart. (Interactive functions for each object are also imported.)
The merge parameter is ignored, if the type of the main object is percentbars
OverlayChart.pm view on Meta::CPAN
$s-color('dark');
If the module needs more colors than what has been given in the script,
it creates more, just from random numbers.
=head2 overlay
Defines how an imported graph-object should be painted. See the parameter merge
under draw for an example.
Parameters:
OverlayChart.pm view on Meta::CPAN
data, an area graph for volumes, and lines for the other values. (You need to have the
environment variable TZ defined somewhere, see Date::Manip, which is a module needed by
Finance::QuoteHist. TZ, time zone, could e.g. be CET or GMT in Western Europe.)
=for overlay.pl begin
use PDF::Reuse::OverlayChart;
use Finance::QuoteHist;
use PDF::Reuse;
use strict;
OverlayChart.pm view on Meta::CPAN
height => 300,
type => 'lines',
noMarker => 1,
groupstitle => 'Left Scale',
title => 'Amazon',
merge => [ $spIndex->overlay( type => 'lines',
yDensity => $spDensity,
noMarker => 1),
$vol->overlay ( type => 'area',
rightScale => 1,
yDensity => $volumeDensity,
groupstitle => 'Right Scale')] );
prEnd();
view all matches for this distribution
view release on metacpan or search on metacpan
Tutorial.pm view on Meta::CPAN
A common need is to have a nicely designed PDF template with placeholder areas that
get filled in with data from your program. For example, you might have an invoice PDF
with fields for customer name, address, and line items; or a certificate with a name
and date field.
The previous examples showed how to overlay text at specific coordinates using prForm()
and prText(). That works well, but you have to know the exact x,y position for every
piece of text. An alternative approach is to use B<interactive form fields> (AcroForm
fields) as named placeholders. You design your template with named fields, and then use
prField() to fill them in by name.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/PDF/Table.pm view on Meta::CPAN
}
$first_row = 0;
} # End of Row_Loop for this page, and possibly whole table
# draw bottom border on this page. first, is this very last row?
# The line overlays and hides any odd business with vertical rules
# in the last row
if (!scalar(@{$data})) { $next_top_border = 0; }
if ($ink) {
if ($gfx && $h_border_w) {
if ($next_top_border == 0) {
lib/PDF/Table.pm view on Meta::CPAN
}
if ($gfx) {
if ($v_border_w) {
# Draw left and right table borders
# These overlay and hide any odd business with horizontal
# rules at the left or right edge
$gfx->linewidth($v_border_w);
$gfx->move( $xbase, $table_top_y);
$gfx->vline( $cur_y );
$gfx->move( $xbase + $width, $table_top_y);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/PDL/Demos/Gnuplot.pm view on Meta::CPAN
|],
[act => q|
# You can indpendently specify color and position on surface plots,
# and can overlay multiple types of plot -- even in 3D.
#
$rv = rvals(101,101)/5; $im = cos($rv)/($rv+2.5);
$grad = sumover $im->range([[-1,0],[1,0]],[$im->dims],'e') * pdl(-1,1);
$im2 = $im->indexND(ndcoords(26,26)*4); # subsample $im
view all matches for this distribution