> On Wed, 15 Sep 2004 14:33:12 +0200 "Nemec, Bernhar" writes:
> > >   The buffer engine's font scaling code is slightly borked
> > > anyway -- has been fixed in some secret work somewhere..
> > > 
> > 
> > Can you enlighten me on this? I don't see any difference to
> > the x11 engine, for example.
> > 
> > Bernhard
> > 
> 
>       For one, it's incorrectly setting the tmp image's color --
> should be set to 0 (as the x11 engine does).
>       But there are other potential problems with it, as indeed
> is also the case for the other engines, in its use of a new
> tmp context which only sets the context color, as there are
> potential uses of the clip, etc..
> 
>                       jose.
> 
        Well that was utterly confusing.. Now, that I've
managed to get some sleep, let me see if I can clear up
any confusion I may have caused here.

        First, it's not that it's not setting the image
pixels to 0 that is a problem -- they could be set to
anything so long as the pixels have alphas = 0.
        The problem is that the buffer engine's current
means to do this, ie. setting them to
         dc->col.col & 0xffffff
may not actually set the alpha component to 0 on some
machines -- or at least that's my concern with it.

        Ok, as to the "other potential problems"..
As far I can see, there are no actual 'problems'
with the rest of the code for this, in any of the
"common" based engines.
        The 'problems' I was referring to were in fact
caused by my own borked memory, and way too little
sleep in the last few days..

        I remembered that when I first went over this
part of the evas code, I was concerned about possible
un-initialized variables in the newly created context,
and I also remember that I ended up doing something
with the context clip, but couldn't recall exactly what.

        So, I just went over what I have and: no, there
were no problems with un-initialized variables -- this
had been very succintly taken care of by the use of the
calloc function -- and what I did was simply to add a
small optimization (when there's some clipping to be
done) by using a suitable clip derived from the input
context clip, that I passed to the new context that the
font drawing function uses, ie. set
  clx' = (ow * (clx - x)) / w; 
  clw' = 1 + ((ow * clw) / w);
etc.
        This limits the amount of text that gets drawn
to the tmp image to that which will actually get scaled
to lying within the context clip rect.
        But it's just an optimization issue, not a problem
with the current code's correctness.

        Hope that makes more sense :)



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
enlightenment-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to