The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Graphics::Grid::Layout - layout

VERSION

version 0.001

SYNOPSIS

    use Graphics::Grid::Functions qw(:all);

    sub testlay {
        my $just = shift // "center";       

        push_viewport(viewport(
            layout => grid_layout(
                nrow => 1, ncol => 1,
                widths => unit(1, "inches"), heights => unit(0.25, "npc"),
                just => $just)));
        push_viewport(viewport(layout_pos_col => 0, layout_pos_row => 0));
        grid_rect();
        grid_text($just);
        pop_viewport(2)
    }

    for my $just (qw(center left_top right_top right_bottom left_bottom
                     left right bottom top)) {
        testplay($just);
    }

DESCRIPTION

A grid layout describes a subdivision of a rectangular region.

ATTRIBUTES

nrow

Number of rows in the layout.

ncol

Number of columns in the layout.

width

height

respect

Boolean value for whether row heights and column widths should respect each other.

METHODS

dims

cell_width($cell_indices)

Returns the width of a cell.

cell_height($cell_indices)

Returns the height of a cell.

width()

Returns the width of the layout (sum of widths) as a Graphics::Grid::UnitArithmetic object.

height()

Returns the height of the layout (sum of heights) as a Graphics::Grid::UnitArithmetic object.

SEE ALSO

Graphics::Grid

AUTHOR

Stephan Loyd <sloyd@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2018-2023 by Stephan Loyd.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.