Re: Fixes to the Drawing code

Darren Vincent Hart <[email protected]> Mon, 08 Sep 2003 08:32:09 -0600
Newsgroups gmane.comp.embedded.stk.gui.devel
Message-ID <1063031480.2492.86.camel@sway>
Welcome back Marc!  *gggg*

On Mon, 2003-09-08 at 04:40, Marc Str=C3=A4mke wrote:
> Hi team,
> While Fixing the Framebuffer Surface class i've stumbled across a few=20
> problems.
> 1. Clip rect was basicly always set to the size of the widget beeing=20
> drawn, this means that each redraw the whole screen is redrawn because=20
> state's rect is the size of the screen

Hmmmmm... you're right, it does, it shouldn't, but it does.  clip_rect
and redraw_rect are different things, but (after taking a look at the
current code) we aren't using them correctly.  clip_rect should be used
to *prevent* drawing out of bounds, redraw_rect should be used to
determine *how much* of the screen get's redrawn at a time.

> 2. There "was" some code in container which added the area of all childs=20
> widgets intersecting with the redraw_rect given to the redraw_rect, imo=20
> this is highly unnecesary because they get redrawn anyway and with the=20
> clip_rectangle they'll be clipped to only update the part which has chang=
ed.

The clip_rect is a safety measure, all the calls to draw still get made,
we should be using redraw_rect to determine how much of the current
get's redrawn (thereby avoiding making the unnecessary calls
altogether).

> 3. The FBdev backend was highly broken *g*

Understatement of the week!  It didn't do a darn thing!  *gggg*

> Please comment on these issues, i'd like to get some feedback, my=20
> changed should be in cvs, together with the preliminary Spreadsheet widge=
t

Y los *scroll_bars*, por donde andan?

Darren

>=20
>=20
>=20
> _______________________________________________
> Libstk mailing list
> [email protected]
> http://www.dvhart.com/cgi-bin/mailman/listinfo/libstk