The third possibility, is using the deprecated invertRect as i saw in win implementation.
Here's the main lines of the win implementation:
void WinSalGraphics::invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags )
{
        if ( nFlags & SAL_INVERT_TRACKFRAME )
        {
                [...]
        }
        else if ( nFlags & SAL_INVERT_50 )
        {
                [...]
        }
        else
        {
                 RECT aRect;
                 aRect.left      = (int)nX;
                 aRect.top               = (int)nY;
                 aRect.right     = (int)nX+nWidth;
                 aRect.bottom    = (int)nY+nHeight;
                 ::InvertRect( mhDC, &aRect );
        }
}

Ericb, i let you implement it, as i'm working on the crash of calc.

Ismael MERZAQ

eric b a écrit :
Hi Mox,

Le 14 févr. 07 à 14:32, Mox Soini a écrit :

Hi Eric,

Looks nice except this is unnecessarely complex:

+ aRect.size.width = static_cast<float>( nX)
+static_cast<float>(nWidth) - static_cast<float>(nX);
+ aRect.size.height =
static_cast<float>(nY)+static_cast<float>(nHeight) -
static_cast<float>(nY);

instead, just maybe use:

+ aRect.size.width = static_cast<float>(nWidth);
+ aRect.size.height = static_cast<float>(nHeight);



Yes, of course, but that's not the point : In fact, 3 SAL_INVERT_* possibilities are existing, and my change is not complete (nor Sebastien's one )

To make short,
- complete inversion
- 50% ( one pixel over two )
- not sure about the third one :)


Ismael is working on a more complete implementation.


Last, thanks for your test  :)


Regards,
Eric





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to