Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: AddColor() / SetColor()
Sascha Volkenandt wrote:
>
> Am Dienstag, 25. Mai 2004 08:11 schrieb Klaus Schmidinger:
> > This is already the case.
> > Take a look at cBitmap::DrawRectangle():
> >
> > if (x1 == 0 && y1 == 0 && x2 == width - 1 && y2 == height - 1)
> > Reset();
> >
> > and of course osd.h:
> >
> > void DrawRectangle(int x1, int y1, int x2, int y2, tColor Color);
> > ///< Draws a filled rectangle defined by the upper left (x1, y1) and
> > lower right ///< (x2, y2) corners with the given Color. If the rectangle
> > covers the entire ///< bitmap area, the color palette will be reset, so
> > that new colors can be ///< used for drawing.
>
> Ok this means if I have a cBitmap bm and want to set it into an area that has
> been drawn on before, I would do a DrawRectangle on the whole area bm covers
> with bm->Color(0) and then do DrawBitmap. Thanks for the Hint!:-)
>
> But wouldn't it make sense to do the same check (and possibly reset) in
> DrawBitmap, too? (Just a question)
You're right, this makes sense in any function that covers the entire bitmap.
I'll implement this in the next version.
Klaus
--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index