Re: Fixes to the Drawing code
Marc Strämke <[email protected]> Mon, 08 Sep 2003 17:01:55 +0200
| Newsgroups | gmane.comp.embedded.stk.gui.devel |
|---|---|
| Message-ID | <[email protected]> |
first of all: Have you looked at the new code before you wrote this? :) Darren Vincent Hart wrote: > Welcome back Marc! *gggg* > > On Mon, 2003-09-08 at 04:40, Marc Strämke wrote: > >>Hi team, >>While Fixing the Framebuffer Surface class i've stumbled across a few >>problems. >>1. Clip rect was basicly always set to the size of the widget beeing >>drawn, this means that each redraw the whole screen is redrawn because >>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. I disagree in this point, redraw_rect should in my eyes be used to determine which drawing routines get called, but clipping should be used to limit the amount of drawing done and to speed up rendering. > > >>2. There "was" some code in container which added the area of all childs >>widgets intersecting with the redraw_rect given to the redraw_rect, imo >>this is highly unnecesary because they get redrawn anyway and with the >>clip_rectangle they'll be clipped to only update the part which has changed. > > > 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 >>changed should be in cvs, together with the preliminary Spreadsheet widget > > > Y los *scroll_bars*, por donde andan? Translation please? :) > > Darren > > >> >> >>_______________________________________________ >>Libstk mailing list >>Libstk@Óq«LD" >>http://www.dvhart.com/cgi-bin/mailman/listinfo/libst > > k