Scrolling text example
site_archiver@lists.apple.com Delivered-To: pro-apps-dev@lists.apple.com 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 dcardani@apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/pro-apps-dev/site_archiver%40lists.ap... This email sent to site_archiver@lists.apple.com
participants (1)
-
Darrin Cardani