hello
I have a problem where use of REALbasic DrawPicture will sometimes
lock up other canvases on the screen when the Window gets resized.
So what I am looking for here is what state the REALbasic DrawPicture
tampers with that I have to restore after
calling it.
if((gREALbasicVersion >= 2005.0))
{
GDHandle origDev;
GWorldPtr origPort;
GetGWorld(&origPort ,&origDev);
EgraphicsUseOldRendererSetter(g->m_Graphics,true); // Having only
this one does not cause lock
// Commenting out this one will fix locking sittuation
EGraphicsDrawPicture(
g->m_Graphics,
m_pPicture->m_pPicture,
CellRect->left + m_pPicture->m_Left-iExtra,
CellRect->top + m_pPicture->m_Top,
picDescription.width,
picDescription.height,
0,
0,
picDescription.width,
picDescription.height);
SetGWorld(origPort,origDev);
// Apparently restoring the port is not enough
// The question here is what more do I need to restore ?
}
else
{
// Code for old REALbasic versions (works perfectly but does not
support Masks)
// This code also works perfectly on new REALbasic versions,
but was replaced to add support for masks
Rect picRect;
RGBColor oldBackColor;
picRect.left = CellRect->left + m_pPicture->m_Left-iExtra;
picRect.top = CellRect->top + m_pPicture->m_Top;
picRect.right = picRect.left + picDescription.width;
picRect.bottom = picRect.top + picDescription.height;
GetBackColor(&oldBackColor);
RGBForeColor(&(RGBColor) { 0x0000, 0x0000, 0x0000 });
RGBBackColor(&(RGBColor) { 0xFFFF, 0xFFFF, 0xFFFF });
EDrawPicturePrimitive(m_pPicture->m_pPicture, &picRect, m_pPicture-
>Transparent);
RGBBackColor(&oldBackColor);
}
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>