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
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
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
view release on metacpan or search on metacpan
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
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
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
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
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
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
</style>
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key=<yourapikey>&sensor=true">
</script>
<script type="text/javascript">
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);
</script>
view all matches for this distribution
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
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
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
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
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
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
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
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
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
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
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
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
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
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
view release on metacpan or search on metacpan
lib/Graphics/Toolkit/Color/Space/Hub.pm view on Meta::CPAN
=head2 RGB
... is the default color space of this CPAN module. 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 in opposite to subtractive mixing.
Its is a completely Cartesian (Euclidean) 3D space and thus a 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
view release on metacpan or search on metacpan
examples/old_examples/imaging/drawMesh.pl view on Meta::CPAN
use Tk;
use Graphics::VTK::Tk;
$MW = Tk::MainWindow->new;
# This example demonstrates how to draw 3D polydata (in world coordinates) in
# the 2D overlay plane. Useful for selection loops, etc.
$VTK_DATA = 0;
$VTK_DATA = $ENV{VTK_DATA};
# get the interactor ui
use Graphics::VTK::Tk::vtkInt;
# create the visualization pipeline
view all matches for this distribution
view release on metacpan or search on metacpan
docs/assets/stylesheets/bootstrap/_navs.scss view on Meta::CPAN
// Give the tabs something to sit on
.nav-tabs {
border-bottom: 1px solid $nav-tabs-border-color;
> li {
float: left;
// Make the list-items overlay the bottom border
margin-bottom: -1px;
// Actual tabs (as links)
> a {
margin-right: 2px;
view all matches for this distribution
view release on metacpan or search on metacpan
- fix a bug where background processes stopped processing jobs.
- primary selection support for schnauzer selections.
- documented and implemented scorlling behaviour while drag-selecting.
- implemented Select=>By Prefix.
- background loading of .xvpics (and checking for symlinks-to-dirs).
- use overlays to differentiate between directories that
are empty, have .xvpics or are symlinks-to-directories.
- better/slower expose handling (we need double-refreshes due to
probable bugs in gtk+ or X11).
- implement a dirstack (statestack) and make use of it.
- don't forget cursor position on ctrl-g and similar commands.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Gtk2/Ex/Geo/Graph.pm view on Meta::CPAN
return ($minx, $miny, $maxx, $maxy) if defined $minx;
return ();
}
sub render {
my($self, $pb, $cr, $overlay, $viewport) = @_;
my @s = @{$self->selected_features()};
my %selected = map { (ref($_) eq 'HASH' ? $_ : $_->[0].$_->[1] ) => 1 } @s;
my $a = $self->alpha/255.0;
lib/Gtk2/Ex/Geo/Graph.pm view on Meta::CPAN
$cr->set_line_width(1);
$cr->set_source_rgba(@color);
for my $v ($self->{graph}->vertices) {
my @p = $overlay->point2surface($v->{point}->{X}, $v->{point}->{Y});
for (@p) {
$_ = bounds($_, -10000, 10000);
}
$cr->arc(@p, $NODE_RAY, 0, 2*3.1415927);
$cr->fill_preserve if $selected{$v};
$cr->stroke;
}
for my $e ($self->{graph}->edges) {
my($u, $v) = @$e;
my @p = $overlay->point2surface($u->{point}->{X}, $u->{point}->{Y});
my @q = $overlay->point2surface($v->{point}->{X}, $v->{point}->{Y});
for (@p, @q) {
$_ = bounds($_, -10000, 10000);
}
$cr->move_to(@p);
$cr->line_to(@q);
lib/Gtk2/Ex/Geo/Graph.pm view on Meta::CPAN
my $selected = get_selected_from_selection($selection);
$self->select();
for my $v ($self->{graph}->vertices) {
push @{$self->selected_features}, $v if $selected->{$v->{index}};
}
$gui->{overlay}->render;
}
sub open_links_dialog {
my($self, $gui) = @{pop()};
my $dialog = Gtk2::Dialog->new('Nodes of '.$self->name, undef, [], 'gtk-close' => 'close');
lib/Gtk2/Ex/Geo/Graph.pm view on Meta::CPAN
$_[0] < $_[1] ? $_[1] : ($_[0] > $_[2] ? $_[2] : $_[0]);
}
sub got_focus {
my($self, $gui) = @_;
my $o = $gui->{overlay};
$self->{_tag1} = $o->signal_connect(
drawing_changed => \&drawing_changed, [$self, $gui]);
$self->{_tag2} = $o->signal_connect(
new_selection => \&new_selection, [$self, $gui]);
$self->{_tag3} = $o->signal_connect(
lib/Gtk2/Ex/Geo/Graph.pm view on Meta::CPAN
}
sub lost_focus {
my($self, $gui) = @_;
for (qw/_tag1 _tag2 _tag3/) {
$gui->{overlay}->signal_handler_disconnect($self->{$_}) if $self->{$_};
delete $self->{$_};
}
}
sub drawing_changed {
my($self, $gui) = @{$_[1]};
my $drawing = $gui->{overlay}->{drawing};
if ($drawing->isa('Geo::OGC::LineString') and $drawing->NumPoints == 2) {
my $v1 = $self->find_vertex($gui, $drawing->StartPoint);
my $v2 = $self->find_vertex($gui, $drawing->EndPoint);
unless ($v1) {
$v1 = { point => $drawing->StartPoint->Clone };
lib/Gtk2/Ex/Geo/Graph.pm view on Meta::CPAN
$self->{graph}->add_vertex($v2);
}
my $w = $drawing->Length;
$self->{graph}->add_weighted_edge($v1, $v2, $w);
}
delete $gui->{overlay}->{drawing};
$gui->{overlay}->render;
}
sub find_vertex {
my($self, $gui, $point) = @_;
my $d = -1;
my $c;
for my $v ($self->{graph}->vertices) {
my $e = $point->Distance($v->{point});
($c, $d) = ($v, $e) if $d < 0 or $e < $d;
}
return $c if $d/$gui->{overlay}->{pixel_size} < $NODE_RAY;
}
sub find_edge {
my($self, $gui, $point) = @_;
my $d = -1;
lib/Gtk2/Ex/Geo/Graph.pm view on Meta::CPAN
$e2->AddPoint($e->[0]->{point});
$e2->AddPoint($e->[1]->{point});
my $d2 = $point->Distance($e2);
($c, $d) = ($e, $d2) if $d < 0 or $d2 < $d;
}
return $c if $d/$gui->{overlay}->{pixel_size} < $NODE_RAY;
}
sub new_selection {
my($self, $gui) = @{$_[1]};
my $selection = $gui->{overlay}->{selection};
$self->select();
$self->_select($gui, $selection);
if ($self->{nodes_dialog}) {
my $view = $self->{nodes_view};
my $model = $view->get_model;
lib/Gtk2/Ex/Geo/Graph.pm view on Meta::CPAN
$model->foreach( \&select_in_selection, [$selection, $v->{index}]);
}
delete $self->{ignore_cursor_change};
}
$gui->{overlay}->render;
}
sub select_in_selection {
my($selection, $index) = @{pop()};
my($model, $path, $iter) = @_;
lib/Gtk2/Ex/Geo/Graph.pm view on Meta::CPAN
}
}
}
sub key_pressed {
my($overlay, $event, $user) = @_;
my $key = $event->keyval;
return unless $key == $Gtk2::Gdk::Keysyms{Delete};
my($self, $gui) = @{$user};
my @v;
my @e;
lib/Gtk2/Ex/Geo/Graph.pm view on Meta::CPAN
}
}
$self->{graph}->delete_vertices(@v);
$self->{graph}->delete_edges(@e);
$self->select();
$gui->{overlay}->render;
}
sub open_properties_dialog {
my($self, $gui) = @_;
}
lib/Gtk2/Ex/Geo/Graph.pm view on Meta::CPAN
return unless $u and $v;
print STDERR "sp $u->$v\n";
my @path = $self->{graph}->SP_Dijkstra($u, $v);
print STDERR "sp @path\n";
$self->selected_features(\@path);
#$gui->{overlay}->render;
}
## @ignore
sub min {
$_[0] > $_[1] ? $_[1] : $_[0];
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Gtk2/Ex/Geo/Dialogs/Colors.pm view on Meta::CPAN
my @color = split(/ /, $self->{colors_dialog}->get_widget('border_color_label')->get_text);
my $has_border = $self->{colors_dialog}->get_widget('border_color_checkbutton')->get_active();
@color = () unless $has_border;
$self->border_color(@color);
$self->hide_dialog('colors_dialog') if $close;
$gui->{overlay}->render;
}
##@ignore
sub cancel_colors {
my($self, $gui);
lib/Gtk2/Ex/Geo/Dialogs/Colors.pm view on Meta::CPAN
$self->grayscale_color(@{$self->{backup}->{grayscale_color}});
$self->border_color(@{$self->{backup}->{border_color}});
$self->hide_dialog('colors_dialog');
$gui->{overlay}->render;
1;
}
##@ignore
sub copy_colors {
lib/Gtk2/Ex/Geo/Dialogs/Colors.pm view on Meta::CPAN
$treeview->append_column($col);
}
$model->clear;
my @names;
for my $layer (@{$gui->{overlay}->{layers}}) {
next if $layer->name() eq $self->name();
push @names, $layer->name();
$model->set ($model->append(undef), 0, $layer->name());
}
lib/Gtk2/Ex/Geo/Dialogs/Colors.pm view on Meta::CPAN
if ($response eq 'ok') {
my @sel = $treeview->get_selection->get_selected_rows;
if (@sel) {
my $i = $sel[0]->to_string if @sel;
my $from_layer = $gui->{overlay}->get_layer_by_name($names[$i]);
if ($palette_type eq 'Color table') {
$table = $from_layer->color_table();
} elsif ($palette_type eq 'Color bins') {
$table = $from_layer->color_bins();
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Gtk2/Ex/WidgetCursor.pm view on Meta::CPAN
# GtkEntry's extra subwindow is included here. And when sensitive it should
# be put back to an insertion point. For a bit of safety use list context
# etc to allow for no subwindows, since it's undocumented.
#
# In Gtk 2.14 the SpinButton sub-class has the arrow panel as a subwindow
# too (instead of an overlay in Gtk 2.12 and earlier). So look for the
# smaller height one among multiple subwindows.
#
sub Gtk2::Entry::Gtk2_Ex_WidgetCursor_windows {
my ($widget) = @_;
my $win = $widget->window || return; # if unrealized
lib/Gtk2/Ex/WidgetCursor.pm view on Meta::CPAN
my @children = $win->get_children;
# by increasing height
@children = sort {($a->get_size)[1] <=> ($b->get_size)[1]} @children;
return ($children[0], 'xterm');
}
# GtkSpinButton's extra "panel" overlay window either as a "sibling" (which
# also finds the main window) for Gtk 2.12 or in the get_children() for Gtk
# 2.13; plus the GtkEntry subwindow as per GtkEntry above. hack_restore()
# inherited from GtkEntry above.
#
sub Gtk2::SpinButton::Gtk2_Ex_WidgetCursor_windows {
lib/Gtk2/Ex/WidgetCursor.pm view on Meta::CPAN
my $win = $widget->window || return; # if unrealized
return (_widget_sibling_windows ($widget),
$win->get_children);
}
# GtkButton secret input-only "event_window" overlay found as a "sibling".
#
sub Gtk2::Button::Gtk2_Ex_WidgetCursor_windows {
my ($widget) = @_;
return _widget_sibling_windows ($widget);
}
view all matches for this distribution