LCDproc development and user support list

Text archives Help


[Lcdproc] bounding box


Chronological Thread 
  • From: joris AT robijn.net (Joris Robijn)
  • Subject: [Lcdproc] bounding box
  • Date: Tue Jul 29 18:13:01 2003

On 29 Jul 2003 at 16:11, David GLAUDE wrote:

>
> Joris Robijn wrote:
> > I've had some discussions with Michael Frase about the bounding box and
> > the rendering process. Michael said he wanted to work on the rendering
> > process, and to enable him to do that I need to get the bounding box
> > function into the API. It would become:
>
> What hardware is Michael using for the test?
>
> That or those driver need to be adapted ASAP.

Yes I will adapt all or at least the most used drivers too.

> In order to avoid a big period of time where 0.5 will be broken for most
> driver, it would be nice to freeze and make downloadable a nightly build
> so that if CVS or new nighlty build are broken, it is still possible to
> have one of the latest working 0.5 (without that nice feature).

It should be committed as one thing. Then there is no problem (if it's
done properly of course)

> > int _set_box (int left, top, right, bottom);
>
> Is this a "protection" box that garanted I can not write outside of
> boundary box (nor above, nor below) but does not change the fact that
> coordonate (2,4) is still the physical (2,4)?

Correct. No offset is introduced in the driver, to keep things simple.

> Now how do we reset the _set_box to the default value?

By doing set_box(1, 1, width, height). The rendering process should do
this when it renders the current screen, and call it with other values
when it renders a frame.

> Are the left/top/right/bottom included or excluded (is it [left,right]
> or ]left,right[ or [left,right[ ...

Yes. a || b || c || d ;)
But seriously: all included. The values are the minimally/maximally
allowed values. 1-based, like all coordinates.

> Is it not a good time to choose between (0,0) or (1,1) to be the top
> because it seems most driver do -1 or +1 when they receave parameter?

You think we should change that ? I've just got used to 1-based
coordinates everywhere.

> Is there any reason why this thing can not be done in central server
> code? If it is only a filtering, then what is the problem.

No that's what we have dicussed about the frames. It's about widgets
bigger than one char (bars, icons, bignums). They _should_ be cut by the
driver, because the rendering code simply _cannot_ do this.

> Other option, if that filtering is possible to do without knowledge of
> the driver internal, then a generic solution can be found for all driver.

If you know a way to do that :)

> > This area would from that moment on be the 'enabled area'. Only in that
> > area placements of characters and icons would actually occur. Just like
> > Adobe Photoshop does that :)
>
> I don't know about Photoshop, maybe you are talking about a Gimp clone?
> Is there a patent on that feature?

Adobe Photoshop = the standard in DeskTop Publishing. If anyone has
patented the idea of a rectangular selection, I'm going mad.

In Adobe Photoshop, when you have selected an area of you image, you can
only draw/delete/modify in that area.

> Ok for the rush...
>
> But a description of how it will work and how it worked before would
> help the debate:

Ok, sorry, I presumed it known because we had already discussed it a lot
in the past. I guess I should have freshed it up first. And from what you
have commented so far it's already clear that there are many ways you can
implement it.

> set_box (2, 2, 10, 3);
> set_icone(15,4,HEARTBEAT);

Nothing on LCD because all the characters of the icon are outside of the
indicated area. Although set_box should only need to be called once when
a screen or frame is starting to be rendered, not before every widget.

> Actually I take 2 weeks of vacation starting from friday, so it might be
> short to adapt any driver I usualy care for. ;-)
> Except if it is really rushed and exchange with my family 2 week without
> laptop/internet against a night of LCDproc coding...

Ah you have something to trade with :)

I guess it's easier if I do that. But if you want to do that, it's easy.
I can send you a modified lcd.h... Then this needs to be done: add
_set_box to the driver, add box variables to driver, add code to check
the box in _char and _string. _string is not as the easy as char because
it requires string cutting when a part of the string is outside the box.

Let me wish you a good vacation already.

Joris
--
Joris Robijn
<joris AT robijn.net>
Mobile: 06 288 41 964

// To understand recursion, we must first understand
recursion





Archive powered by MHonArc 2.6.18.

Top of page