Graphics-Grid

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

            "Graphics::Color::RGB" : "0",
            "Import::Into" : "0",
            "List::AllUtils" : "0",
            "Math::Trig" : "0",
            "Module::Load" : "0",
            "Moose" : "0",
            "Moose::Role" : "0",
            "MooseX::HasDefaults::RO" : "0",
            "MooseX::StrictConstructor" : "0",
            "Path::Tiny" : "0",
            "Ref::Util" : "0",
            "Safe::Isa" : "0",
            "Scalar::Util" : "0",
            "Type::Library" : "0",
            "Type::Params" : "0",
            "Type::Utils" : "0",
            "Types::Standard" : "0",
            "boolean" : "0",
            "feature" : "0",
            "namespace::autoclean" : "0",
            "overload" : "0",

META.yml  view on Meta::CPAN

  Graphics::Color::RGB: '0'
  Import::Into: '0'
  List::AllUtils: '0'
  Math::Trig: '0'
  Module::Load: '0'
  Moose: '0'
  Moose::Role: '0'
  MooseX::HasDefaults::RO: '0'
  MooseX::StrictConstructor: '0'
  Path::Tiny: '0'
  Ref::Util: '0'
  Safe::Isa: '0'
  Scalar::Util: '0'
  Type::Library: '0'
  Type::Params: '0'
  Type::Utils: '0'
  Types::Standard: '0'
  boolean: '0'
  feature: '0'
  namespace::autoclean: '0'
  overload: '0'

Makefile.PL  view on Meta::CPAN

    "Graphics::Color::RGB" => 0,
    "Import::Into" => 0,
    "List::AllUtils" => 0,
    "Math::Trig" => 0,
    "Module::Load" => 0,
    "Moose" => 0,
    "Moose::Role" => 0,
    "MooseX::HasDefaults::RO" => 0,
    "MooseX::StrictConstructor" => 0,
    "Path::Tiny" => 0,
    "Ref::Util" => 0,
    "Safe::Isa" => 0,
    "Scalar::Util" => 0,
    "Type::Library" => 0,
    "Type::Params" => 0,
    "Type::Utils" => 0,
    "Types::Standard" => 0,
    "boolean" => 0,
    "feature" => 0,
    "namespace::autoclean" => 0,
    "overload" => 0,

Makefile.PL  view on Meta::CPAN

  "Graphics::Color::RGB" => 0,
  "Import::Into" => 0,
  "List::AllUtils" => 0,
  "Math::Trig" => 0,
  "Module::Load" => 0,
  "Moose" => 0,
  "Moose::Role" => 0,
  "MooseX::HasDefaults::RO" => 0,
  "MooseX::StrictConstructor" => 0,
  "Path::Tiny" => 0,
  "Ref::Util" => 0,
  "Safe::Isa" => 0,
  "Scalar::Util" => 0,
  "Test2::V0" => 0,
  "Type::Library" => 0,
  "Type::Params" => 0,
  "Type::Utils" => 0,
  "Types::Standard" => 0,
  "boolean" => 0,
  "feature" => 0,
  "namespace::autoclean" => 0,

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


        my @trees =
          map { Graphics::Grid::ViewportTree->new( node => $_ ) } @vps;
        $self->_current_vptree->add_children(@trees);
        $self->_current_vptree( $trees[-1] );
    };

    if ( $vp->$_isa('Graphics::Grid::Viewport') ) {
        &$push_node($vp);
    }
    elsif ( Ref::Util::is_arrayref($vp) ) {
        &$push_node(@$vp);
    }
    elsif ( $vp->$_isa('Graphics::Grid::ViewportTree') ) {
        my $t = $vp;
        $self->_current_vptree->add_child($t);

        # go right-then-down in the sub-tree
        while ( my $child_count = $t->child_count ) {
            $t = $t->get_child_at( $child_count - 1 );
        }

lib/Graphics/Grid/Types.pm  view on Meta::CPAN

package Graphics::Grid::Types;

# ABSTRACT: Custom types and coercions used by Graphics::Grid

use 5.014;
use warnings;

our $VERSION = '0.0001'; # VERSION

use Ref::Util qw(is_plain_arrayref);
use Type::Library -base, -declare => qw(
  UnitName Unit UnitArithmetic UnitLike
  GPar
  PlottingCharacter
  LineType LineEnd LineJoin
  FontFace
  Color
  Justification Clip
);

lib/Graphics/Grid/UnitArithmetic.pm  view on Meta::CPAN


has '+children' => (
    isa => ArrayRef [
        UnitArithmetic->plus_coercions( Any,
            sub {
                if ( $_->$_isa('Graphics::Grid::UnitArithmetic') ) {
                    return $_;
                }
                my $node = $_;
                unless ( $_->$_isa('Graphics::Grid::Unit')
                    or Ref::Util::is_arrayref($node) )
                {
                    $node = [$node];
                }
                return Graphics::Grid::UnitArithmetic->new( node => $node );
            }
        )
    ],
    coerce => 1,
);

lib/Graphics/Grid/UnitArithmetic.pm  view on Meta::CPAN

    }
};


method is_unit() {
    return $self->node->$_isa('Graphics::Grid::Unit');
}


method is_number() {
    return Ref::Util::is_arrayref( $self->node );
}


method is_arithmetic() {
    return !( $self->is_unit() or $self->is_number() );
}


method stringify() {
    if ( $self->is_unit ) {



( run in 0.540 second using v1.01-cache-2.11-cpan-4d50c553e7e )