Hi all,
Although I haven't gone through code of all the alternative solutions,
The "CGContextSetBlendMode"
-approach seems most appealing to me, because I think we will get the best
performance from it.
I think within vcl/aqua/source/ we should try to use as much native stuff
(Quartz & CG*) as possible and avoid mixing with generic OOo stuff....
Of course, we could use "::invertRect" as a fallback, if something does not
work, but is there any realistic likelihood for CGContext* not working and
still being able to successfully use "::invertRect" ?
Mox
On 2/14/07, Ismael <[EMAIL PROTECTED]> wrote:
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]
--
Mox on G