Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: tiny bug in volume bar (fix)



Jon Burgess wrote:
> 
> Klaus Schmidinger wrote:
> 
> > With Current==Total the volume is already at its maximum value, so
> > there should be _no_ white part of the bar. It is therefore _wrong_
> > to call Fill() with a starting offset of Width-1.
> 
> I think it is a matter of taste. Drawing a zero-pixel fill from
> (width-1) to (width-1) should be the same as not doing a fill.

I just saw that my previous suggestion to change

    Fill(l + p, 0, Width - 1, Height - 1, clrWhite);
to
    Fill(l + p, 0, Width - l - p - 1, Height - 1, clrWhite);

was wrong, since at this level cBitmap::Fill() requires the explicit
edge coordinates (x1, y1, x2, y2). So using Width-1 as x2 is correct.

Doing a Fill() with x1=x2=width-1 should actually draw a one pixel wide
vertical white line.

> > The DVB device's OSD just ignores any drawing action outside the defined
> > areas, and so should the DXR3 device.
> 
> If this is the API you require then i'm sure the dxr3 osd can be made to
> fit with this expected behaviour.

Well, I have to admit that it isn't explicitly stated anywhere,
but cBitmap::Fill() handles this with

  for (int x = x1; x <= x2; x++)

which, in case x1 is larger than x2, just does nothing.
Maybe the DXR3 OSD implementation gets irritated if x1>x2?
But then again, this is all code that's handled inside the
core VDR stuff, so I don't see where the DXR3 plugin should be
involved here at all...

Klaus


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index