[EMAIL PROTECTED] writes:
> It looks to me like LPtoDP is just doing a linear transform, so the area should
> be preserved - the rectangle should be empty after the transform if and only if
> it is empty before the transform.
>
> Or am I missing something? Is there another reason to move the IsRe
> That looks better yes; it's still a bit complex IMO, but I'm not sure
> it's possible to do much better with that glyph index thing. Still I'm
> wondering if you shouldn't do the IsRectEmpty check after the LPtoDP
> and coordinates swap.
It looks to me like LPtoDP is just doing a linear trans
[EMAIL PROTECTED] writes:
> if(flags & (ETO_CLIPPED | ETO_OPAQUE)) {
> if(!lprect) {
> if(flags & ETO_CLIPPED) {
> if(glyphs != wstr) HeapFree(GetProcessHeap(), 0, glyphs);
> return FALSE;
> }
> GetTextExtentPointI(hdc, glyphs, count, &sz)
> But then you are doing extra work for the "normal" case, and you are
> also making the code less readable; not a good trade-off IMO.
Well --- trading a memory allocation for an extra comparision instruction makes
it a bit trickier to decide, but I take your point.
> You
> could always move
[EMAIL PROTECTED] writes:
> Well, it was intended as an optimization - if we move the check down to the "if
> (flags & (ETO_CLIPPED) ..." clause, we may end up doing a HeapAlloc, and calls
> to GetGlyphIndices and GetObject that we don't need to do. I'd much rather bail
> out as soon as we can an
> It would be better IMO to do that as part of the clip rectangle
> calculation a few lines below.
Well, it was intended as an optimization - if we move the check down to the "if
(flags & (ETO_CLIPPED) ..." clause, we may end up doing a HeapAlloc, and calls
to GetGlyphIndices and GetObject that
[EMAIL PROTECTED] writes:
> (See attached file: patch_xrender_abort_if_clipped.txt)
It would be better IMO to do that as part of the clip rectangle
calculation a few lines below.
--
Alexandre Julliard
[EMAIL PROTECTED]
On Tue, 7 Oct 2003 [EMAIL PROTECTED] wrote:
Nit: why not use IsRectEmpty() ?
--
Dimi.