Set an offscreen pixelmap color table to the ctseed value of a graphic device
The intent is to poke the ctseed value of the graphic device into the offscreen pixel maps color table. I hope I explained that correctly.
Copybits checks the seed values and if they are the same then copybits does not perform coloration between different depths. Which also means copybits blits faster.
The list I am drawing with a gworld is lacking speed and I'm looking for speed anywhere I can get it.
Well, it looks like I've answered my own question. To the best of my knowledge I turned this line...
(*((*gOffscreenPixels)->pmTable))->ctseed = (*((*((*(GetGDevice()))->gdPMap))->pmTable))->ctSeed
LOCAL FN fixCTSeed(theGWorld&)END FN
pixMap& = 0
worldPixMap& = 0
monitor& = FN GETGDEVICE 'get current monitor record
pixMap& = monitor&..gdPMap& 'get the monitors pixMap
LONG IF (pixMap&) 'good map?
worldPixMap& = FN GETGWORLDPIXMAP(theGWorld&)' get gworld pix map
LONG IF worldPixMap& 'good map?
gDevPmTable& = pixMap&..pmTable& 'get monitor pm table
clrTblSeed& = gDevPmTable&..ctSeed& 'get monitor seed value
gWorldPmTable& = worldPixMap&..pmTable& 'get world pm table
'& gWorldPmTable&..ctSeed&,clrTblSeed& ' made gworld seed vale same as monitor
tstWrldSeed& = gWorldPmTable&..ctSeed& 'get seed value
'clrTblSeed& = pixMap&..pmTable&..ctSeed& 'get seed value
'& theGWorld&..pmTable&..ctSeed&,clrTblSeed&' made gworld seed vale same as monitor
'PRINT %(10,10) clrTblSeed&,tstWrldSeed&,gResizeCnt&
When I used it, I didnt know what the ctSeed for the gdDevice (screen) or the gWorld.
clrTblSeed& is the ctSeed for the gdDevice and tstWrldSeed& is for the gWorld.
After printing both values I found they were the same anyway, since I'm currently only testing on one monitor. Multiple monitors are next on the list.
If anyone has a desire to use this, you would just need to comment out the tstWrldSeed& since it was just used for testing and uncomment
Unfortunately, I couldnt just use
clrTblSeed& = pixMap&..pmTable&..ctSeed&
because the compille complained that I could only use this statement witn an application include (this code is for a code resource). It had me baffled for minute or two, then I decided to break it down to simpler terms to see if it would work and it did.
If you need it, its there.