To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.nxtOpen lugnet.robotics.nxt in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / NXT / 482
481  |  483
Subject: 
Re: NXC/NBC release news
Newsgroups: 
lugnet.robotics.nxt
Date: 
Thu, 15 Feb 2007 05:08:00 GMT
Viewed: 
13773 times
  
In lugnet.robotics.nxt, Alfonso Martone wrote:
Hi John!


I think there is not an urgent need for a clear-screen flag in a
bunch of NXT screen functions. That is, my sources are full of
"false," flags :-)

  TextOut(...,true,...);
  TextOut(...,false,...);
  TextOut(...,false,...);
  LineOut(...,false);
  LineOut(...,false);
  RectOut(...,false);
  CircleOut(...,false);

(well, I defined some macros to not to write that "false" dozens of
times) :-)

I would agree. I would prefer versions of the graphics commands that didn't
include the clear screen flag. The fact that LEGO designed the firmware to
require the flag with each of these doesn't mean it's needed in a high level
language.

Of course what would be nice is if instead if the clearscreen parameter there
was a possibility of including the *colour* of your text, circles, lines, etc.
We'd still have four parameters, but instead of one of them being useless, it
would be very useful. Unfortunately LEGO didn't include that in this version of
their firmware. We can only hope for a future version that includes this!

That's why there isn't a better way to clear out the text, by the way -- all the
commands only draw in black. Though writing text does clear the 6x8 pixel
rectangle that a character goes into. This is why you need to write a row of
spaces before overwriting older text. Be thankful that you can do it!

--
  David Schilling



Message has 1 Reply:
  RE: NXC/NBC release news
 
(...) In addition to the explicit flag on the opcodes, the NXT-G firmware also does an implicit clear of the screen the first time a user application program writes to the screen. So the macros could be hard-coded with 'false' and this parameter (...) (18 years ago, 15-Feb-07, to lugnet.robotics.nxt)

Message is in Reply To:
  Re: NXC/NBC release news
 
Hi John! I think there is not an urgent need for a clear-screen flag in a bunch of NXT screen functions. That is, my sources are full of "false," flags :-) TextOut(...,true,...); TextOut(...,false,...); TextOut(...,false,...); LineOut(...,false); (...) (18 years ago, 14-Feb-07, to lugnet.robotics.nxt)

6 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    
Active threads in NXT programmable brick

 
Verified and Trusted Team of Hackers
15 minutes ago
Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR