Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 2 of 2
  1. #1
    Robert.Moser@med.va.gov
    Guest

    RE: Overlay idea

    Dean wrote:
    > My concern about this would be about performance.


    We would probably get better performance out of an object than we would out
    of parsing XML each time we did a screen refresh.

    The more I think about it, returning a screen object probably isn't the
    right thing to do. The client object should probably contain a screen
    object. Then a module wanting to write its text to the screen would do
    something like this:

    $client->screen->clear();
    $client->screen->addText("This is line one\nThis is line two\n");
    $client->screen->addText("vfD_rightarrow_Vfd"
    ,{'v-align' => 'bottom'
    ,'h-align' => 'right'};

    Which would result in a screen like:
    +--------------------------------+
    |This is line one |
    |This is line two >|
    +--------------------------------+

  2. #2
    Gadfly, Former Founder Slim Devices dean's Avatar
    Join Date
    Apr 2005
    Location
    San Francisco, CA
    Posts
    4,427

    Re: Overlay idea

    It might make more sense for the screen object to be used to composite
    screens, then have that object generate the XML (or whatever)
    stringified output, which would get translated into the raw VFD
    commands.

    The screen object would just be a helper app that helped build the text
    representation:

    my $screen = Slim:isplay::Screen::new();
    $screen->addText("This is line one\nThis is line two\n");
    $screen->screen->addText("vfD_rightarrow_Vfd"
    ,{'v-align' => 'bottom'
    ,'h-align' => 'right'};

    Slim:isplay::Animation::showBriefly($client, $screen->xml);



    On Dec 8, 2003, at 9:32 AM, Robert.Moser (AT) med (DOT) va.gov wrote:

    > Dean wrote:
    >> My concern about this would be about performance.

    >
    > We would probably get better performance out of an object than we
    > would out
    > of parsing XML each time we did a screen refresh.
    >
    > The more I think about it, returning a screen object probably isn't the
    > right thing to do. The client object should probably contain a screen
    > object. Then a module wanting to write its text to the screen would do
    > something like this:
    >
    > $client->screen->clear();
    > $client->screen->addText("This is line one\nThis is line two\n");
    > $client->screen->addText("vfD_rightarrow_Vfd"
    > ,{'v-align' => 'bottom'
    > ,'h-align' => 'right'};
    >
    > Which would result in a screen like:
    > +--------------------------------+
    > |This is line one |
    > |This is line two >|
    > +--------------------------------+
    >

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •