> If I recall correctly, there were small forks in the viewer to handle both color 
>APIs to return 
> the palette back to normal after drawing the page, but the details are starting to 
>get a bit 
> fuzzy in my mind.

Looking at document.c, this is the save/restore of a page before and after a draw, 
which seems 
to no longer work on the 3.0-3.3 fork. 

/* Save the device's colors before drawing, so can later restore
   to original when done drawing record */
static void SaveDrawState (void)
{
    RGBColorType rgb;      
       
    /* OS 3.5 or greater. Use the good API's */
    if ( sysMakeROMVersion( 3, 5, 0, sysROMStageRelease, 0 ) <= GetOSVersion() )
        WinPushDrawState();
       
    /* OS 3.0-3.3. Store the draw state as a private deviceForeColors variable
       in document.c before rendering page */   
    else {
        WinSetColors( 0, &rgb, 0, 0 ); 
        deviceForeColors = rgb;
    }
} /* Restore the device's colors after done drawing record */
static void RestoreDrawState (void)
{
    /* OS 3.5 or greater. Use the good API's */
    if ( sysMakeROMVersion( 3, 5, 0, sysROMStageRelease, 0 ) <= GetOSVersion() )
        WinPopDrawState();
       
    /* OS 3.0-3.3. Restore the draw state from deviceForeColors variable */   
    else
        WinSetColors( &deviceForeColors, 0, 0, 0 );
}

Best wishes,
Robert

Reply via email to