<commit_before>
# $Id$

=head1 NAME

SDL::LCD - A LCD object

=head1 SYNOPSIS

    # create an LCD
    lcd = new 'SDL::LCD'

    # set the LCD position
    lcd."xpos"( 10 )
    lcd."ypos"( 10 )

    # set the LCD content
    lcd = "-01:23.4"

    # draw the LCD
    lcd."draw"( screen )

=head1 DESCRIPTION

Displays a liquid crystal display (LCD) with a variable
number of digits. Supported are 0-9, a-f, ".", ":", "-" and blanks.

Each digit is 10 pixels width, plus 2 pixels space between the digits.
The height of each digit is 21 pixels.

=head1 METHODS

An SDL::LCD object has the following methods:

=over 4

=cut

.namespace ["SDL::LCD"]

.sub __onload :load
    .local pmc class
    class = get_class 'SDL::LCD'
    if_null class, create_class
    .return()

  create_class:
    load_bytecode 'library/SDL/Image.pir'
    load_bytecode 'library/SDL/Rect.pir'

    .local pmc digits
    digits = new 'SDL::Image'
    digits.'init'( 'runtime/parrot/library/SDL/LCD.png' )
    global 'digits' = digits

    newclass class, 'SDL::LCD'
    addattribute class, 'value'
    addattribute class, 'numdigits'
    addattribute class, 'xpos'
    addattribute class, 'ypos'
END:
.end

.sub init :vtable :method<commit_msg>[pdd30install] Shorten library path, 'library/' prefix unnecessary. For TT #123 (Reini Urban).<commit_after>
# $Id$

=head1 NAME

SDL::LCD - A LCD object

=head1 SYNOPSIS

    # create an LCD
    lcd = new 'SDL::LCD'

    # set the LCD position
    lcd."xpos"( 10 )
    lcd."ypos"( 10 )

    # set the LCD content
    lcd = "-01:23.4"

    # draw the LCD
    lcd."draw"( screen )

=head1 DESCRIPTION

Displays a liquid crystal display (LCD) with a variable
number of digits. Supported are 0-9, a-f, ".", ":", "-" and blanks.

Each digit is 10 pixels width, plus 2 pixels space between the digits.
The height of each digit is 21 pixels.

=head1 METHODS

An SDL::LCD object has the following methods:

=over 4

=cut

.namespace ["SDL::LCD"]

.sub __onload :load
    .local pmc class
    class = get_class 'SDL::LCD'
    if_null class, create_class
    .return()

  create_class:
    load_bytecode 'SDL/Image.pir'
    load_bytecode 'SDL/Rect.pir'

    .local pmc digits
    digits = new 'SDL::Image'
    digits.'init'( 'runtime/parrot/library/SDL/LCD.png' )
    global 'digits' = digits

    newclass class, 'SDL::LCD'
    addattribute class, 'value'
    addattribute class, 'numdigits'
    addattribute class, 'xpos'
    addattribute class, 'ypos'
END:
.end

.sub init :vtable :method
{'fraction_non_alphanumeric': 0.11804721888755502, 'fraction_numerical': 0.018807523009203683, 'mean_word_length': 2.97456279809221, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2868331', 'n_tokens_mistral': 984, 'n_tokens_neox': 876, 'n_words': 290}