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

NAME

Graphics::Raylib::Text - Output text to window

VERSION

version 0.007

SYNOPSIS

    use strict;
    use warnings;

    use Graphics::Raylib;
    use Graphics::Raylib::Color;
    use Graphics::Raylib::Text;


    my $i = 0;
    my $text = Graphics::Raylib::Text->new(
        color => Graphics::Raylib::Color::DARKGRAY,
        size => 20,
    );

    while (!$g->exiting)
    {
        $text->text = "Generation " . ($i++);

        Graphics::Raylib::draw {
            $g->clear(Graphics::Raylib::Color::BLACK);
            $text->draw;
        };
    }

METHODS AND ARGUMENTS

new( text => $text, color => $color, pos => [$x, $y], size => [$width, $height] )

Constructs a new Graphics::Raylib::Text instance. Position defaults to [0,0] and size to 10.

new( text => $text, color => $color, pos => [$x, $y], size => [$width, $height], font => $font, spacing => $spacing )

Constructs a new Graphics::Raylib::Text instance. Position defaults to [0,0] and size to 10.

new( text => $text, color => $color, pos => [$x, $y], size => [$width, $height], font => $font, spacing => $spacing )

Constructs a new Graphics::Raylib::Text instance. Position defaults to [0,0] and size to 10.

PREDEFINED OBJECTS

FPS

An already constructed Graphics::Raylib::Text, that draws FPS to the top left corner.

GIT REPOSITORY

http://github.com/athreef/Graphics-Raylib

SEE ALSO

Graphics::Raylib Graphics::Raylib::Color

AUTHOR

Ahmad Fatoum <athreef@cpan.org>, http://a3f.at

COPYRIGHT AND LICENSE

Copyright (C) 2017 Ahmad Fatoum

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