[squeak-dev] using color tables with forms and bitblt?
Bob Arning
arning315 at comcast.net
Sun Aug 5 14:07:16 UTC 2012
On 8/5/12 9:08 AM, Lawson English wrote:
> On 8/5/12 4:30 AM, Bob Arning wrote:
>> Maybe the VM folks will see the value in adding this or maybe you
>> could write a plugin.
> Actually, I've been looking at the BitBltPlugin.c source (it
> apparently isn't written in slang?) but...
Well, it certainly *was* ....
loadColorMap
"ColorMap, if not nil, must be longWords, and
2^N long, where N = sourceDepth for 1, 2, 4, 8 bits,
or N = 9, 12, or 15 (3, 4, 5 bits per color) for 16 or 32 bits."
| cmSize oldStyle oop cmOop |
self inline: true.
cmFlags _ cmMask _ cmBitsPerColor _ 0.
cmShiftTable _ nil.
cmMaskTable _ nil.
cmLookupTable _ nil.
cmOop _ interpreterProxy fetchPointer: BBColorMapIndex ofObject:
bitBltOop.
cmOop = interpreterProxy nilObject ifTrue:[^true].
cmFlags _ ColorMapPresent. "even if identity or somesuch - may be
cleared later"
oldStyle _ false.
(interpreterProxy isWords: cmOop) ifTrue:[
"This is an old-style color map (indexed only, with implicit
RGBA conversion)"
cmSize _ interpreterProxy slotSizeOf: cmOop.
cmLookupTable _ interpreterProxy firstIndexableField: cmOop.
oldStyle _ true.
] ifFalse: [
"A new-style color map (fully qualified)"
((interpreterProxy isPointers: cmOop)
...snip...
Can't think why that would change, but don't know how to verify these days.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20120805/779e81b1/attachment.htm
More information about the Squeak-dev
mailing list
|