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


Gentoo-Overlay-Group-INI

 view release on metacpan or  search on metacpan

lib/Gentoo/Overlay/Group/INI.pm  view on Meta::CPAN

}
{
  $Gentoo::Overlay::Group::INI::VERSION = '0.2.2';
}

# ABSTRACT: Load a list of overlays defined in a configuration file.

use Moose;
use Path::Tiny;
use File::HomeDir;
use Gentoo::Overlay::Exceptions qw( :all );

lib/Gentoo/Overlay/Group/INI.pm  view on Meta::CPAN

sub load {
  my ($self) = @_;

  my $seq = $self->_parse();

  return $seq->section_named('Overlays')->construct->overlay_group;

}


sub load_named {

lib/Gentoo/Overlay/Group/INI.pm  view on Meta::CPAN


=encoding utf-8

=head1 NAME

Gentoo::Overlay::Group::INI - Load a list of overlays defined in a configuration file.

=head1 VERSION

version 0.2.2

lib/Gentoo/Overlay/Group/INI.pm  view on Meta::CPAN


=head2 load_named

Return an inflated arbitrary section:

  # A "self-named" overlay section
  my $section = Gentoo::Overlay::Group::INI->load_named('Overlay');
  # A 'custom named overlay section, ie:
  # [ Overlay / foo ]
  my $section = Gentoo::Overlay::Group::INI->load_named('foo');

=head2 load_all_does

 view all matches for this distribution


Gentoo-Overlay-Group

 view release on metacpan or  search on metacpan

lib/Gentoo/Overlay/Group.pm  view on Meta::CPAN






has '_overlays' => (
  ro, lazy,
  isa => HashRef [Gentoo__Overlay_Overlay],
  default     => sub { return {} },
  handles_via => 'Hash',
  handles     => {
    _has_overlay  => exists   =>,
    overlay_names => keys     =>,
    overlays      => elements =>,
    get_overlay   => get      =>,
    _set_overlay  => set      =>,
  },
);

my $_str = Str();

lib/Gentoo/Overlay/Group.pm  view on Meta::CPAN






sub add_overlay {
  my ( $self, @args ) = @_;
  if ( 1 == @args and blessed $args[0] ) {
    goto $self->can('_add_overlay_object');
  }
  if ( $_str->check( $args[0] ) ) {
    goto $self->can('_add_overlay_string_path');
  }
  return exception(
    ident   => 'bad overlay type',
    message => <<'EOF',
Unrecognised parameter types passed to add_overlay.
  Expected: \n%{signatures}s.
  Got: [%{type}s]}.
EOF
    payload => {
      signatures => ( join q{},  map { qq{    \$group->add_overlay( $_ );\n} } qw( Str Path::Tiny Gentoo::Overlay ) ),
      type       => ( join q{,}, map { _type_print } @args ),
    },
  );
}

lib/Gentoo/Overlay/Group.pm  view on Meta::CPAN

  my ( $self, $what, $callback ) = @_;    ## no critic (Variables::ProhibitUnusedVarsStricter)
  my %method_map = (
    ebuilds    => _iterate_ebuilds    =>,
    categories => _iterate_categories =>,
    packages   => _iterate_packages   =>,
    overlays   => _iterate_overlays   =>,
  );
  if ( exists $method_map{$what} ) {
    goto $self->can( $method_map{$what} );
  }
  return exception(

lib/Gentoo/Overlay/Group.pm  view on Meta::CPAN






# categories = { /overlays/categories

sub _iterate_categories {
  my ( $self, undef, $callback ) = @_;
  my $real_callback = sub {
    my (%overlay_config) = %{ $_[1] };
    my $inner_callback = sub {
      my (%category_config) = %{ $_[1] };
      $self->$callback( { ( %overlay_config, %category_config ) } );
    };
    $overlay_config{overlay}->_iterate_categories( categories => $inner_callback );
  };
  $self->_iterate_overlays( overlays => $real_callback );
  return;
}



lib/Gentoo/Overlay/Group.pm  view on Meta::CPAN






# overlays = { /overlays }
sub _iterate_overlays {
  my ( $self, undef, $callback ) = @_;
  my %overlays     = $self->overlays;
  my $num_overlays = scalar keys %overlays;
  my $last_overlay = $num_overlays - 1;
  my $offset       = 0;
  for my $overlay_name ( sort keys %overlays ) {
    local $_ = $overlays{$overlay_name};
    $self->$callback(
      {
        overlay_name => $overlay_name,
        overlay      => $overlays{$overlay_name},
        num_overlays => $num_overlays,
        last_overlay => $last_overlay,
        overlay_num  => $offset,
      }
    );
    $offset++;
  }
  return;
}

my $_gentoo_overlay = Gentoo__Overlay_Overlay();
my $_path_class_dir = Dir();

# This would be better in M:M:TypeCoercion







sub _add_overlay_object {
  my ( $self, $overlay, @rest ) = @_;

  if ( $_gentoo_overlay->check($overlay) ) {
    goto $self->can('_add_overlay_gentoo_object');
  }
  if ( $_path_class_dir->check($overlay) ) {
    goto $self->can('_add_overlay_path_class');
  }
  return exception(
    ident   => 'bad overlay object type',
    message => <<'EOF',
Unrecognised parameter object types passed to add_overlay.
  Expected: \n%{signatures}s.
  Got: [%{type}s]}.
EOF
    payload => {
      signatures => ( join q{}, map { qq{    \$group->add_overlay( $_ );\n} } qw( Str Path::Tiny Gentoo::Overlay ) ),
      type => ( join q{,}, blessed $overlay, map { _type_print } @rest ),
    },
  );
}







sub _add_overlay_gentoo_object {
  my ( $self, $overlay, ) = @_;
  $_gentoo_overlay->assert_valid($overlay);
  if ( $self->_has_overlay( $overlay->name ) ) {
    return exception(
      ident   => 'overlay exists',
      message => 'The overlay named %{overlay_name}s is already added to this group.',
      payload => { overlay_name => $overlay->name },
    );
  }
  $self->_set_overlay( $overlay->name, $overlay );
  return;
}







sub _add_overlay_path_class {    ## no critic ( RequireArgUnpacking )
  my ( $self, $path, ) = @_;
  $_path_class_dir->assert_valid($path);
  my $go = Gentoo::Overlay->new( path => $path, );
  @_ = ( $self, $go );
  goto $self->can('_add_overlay_gentoo_object');
}







sub _add_overlay_string_path {    ## no critic ( RequireArgUnpacking )
  my ( $self, $path_str, ) = @_;
  $_str->assert_valid($path_str);
  my $path = $_path_class_dir->coerce($path_str);
  @_ = ( $self, $path );
  goto $self->can('_add_overlay_path_class');
}

1;

__END__

lib/Gentoo/Overlay/Group.pm  view on Meta::CPAN


version 1.000001

=head1 SYNOPSIS

This is a wrapper around L<< C<Gentoo::Overlay>|Gentoo::Overlay >> that makes it easier to perform actions on a group of overlays.

  my $group = Gentoo::Overlay::Group->new();
  $group->add_overlay('/usr/portage');
  $group->add_overlay('/usr/local/portage/');
  $group->iterate( packages => sub {
    my ( $self, $context ) = @_;
    # Traverse-Order:
    # ::gentoo
    #   category_a

lib/Gentoo/Overlay/Group.pm  view on Meta::CPAN

    #     package_b
  });

=head1 METHODS

=head2 add_overlay

  $object->add_overlay( '/path/to/overlay' );
  $object->add_overlay( Path::Tiny::path( '/path/to/overlay' ) );
  $object->add_overlay( Gentoo::Overlay->new( path => '/path/to/overlay' ) );

=head2 iterate

  $object->iterate( ebuilds => sub {


  });

=head1 ATTRIBUTE ACCESSORS

=head2 overlay_names

  my @names = $object->overlay_names

=head2 overlays

  my @overlays = $object->overlays;

=head2 get_overlay

  my $overlay = $object->get_overlay('gentoo');

=head1 PRIVATE ATTRIBUTES

=head2 _overlays

  isa => HashRef[ Gentoo__Overlay_Overlay ], ro, lazy

=head1 PRIVATE ATTRIBUTE ACCESSORS

=head2 _has_overlay

  if( $object->_has_overlay('gentoo') ){
    Carp::croak('waah');
  }

=head2 _set_overlay

  $object->_set_overlay( 'gentoo' => $overlay_object );

=head1 PRIVATE FUNCTIONS

=head2 _type_print

lib/Gentoo/Overlay/Group.pm  view on Meta::CPAN


=head2 _iterate_packages

  $object->_iterate_packages( ignored => sub { } );

=head2 _iterate_overlays

  $object->_iterate_overlays( ignored => sub { } );

=head2 _add_overlay_object

  $groupobject->_add_overlay_object( $object );

=head2 _add_overlay_gentoo_object

  $groupobject->_add_overlay_gentoo_object( $gentoo_object );

=head2 _add_overlay_path_class

  $groupobject->_add_overlay_path_class( $path_class_object );

=head2 _add_overlay_string_path

  $groupobject->_add_overlay_string_path( $path_string );

=head1 AUTHOR

Kent Fredric <kentnl@cpan.org>

 view all matches for this distribution


Gentoo-Perl-Distmap-FromOverlay

 view release on metacpan or  search on metacpan

lib/Gentoo/Perl/Distmap/FromOverlay.pm  view on Meta::CPAN

Moose::Util::TypeConstraints::coerce(
  $gog, $go,
  sub {
    require Gentoo::Overlay::Group;
    my $tree = Gentoo::Overlay::Group->new();
    $tree->add_overlay($_);
    $tree;
  }
);

has overlay => ( isa => $gog, ro, required, coerce );
has distmap => ( isa => 'Gentoo::Perl::Distmap', ro, lazy_build );

sub _warn {
  shift;
  require Carp;

lib/Gentoo/Perl/Distmap/FromOverlay.pm  view on Meta::CPAN

  my $upstream = $remote->content();

  my $distmapargs = {
    category     => $stash->{category_name},
    package      => $stash->{package_name},
    repository   => $stash->{overlay_name},
    distribution => $upstream,
  };
  my $on_ebuild = $self->_on_ebuild( $distmapargs, $stash, $distmap );
  $stash->{package}->iterate( ebuilds => $on_ebuild );
  return;

lib/Gentoo/Perl/Distmap/FromOverlay.pm  view on Meta::CPAN

sub _build_distmap {
  my ($self) = @_;
  require Gentoo::Perl::Distmap;
  my $distmap  = Gentoo::Perl::Distmap->new();
  my $callback = $self->_on_package($distmap);
  $self->overlay->iterate( packages => $callback );
  return $distmap;
}

__PACKAGE__->meta->make_immutable;
no Moose;

lib/Gentoo/Perl/Distmap/FromOverlay.pm  view on Meta::CPAN


=head1 SYNOPSIS

    use Gentoo::Perl::Distmap::FromOverlay;

    my $translator = Gentoo::Perl::Distmap::FromOverlay->new( overlay => Gentoo::Overlay->new( '/path/to/overlay' ) )
    # or
    my $og = Gentoo::Overlay::Group->new();
    $og->add_overlay('/path/to/overlay');
    my $translator = Gentoo::Perl::Distmap::FromOverlay->new( overlay => $og )
    # or
    my $translator = Gentoo::Perl::Distmap::FromOverlay->new( overlay => Gentoo::Overlay::Group::INI->load_named('foo')->overlay_group );

and then

    my $result = $translator->distmap;

 view all matches for this distribution


Gentoo-Probe

 view release on metacpan or  search on metacpan

t/sandbox/usr/portage/app-portage/gentoolkit/files/scripts/dep-clean  view on Meta::CPAN

PROG=`basename ${0}`

tmp="/tmp/$$"

#Get PORTDIR and PORTDIR_OVERLAY from portage
PORTDIR_OVERLAY="$(/usr/lib/portage/bin/portageq portdir_overlay)"
PORTDIR="$(/usr/lib/portage/bin/portageq portdir)"

rm -rf ${tmp} > /dev/null 2>&1
mkdir ${tmp} > /dev/null 2>&1

 view all matches for this distribution


Gentoo-Util-VirtualDepend

 view release on metacpan or  search on metacpan

maint/check-gentoo-names.pl  view on Meta::CPAN


while ( my $line = <$fh> ) {
  chomp $line;
  my (@fields) = split /,/, $line;
  my ( $out, $err, $exit ) = capture {
    system( 'eix', '--in-overlay', 'gentoo', '-c', '-e', $fields[1] )
  };
  if ( $exit != 0 and $exit != 1 and $exit != 256 ) {
    die "Halt: $err $exit";
  }
  next if $exit == 0;

 view all matches for this distribution


Geo-Coder-List

 view release on metacpan or  search on metacpan

lib/Geo/Coder/List.pm  view on Meta::CPAN

		# Shallow clone merged with new params; log is always fresh so the
		# clone starts with an empty event history independent of the original
		return bless { %{$class}, %{$params}, log => [] }, ref($class);
	}

	# Let Object::Configure overlay defaults from environment / config files
	$params = Object::Configure::configure($class, $params);

	# Fill in any %config defaults the caller did not explicitly supply
	for my $key (keys %config) {
		$params->{$key} //= $config{$key};

 view all matches for this distribution


Geo-Coordinates-OSGB

 view release on metacpan or  search on metacpan

lib/Geo/Coordinates/OSGB/Background.pod  view on Meta::CPAN

heading `The National Grid Reference System':

=over 4

=item * Base map constructed on Transverse Mercator Projection, Airy Ellipsoid, OSGB (1936) Datum.
Vertical datum mean sea level. The latitude, longitude graticule overlay is on the ETRS89 datum 
and is compatible with the WGS84 datum used by satellite navigation devices.

=back

If your map does not have the last sentence you can assume that it shows OSGB36

 view all matches for this distribution


Geo-GML

 view release on metacpan or  search on metacpan

lib/Geo/GML/xsd/gml-3.1.1/profiles/gmlJP2Profile/1.0.0/annotation/annotation.xml  view on Meta::CPAN

            <certainty>medium</certainty>
            <rationale>shape of polygons and proximity are a close match to that of known regions of interest</rationale>
        </AnnotationMetaData>
    </gml:metaDataProperty>
    <gml:defaultStyle>
        <!--Style will overlay some arrow or line symbol on top of Annotation/pointer value-->
    </gml:defaultStyle>
    <gml:defaultStyle>
        <!--Style will overlay some other arrow or line symbol on top of the other Annotation/pointer value-->
    </gml:defaultStyle>
    <gml:defaultStyle>
        <!--Style will fill in member Polygons in annotates MultiPolygon property value-->
    </gml:defaultStyle>
    <pointer>

 view all matches for this distribution


Geo-GNUPlot

 view release on metacpan or  search on metacpan

lib/Geo/GNUPlot.pm  view on Meta::CPAN


=item plot_radius_function(CONTOUR_OUTPUT_FILE, SURFACE_OUTPUT_FILE, OPTION_HASH_REF)

Creates a 2D contour and 3D surface plot of the radius function.  This
enables the user to better visualize the radius function and how it is
being interpolated from the provided node values.  The 2D contour plot overlays
the world map provided by the map_file during construction of the
C<Geo::GNUPlot> object.

The CONTOUR_OUTPUT_FILE is the full path of the filename to use for the contour plot.

 view all matches for this distribution


Geo-Geos

 view release on metacpan or  search on metacpan

Geos.xs  view on Meta::CPAN

using namespace geos::index::chain;
using namespace geos::index;
using namespace geos::precision;
using namespace geos::operation::buffer;
using namespace geos::operation::distance;
using namespace geos::operation::overlay;
using namespace geos::operation::valid;
using namespace geos::operation::relate;
using namespace geos::operation::linemerge;
using namespace geos::triangulate;
using namespace xs;

 view all matches for this distribution


Geo-Google-PolylineEncoder

 view release on metacpan or  search on metacpan

t/js_reference/polyline.js  view on Meta::CPAN

  }

  document.getElementById('encodedLevels').value = encoded_levels;
  document.getElementById('encodedPolyline').value = encoded_points;

  if (document.overlay) {
    document.map.removeOverlay(document.overlay);
  }

  if (points.length > 1) {
    document.overlay = GPolyline.fromEncoded({color: "#0000FF",
                                              weight: 10,
                                              points: encoded_points,
                                              zoomFactor: 32,
                                              levels: encoded_levels,
                                              numLevels: 4
                                             });

    document.map.addOverlay(document.overlay);
  }
}

function centerMap() {
  var address = document.getElementById('txtAddress').value;

t/js_reference/polyline.js  view on Meta::CPAN

  document.map = new GMap2(document.getElementById("map_canvas"));
  document.map.setCenter(new GLatLng(37.4419, -122.1419), 13);
  document.map.addControl(new GSmallMapControl());
  document.map.addControl(new GMapTypeControl());

  GEvent.addListener(document.map, "click", function(overlay, point) {
    document.getElementById('txtLatitude').value = point.y;
    document.getElementById('txtLongitude').value = point.x;

    if (marker == null) {
      marker = createMarker(point, "green");

 view all matches for this distribution


Geo-Google-StaticMaps-V2

 view release on metacpan or  search on metacpan

lib/Geo/Google/StaticMaps/V2.pm  view on Meta::CPAN


=head2 path

Creates a L<Geo::Google::StaticMaps::V2::Path> object and adds the object to the internal Paths array.

path (optional) defines a single path of two or more connected points to overlay on the image at specified locations. Note that if you supply a path for a map, you do not need to specify the (normally required) center and zoom parameters.

=cut

sub path {
  my $self=shift;

 view all matches for this distribution


Geo-Google

 view release on metacpan or  search on metacpan

lib/Geo/Google.pm  view on Meta::CPAN

      # attempt to locate the JSON formatted data block
      if ($page =~ m#loadVPage\((.+), "\w+"\);}//]]>#is) { $response_json = $json->jsonToObj($1); }
      else {
	$self->error( "Unable to locate the JSON format data in google's response.") and return undef;
      }
      if ( scalar(@{$response_json->{"overlays"}->{"markers"}}) > 0 ) {	
        foreach my $marker (@{$response_json->{"overlays"}->{"markers"}}) {
	  my $loc = $self->_obj2location($marker, %arg);
	  push @result, $loc;
        }		
      }
      else {

lib/Geo/Google.pm  view on Meta::CPAN

  }
  else {
    $self->error( "Unable to locate the JSON format data in Google's response.") and return undef;
  }

  if ( scalar(@{$response_json->{"overlays"}->{"markers"}}) > 0 ) {
    my @result = ();
    foreach my $marker (@{$response_json->{"overlays"}->{"markers"}}) {
      my $loc = $self->_obj2location($marker);
      push @result, $loc;
    }		
    return @result;
  }

lib/Geo/Google.pm  view on Meta::CPAN

    $self->error( "Unable to locate the JSON format data in Google's response.") and return undef;
  }

  my @points;
  my @enc_points;
  for (my $i = 0; $i<=$#{$response_json->{"overlays"}->{"polylines"}}; $i++) {
    $enc_points[$i] = $response_json->{"overlays"}->{"polylines"}->[$i]->{"points"};
    $points[$i] = [ _decode($enc_points[$i]) ];
  }

  # extract a series of directions from HTML inside the panel 
  # portion of the JSON data response, stuffing them in @html_segs

lib/Geo/Google.pm  view on Meta::CPAN

      distance  => $1 . " " . $2,
      time      => $3,
      polyline  => [ @enc_points ],
      locations => [ @locations ],
      panel     => $response_json->{"panel"},
      levels    => $response_json->{"overlays"}->{"polylines"}->[0]->{"levels"} );
  } else {
      $self->error("Could not extract the total route distance and time from google's directions") and return undef;
  }

#$Data::Dumper::Maxdepth=6;

lib/Geo/Google.pm  view on Meta::CPAN


 Usage    : my $loc = _obj2location($obj);
 Function : converts a perl object generated from a Google Maps 
		JSON response to a Geo::Google::Location object
 Returns  : a Geo::Google::Location object
 Args     : a member of the $obj->{overlays}->{markers}->[] 
		anonymous array that you get when you read google's 
		JSON response and parse it using JSON::jsonToObj()

=cut

lib/Geo/Google.pm  view on Meta::CPAN

                               'daddr' => '',
                               'dfaddr' => ''
                             },
                      'selected' => ''
                    },
          'overlays' => {
                          'polylines' => [],
                          'markers' => [],
                          'polygons' => []
                        },
          'printheader' => '',

 view all matches for this distribution


Geo-GoogleMaps-OffsetCenter

 view release on metacpan or  search on metacpan

lib/Geo/GoogleMaps/OffsetCenter.pm  view on Meta::CPAN

 | |                       |                           |
 | |                       |                           |
 | +-----------------------+                           |
 +-----------------------------------------------------+

Box A is your full map area, and box B is an overlay containing text. Box B is
considered the occlusion in this case.

This means the effective map area is the region to the right, even though map
tiles need to be rendered below box A. There are many display situations where
this might be necessary:

=over 4

=item *

The overlay is translucent, and map tiles are visible beneath it.

=item *

The overlay does not touch the edges of the map it overlays, and so it needs to
be framed by map tiles.

=back

This module will allow you to do an offset of a given latitude/longitude under

 view all matches for this distribution


Geo-Heatmap

 view release on metacpan or  search on metacpan

lib/Geo/Heatmap.pm  view on Meta::CPAN


=pod

=head1 NAME

Geo::Heatmap - generate a density map (aka heatmap) overlay layer for Google Maps, see the www directory in the distro how it works

see the script directory for creating a scale

for a real life example see 

lib/Geo/Heatmap.pm  view on Meta::CPAN

     &lt;/style&gt;
     &lt;script type="text/javascript"
       src="https://maps.googleapis.com/maps/api/js?key=<yourapikey>&sensor=true"&gt;
     &lt;/script&gt;
     &lt;script type="text/javascript"&gt;
       var overlayMaps = [{
         getTileUrl: function(coord, zoom) {
           return "hm.fcgi?tile="+coord.x+"+"+coord.y+"+"+zoom;
         },
 
         tileSize: new google.maps.Size(256, 256),

lib/Geo/Heatmap.pm  view on Meta::CPAN

           zoom: 9
         };
         var map = new google.maps.Map(document.getElementById("map-canvas"),
             mapOptions);
 
       var overlayMap = new google.maps.ImageMapType(overlayMaps[0]);
       map.overlayMapTypes.setAt(0,overlayMap);
 
       }
       google.maps.event.addDomListener(window, 'load', initialize);
 
     &lt;/script&gt;

 view all matches for this distribution


Geo-Raster

 view release on metacpan or  search on metacpan

lib/Geo/Raster.pm  view on Meta::CPAN

	return @$w;
    }
    #$self->_attributes;
}

## @method overlayable(Geo::Raster other)
#
# @brief Test if two rasters are overlayable.
sub overlayable {
    my($self, $other) = @_;
    ral_grid_overlayable($self->{GRID}, $other->{GRID});
}

## @ignore
*bounding_box = *world;

lib/Geo/Raster.pm  view on Meta::CPAN

# @brief Cross product of rasters.
#
# Creates a new Geo::Raster whose values represent distinct
# combinations of values of the two operand rasters. May be used as
# lvalue or in-place. The operand rasters must be integer rasters and
# the rasters must be overlayable.
# @code
# $c = $a->cross($b);
# $a->cross($b);
# @endcode
#

lib/Geo/Raster.pm  view on Meta::CPAN

#
# Example of clipping a raster:
# @code
# $g2 = $g1->clip($g3);
# @endcode
# The example clips from $g1 a piece which is overlayable with $g3. 
# If there is no lvalue, $g1 is clipped.
# 
# @param[in] area_to_clip A Geo::Raster, which defines the area to clip.
# @return If a return value is wanted, then the method returns a new raster with
# size defined by the parameter.

 view all matches for this distribution


Geo-Vector

 view release on metacpan or  search on metacpan

lib/Geo/Vector/Layer.pm  view on Meta::CPAN

# @brief Renders the vector layer onto a memory image.
#
# @param[in,out] pb Pixel buffer into which the vector layer is rendered.
# @note The layer has to be visible while using the method!
sub render {
    my($self, $pb, $cr, $overlay, $viewport) = @_;
    return if !$self->visible();
    
    $self->{PALETTE_VALUE} = $PALETTE_TYPE{$self->{PALETTE_TYPE}};
    $self->{SYMBOL_VALUE} = $SYMBOL_TYPE{$self->{SYMBOL_TYPE}};
    if ($self->{SYMBOL_FIELD} eq 'Fixed size') {

lib/Geo/Vector/Layer.pm  view on Meta::CPAN

	push @border, 255;
    }
    
    if ($self->{features}) {
	for my $feature (values %{$self->{features}}) {
	    $self->render_feature($overlay, $cr, $feature);
	}
    } else {
	my $handle = Geo::Vector::OGRLayerH($self->{OGR}->{Layer});
        if ( not $self->{RENDERER} ) {	    
            my $layer = Geo::Vector::ral_visual_layer_create($self, $handle);

lib/Geo/Vector/Layer.pm  view on Meta::CPAN

	    if ($layer) {
		Geo::Vector::ral_visual_layer_render( $layer, $pb ) if $pb;
		Geo::Vector::ral_visual_layer_destroy($layer);
	    }
	}
	$self->render_labels($cr, $overlay, $viewport);
    }
}

sub render_labels {
    my($self, $cr, $overlay, $viewport) = @_;
    my $labeling = $self->labeling;
    return unless $labeling->{field} ne 'No Labels';

    my @label_color = @{$labeling->{color}};
    $label_color[3] = int($self->{ALPHA}*$label_color[3]/255);

lib/Geo/Vector/Layer.pm  view on Meta::CPAN

    
    while ($f = $self->{OGR}->{Layer}->GetNextFeature()) {
	
	my $geometry = $f->GetGeometryRef();
	
	my @placements = label_placement($geometry, $overlay->{pixel_size}, @$viewport, $f->GetFID);
	
	for (@placements) {
	    
	    my ($size, @point) = @$_;
	    

lib/Geo/Vector/Layer.pm  view on Meta::CPAN

		$point[0] < $viewport->[0] or 
		$point[0] > $viewport->[2] or
		$point[1] < $viewport->[1] or
		$point[1] > $viewport->[3];
	    
	    my @pixel = $overlay->point2pixmap_pixel(@point);
	    if ($self->{INCREMENTAL_LABELS}) {
		# this is fast but not very good
		my $geokey = int($pixel[0]/120) .'-'. int($pixel[1]/50);
		next if $geohash{$geokey};
		$geohash{$geokey} = 1;
	    }
	    
	    if ($self->{RENDERER} eq 'Cairo') {
		my $points = $geometry->Points;
		# now only for points
		my @p = $overlay->point2pixmap_pixel(@{$points->[0]});
		my $d = $self->{SYMBOL_SIZE}/2;
		$cr->move_to($p[0]-$d, $p[1]);
		$cr->line_to($p[0]+$d, $p[1]);
		$cr->move_to($p[0], $p[1]-$d);
		$cr->line_to($p[0], $p[1]+$d);

lib/Geo/Vector/Layer.pm  view on Meta::CPAN

	
    }
}

sub render_feature {
    my($self, $overlay, $cr, $feature, $geometry) = @_;
    $geometry = $feature->Geometry unless $geometry;
    my $t = $geometry->GeometryType;
    my $a = $self->alpha/255.0;
    my @color = $self->single_color;
    for (@color) {
	$_ /= 255.0;
	$_ *= $a;
    }
    if ($t =~ /^Point/) {
	render_point($overlay, $cr, $geometry, \@color);
    } elsif ($t =~ /^Line/) {
	render_linestring($overlay, $cr, $geometry, 1, \@color);
    } elsif ($t =~ /^Poly/) {
	my @border = $self->border_color;
	@border = (0,0,0) unless @border;
	for (@border) {
	    $_ /= 255.0;
	    $_ *= $a;
	}
	push @border, $color[3];
	render_polygon($overlay, $cr, $geometry, 1, \@border, \@color);
    } elsif ($geometry->GetGeometryCount > 0) {
	for my $i (0..$geometry->GetGeometryCount-1) {
	    render_feature($self, $overlay, $cr, $feature, $geometry->GetGeometryRef($i));
	}
    }
}

sub render_polygon {
    my($overlay, $cr, $geometry, $line_width, $border, $fill) = @_;
    paths($overlay, $cr, $geometry->Points);
    $cr->set_line_width($line_width);
    $cr->set_source_rgba(@$fill);
    $cr->set_fill_rule('even-odd');
    $cr->fill_preserve;
    $cr->set_source_rgba(@$border);
    $cr->stroke;
}

sub render_linestring {
    my($overlay, $cr, $geometry, $line_width, $color) = @_;
    $cr->set_line_width($line_width);
    $cr->set_source_rgba(@$color);
    geometry_path($overlay, $cr, $geometry);
    $cr->stroke;
}

sub render_point {
    my($overlay, $cr, $geometry, $color) = @_;
    $cr->set_line_width(1);
    $cr->set_source_rgba(@$color);
    my @p = $overlay->point2surface($geometry->GetPoint);
    for (@p) {
	$_ = bounds($_, -10000, 10000);
    }
    $p[0] -= 3;
    $cr->move_to(@p);

lib/Geo/Vector/Layer.pm  view on Meta::CPAN

    $cr->line_to(@p);
    $cr->stroke;
}

sub geometry_path {
    my($overlay, $cr, $geometry) = @_;
    if ($geometry->GetGeometryCount > 0) {
	for my $i (0..$geometry->GetGeometryCount-1) {
	    geometry_path($overlay, $cr, $geometry->GetGeometryRef($i));
	}
    } else {
	path($overlay, $cr, $geometry->Points);
    }
}

sub paths {
    my($overlay, $cr, $points) = @_;
    if (ref $points->[0]->[0]) {
	for my $i (0..$#$points) {
	    paths($overlay, $cr, $points->[$i]);
	}
    } else {
	path($overlay, $cr, $points);
    }
}

sub path {
    my($overlay, $cr, $points) = @_;
    my @p = $overlay->point2surface(@{$points->[0]});
    for (@p) {
	$_ = bounds($_, -10000, 10000);
    }
    $cr->move_to(@p);
    for my $i (1..$#$points) {
	@p = $overlay->point2surface(@{$points->[$i]});
	for (@p) {
	    $_ = bounds($_, -10000, 10000);
	}
	$cr->line_to(@p);
    }

lib/Geo/Vector/Layer.pm  view on Meta::CPAN

    return $l;
}

## @ignore
sub render_selection {
    my($self, $gc, $overlay) = @_;

    my $features = $self->selected_features();
    
    for my $f (@$features) {
	

lib/Geo/Vector/Layer.pm  view on Meta::CPAN

	
	my $geom = $f->GetGeometryRef();
	next unless $geom;
	
	# this could be a bit faster without conversion
	$overlay->render_geometry($gc, Geo::OGC::Geometry->new(Text => $geom->ExportToWkt));
	
    }
}

# this piece should probably go into GDAL:

 view all matches for this distribution


Gimp

 view release on metacpan or  search on metacpan

examples/bricks  view on Meta::CPAN

  $border->edit_paste(0)->floating_sel_anchor;
  $image->selection_none;
  $border->gauss_iir (2,1,1);
  $layer->gauss_iir (2,1,1);
  $layerpat->bump_map($layer,280,40,2,0,0,0,0,1,0,1);
  # overlay border lines and random skew bricks
  $image->undo_group_start;
  $h = 0; $j = 0; $wo = 0;
  while ($h < $imageh) {
    $w = 0; $wo = 0; $wo = ($brickw / 2) if ($j == 1);
    while ($w < $imagew) {

 view all matches for this distribution


Git-Raw

 view release on metacpan or  search on metacpan

deps/libgit2/deps/zlib/deflate.c  view on Meta::CPAN


    s->high_water = 0;      /* nothing written to s->window yet */

    s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */

    /* We overlay pending_buf and sym_buf. This works since the average size
     * for length/distance pairs over any compressed block is assured to be 31
     * bits or less.
     *
     * Analysis: The longest fixed codes are a length code of 8 bits plus 5
     * extra bits, for lengths 131 to 257. The longest fixed distance codes are

 view all matches for this distribution


Git-XS

 view release on metacpan or  search on metacpan

xs/libgit2/deps/zlib/deflate.c  view on Meta::CPAN

{
    deflate_state *s;
    int wrap = 1;
    static const char my_version[] = ZLIB_VERSION;

    ushf *overlay;
    /* We overlay pending_buf and d_buf+l_buf. This works since the average
     * output size for (length,distance) codes is <= 24 bits.
     */

    if (version == Z_NULL || version[0] != my_version[0] ||
        stream_size != sizeof(z_stream)) {

xs/libgit2/deps/zlib/deflate.c  view on Meta::CPAN


    s->high_water = 0;      /* nothing written to s->window yet */

    s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */

    overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
    s->pending_buf = (uchf *) overlay;
    s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L);

    if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
        s->pending_buf == Z_NULL) {
        s->status = FINISH_STATE;
        strm->msg = (char*)ERR_MSG(Z_MEM_ERROR);
        deflateEnd (strm);
        return Z_MEM_ERROR;
    }
    s->d_buf = overlay + s->lit_bufsize/sizeof(ush);
    s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;

    s->level = level;
    s->strategy = strategy;
    s->method = (Byte)method;

xs/libgit2/deps/zlib/deflate.c  view on Meta::CPAN

#ifdef MAXSEG_64K
    return Z_STREAM_ERROR;
#else
    deflate_state *ds;
    deflate_state *ss;
    ushf *overlay;


    if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) {
        return Z_STREAM_ERROR;
    }

xs/libgit2/deps/zlib/deflate.c  view on Meta::CPAN

    ds->strm = dest;

    ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte));
    ds->prev   = (Posf *)  ZALLOC(dest, ds->w_size, sizeof(Pos));
    ds->head   = (Posf *)  ZALLOC(dest, ds->hash_size, sizeof(Pos));
    overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2);
    ds->pending_buf = (uchf *) overlay;

    if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL ||
        ds->pending_buf == Z_NULL) {
        deflateEnd (dest);
        return Z_MEM_ERROR;

xs/libgit2/deps/zlib/deflate.c  view on Meta::CPAN

    zmemcpy(ds->prev, ss->prev, ds->w_size * sizeof(Pos));
    zmemcpy(ds->head, ss->head, ds->hash_size * sizeof(Pos));
    zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);

    ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
    ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush);
    ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize;

    ds->l_desc.dyn_tree = ds->dyn_ltree;
    ds->d_desc.dyn_tree = ds->dyn_dtree;
    ds->bl_desc.dyn_tree = ds->bl_tree;

 view all matches for this distribution


Google-ProtocolBuffers-Dynamic

 view release on metacpan or  search on metacpan

src/descriptorloader.cpp  view on Meta::CPAN

    errors.clear();
    croak("%s", copy.c_str());
}

DescriptorLoader::DescriptorLoader() :
        overlay_source_tree(&memory_source_tree, &disk_source_tree),
        generated_database(*DescriptorPool::generated_pool()),
        source_database(&overlay_source_tree, &generated_database),
        merged_source_binary_database(&binary_database, &source_database),
        merged_pool(&merged_source_binary_database, source_database.GetValidationErrorCollector()) {
    merged_pool.EnforceWeakDependencies(true);
    source_database.RecordErrorsTo(&multifile_error_collector);

 view all matches for this distribution


Graph-Chart

 view release on metacpan or  search on metacpan

Graph-Chart_example.pl  view on Meta::CPAN

    $alarm[$_] = 1;

}

#
#$graph->overlay(
#{
#	layer => 1,
#	set   => \@alarm,
#	color => '0xFFFECE',
##	color => '0xFFD2D2',

Graph-Chart_example.pl  view on Meta::CPAN

#$alarm1[ $_  ] = 1;
#
#}
#
#
#$graph->overlay(
#{
#	layer => 0,
#	set   => \@alarm1,
#	color => '0xFFD2D2',
#	opacity => 100,

 view all matches for this distribution


Graph-ChartSVG

 view release on metacpan or  search on metacpan

lib/Graph/ChartSVG.pm  view on Meta::CPAN

package  Graph::ChartSVG::Layer;
use Moose;

has 'data'    => ( isa => 'Graph::ChartSVG::Data',    is => 'rw', required => 0 );
has 'glyph'   => ( isa => 'Graph::ChartSVG::Glyph',   is => 'rw', required => 0 );
has 'overlay' => ( isa => 'Graph::ChartSVG::Overlay', is => 'rw', required => 0 );

1;

package  Graph::ChartSVG::Data;
use Moose;

lib/Graph/ChartSVG.pm  view on Meta::CPAN

has 'total_size'  => ( isa => 'ArrayRef', is => 'rw', required => 0 );
has 'bg_color'    => ( isa => 'Str',      is => 'rw', required => 0, default => 'ffffffff' );
has 'frame'       => ( isa => 'Graph::ChartSVG::Frame',    is => 'rw', required => 0, default => sub { Graph::ChartSVG::Frame->new } );
has 'grid'        => ( isa => 'Graph::ChartSVG::Grid',     is => 'rw', required => 0 );
#has 'reticle'     => ( isa => 'HashRef',  is => 'rw', required => 0 );
has 'overlay' => ( isa => 'Graph::ChartSVG::Overlay',  is => 'rw', required => 0 );
has 'glyph'   => ( isa => 'ArrayRef', is => 'rw', required => 0 );
#has 'layer'    => ( isa => 'ArrayRef', is => 'rw' ,default => sub { [ Layer->new]} );
has 'layer'   => ( isa => 'ArrayRef[Layer]', is => 'rw' );
has 'image'   => ( isa => 'Str',             is => 'rw' );
has 'svg_raw' => ( isa => 'Str',             is => 'rw' );

lib/Graph/ChartSVG.pm  view on Meta::CPAN

                            'opacity' => eval( hex( ( unpack "a6 a2", $color_hex )[1] ) / 255 ) || 1,
                            'fill' => '#' . ( unpack "a6", $color_hex ) || 0,
                            'fill-opacity' => eval( hex( ( unpack "a6 a2", $color_hex )[1] ) / 255 ) || 1,
                            'fill-rule' => 'nonzero'
                        },
                        id => 'v_overlay_' . $layer_ind . '_' . $ind
                    );
                    $ind++;
                }
            }
            if ( $layer->{ type } eq 'h' )

lib/Graph/ChartSVG.pm  view on Meta::CPAN

                            'opacity' => eval( hex( ( unpack "a6 a2", $color_hex )[1] ) / 255 ) || 1,
                            'fill' => '#' . ( unpack "a6", $color_hex ) || 0,
                            'fill-opacity' => eval( hex( ( unpack "a6 a2", $color_hex )[1] ) / 255 ) || 1,
                            'fill-rule' => 'nonzero'
                        },
                        id => 'h_overlay_' . $layer_ind . '_' . $ind
                    );
                    $ind++;
                }
            }
        }

lib/Graph/ChartSVG.pm  view on Meta::CPAN

=back

  a Grid oject to add to the graph
  
  
=head3     overlay
 
=over 

=back

 view all matches for this distribution


Graph-Easy-As_svg

 view release on metacpan or  search on metacpan

lib/Graph/Easy/As_svg.pm  view on Meta::CPAN

   textstyle|
   width|
   rotate|
   )\z/x;

  my $overlay = {
    edge => {
      "stroke" => 'black',
      "text-align" => 'center',
      "font-size" => '13px',
    },
    node => {
      "font-size" => '16px',
      "text-align" => 'center',
    },
  };
  $overlay->{graph} =
    {
    "font-size" => '16px',
    "text-align" => 'center',
    "border" => '1px dashed #808080',
    };
  # generate the class attributes first
  my $style = $self->_class_styles( $skip, $mutator, '', ' ', $overlay);

  $txt .=
    "\n <!-- class definitions -->\n"
   ." <style type=\"text/css\"><![CDATA[\n$style ]]></style>\n"
    if $style ne '';

 view all matches for this distribution


Graph-Easy

 view release on metacpan or  search on metacpan

lib/Graph/Easy.pm  view on Meta::CPAN

      delete $g->{edges};
      }
    }
  }

# Attribute overlay for HTML output:

my $html_att = {
  node => {
    borderstyle => 'solid',
    borderwidth => '1px',

lib/Graph/Easy.pm  view on Meta::CPAN

  # attribute names to be skipped (e.g. excluded), and $map is a
  # HASH that contains mapping for attribute names for the output.
  # "$base" is the basename for classes (either "table.graph$id" if
  # not defined, or whatever you pass in, like "" for svg).
  # $indent is a left-indenting spacer like "  ".
  # $overlay contains a HASH with attribute-value pairs to set as defaults.

  my ($self, $skip, $map, $base, $indent, $overlay) = @_;

  my $a = $self->{att};

  $indent = '' unless defined $indent;
  my $indent2 = $indent x 2; $indent2 = '  ' if $indent2 eq '';

  my $class_list = { edge => {}, node => {}, group => {} };
  if (defined $overlay)
    {
    $a = {};

    # make a copy from $self->{att} to $a:

lib/Graph/Easy.pm  view on Meta::CPAN

        $acc->{$k} = $ac->{$k};
        }
      }

    # add the extra keys
    for my $class (sort keys %$overlay)
      {
      my $oc = $overlay->{$class};
      # create the hash if it doesn't exist yet
      $a->{$class} = {} unless ref $a->{$class};
      my $acc = $a->{$class};
      for my $k (sort keys %$oc)
        {

 view all matches for this distribution


GraphViz-Traverse

 view release on metacpan or  search on metacpan

lib/GraphViz/Traverse.pm  view on Meta::CPAN

  concentrate  = Class instance setting
  directed     = Class instance setting
  epsilon      = Class instance setting
  height       = Class instance setting
  href         = "url" the default url for image map files; in PostScript files, the base URL for all relative URLs, as recognized by Acrobat Distiller 3.0 and up.
  layers       = "id:id:id:id" is a sequence of layer identifiers for overlay diagrams. The PostScript array variable layercolorseqsets the assignment of colors to layers. The least indexis1and each element must be a 3-ele- ment array to be interpret...
  layout       = Class instance setting
  margin       = f sets the page margin (included in the page size).
  no_overlap   = Class instance setting
  nodesep      = f sets the minimum separation between nodes.
  nslimit      = f ormclimit=f adjusts the bound on the number of network simplexormincross iterations by the givenratio. For example,mclimit=2.0runs twice as long.

 view all matches for this distribution


GraphViz2-Marpa-Extractor

 view release on metacpan or  search on metacpan

doc/rendering.md  view on Meta::CPAN


## 6. Post‑Layout Processing
After rendering, tools may:
- annotate the IR with positions
- detect crossings or violations
- generate reports or visual overlays

The IR structure makes these tasks straightforward.

End of rendering.

 view all matches for this distribution


Graphics-DZI

 view release on metacpan or  search on metacpan

lib/Graphics/DZI.pm  view on Meta::CPAN


=item C<tilesize> (integer, default: 128)

Specifies the quadratic size of each tile.

=item C<overlays> (list reference, default: [])

An array of L<Graphics::DZI::Overlay> objects which describe how further images are supposed to be
composed onto the canvas image.

=back

lib/Graphics/DZI.pm  view on Meta::CPAN

has 'image'    => (isa => 'Image::Magick', is => 'rw', required => 1);
has 'scale'    => (isa => 'Int',           is => 'ro', default => 1);
has 'overlap'  => (isa => 'Int',           is => 'ro', default => 4);
has 'tilesize' => (isa => 'Int',           is => 'ro', default => 256);
has 'format'   => (isa => 'Str'   ,        is => 'ro', default => 'png');
has 'overlays' => (isa => 'ArrayRef',      is => 'rw', default => sub { [] });

=head2 Methods

=over

lib/Graphics/DZI.pm  view on Meta::CPAN

(I<$W>, I<$H>) = I<$dzi>->dimensions ('total')

(I<$W>, I<$H>) = I<$dzi>->dimensions ('canvas')

This method computes how large (in pixels) the overall image will be. If C<canvas> is passed in,
then any overlays are ignored. Otherwise their size (with their squeeze factors) are used to blow up
the canvas, so that the overlays fit onto the canvas.

=cut

sub dimensions {
    my $self = shift;
    my $what = shift || 'total';

    my ($W, $H);
    if ($what eq 'total') {
	use List::Util qw(max);
	my $max_squeeze = max map { $_->squeeze } @{ $self->overlays };
	$self->{scale} = defined $max_squeeze ? $max_squeeze : 1;
	($W, $H) = map { $_ * $self->{scale} } $self->image->GetAttributes ('width', 'height');
    } else {
	($W, $H) = $self->image->GetAttributes ('width', 'height');
    }

lib/Graphics/DZI.pm  view on Meta::CPAN


		my $tile_dy = $y == 0 ? $border_tilesize : $overlap_tilesize;

		my @tiles = grep { defined $_ }                                                # only where there was some intersection
                            map {
				$_->crop ($x, $y, $tile_dx, $tile_dy);                         # and for each overlay crop it onto a tile
			    } @{ $self->overlays };                                            # look at all overlays

		if (@tiles) {                                                                  # if there is at least one overlay tile
		    my $tile = $self->crop ($scale, $x, $y, $tile_dx, $tile_dy);               # do a crop in the canvas and try to get a tile
		    map {
			$tile->Composite (image => $_, x => 0, 'y' => 0, compose => 'Over')
		    } @tiles;
		    $self->manifest ($tile, $level, $row, $col);                               # we flush it

lib/Graphics/DZI.pm  view on Meta::CPAN

	    $col++;                                                                            # the col count
	}

#-- resizing canvas
	($width, $height) = map { POSIX::ceil ($_ / 2) } ($width, $height);
	if (@{ $self->overlays }) {                                                            # do we have overlays from which the scale came?
	    $scale /= 2;                                                                       # the overall magnification is to be reduced
	    foreach my $o (@{ $self->overlays }) {                                             # also resize all overlays
		$o->halfsize;
	    }
	} else {
	    # keep scale == 1
	    $self->{image}->Resize (width => $width, height => $height);                       # resize the canvas for next iteration

 view all matches for this distribution


Graphics-Framebuffer

 view release on metacpan or  search on metacpan

examples/vector.pl  view on Meta::CPAN


Sets the drawing mode to B<add> drawing mode.  Pixels will be ADDed with what is already on the screen.

=item B<ALPHA_MODE>

Sets the drawing mode to B<alpha> drawing mode.  Pixels will be overlayed on top of what is already on the screen based on the alpha (opacity) value of the FOREGROUND color.

=item B<AND_MODE>

Sets the drawing mode to B<and> drawing mode.  Pixels will be ANDed with what is already on the screen.

 view all matches for this distribution


Graphics-Toolkit-Color

 view release on metacpan or  search on metacpan

lib/Graphics/Toolkit/Color/Manual/Space.pod  view on Meta::CPAN

=head2 RGB

(alias name is B<SRGB> - standard RGB) is the default color space of this 
module internally and for input and output.
It is used by most computer hardware like monitors and follows the logic of 
additive color mixing as produced by an overlay of three colored light beams.
The sum of all colors will be white, as opposed to subtractive mixing. 
I<RGB> is a completely Cartesian (Euclidean) 3D space and thus an I<RGB>
tuple consists of three integer values:

B<red> (short B<r>) range: 0 .. 255, B<green> (short B<g>) range: 0 .. 255

 view all matches for this distribution


( run in 1.174 second using v1.01-cache-2.11-cpan-7fcb06a456a )