Scrolling text example
Scrolling text example
- Subject: Scrolling text example
- From: Darrin Cardani <email@hidden>
- Date: Wed, 9 Mar 2011 09:39:08 -0800
Yesterday Rainer asked a question about the Scrolling Rich Text example, and it turns out he found a bug. Luckily, we had an NSCoder meeting in our area last night, so we sat down together and figured out a fix. The problem was that when rendering in 32-bit per channel modes in FCP, the results would be a solid green rectangle rather than colored text on a white background. I had originally thought this was due to a Y'Cb'Cr buffer having all 0s in it being displayed in RGB. However, it turned out it was a byte order issue instead. The fix (shown below) is to create the 32-bit per channel CGContext with host 32-bit byte order rather than the default byte order.
Begin forwarded message:
> Hi Darrin,
>
> thanks again for looking into that green render problem again last night.
>
> Here is what seems to help the problem, in - (NSGraphicsContext*) _graphicsContextForFxBitmap: (FxBitmap*) bitmap
>
> // ...and byte order...
> if (isFloat)
> bitmapInfo |= kCGBitmapByteOrder32Host;
> else
> bitmapInfo |= kCGBitmapByteOrderDefault;
>
> replacing this line:
>
> bitmapInfo |= kCGBitmapByteOrderDefault;
>
>
> So far, that seems to help that problem. Does this sync with your fix?
>
> Thanks,
>
> Rainer
--
Darrin Cardani
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden