<DIV><FONT face=arial>Hi,</FONT></DIV>
<DIV><FONT face=arial></FONT>&nbsp;</DIV>
<DIV><FONT face=arial>I am a bit confused about the color mapping of BitBlt, esp. mapping (from 32 bits) to 1 bit (for From &gt;&gt; stencil). Checking the sources (in 3.7) gave me the following "hints"</FONT></DIV>
<DIV><FONT face=arial></FONT>&nbsp;</DIV>
<DIV><FONT face=arial>1. From the comment of BitBlt:</FONT></DIV>
<DIV><FONT face=courier>... When blitting from a 32 or 16 bit deep Form to one 8 bits or less, the default is truncation...<BR></FONT></DIV>
<DIV><FONT face=arial>2. From Color class &gt;&gt; colorMapIfNeededFrom: sourceDepth to: destDepth</FONT></DIV>
<DIV><FONT face=courier>... (sourceDepth &gt;= 16) &amp; (destDepth &gt;= 16) ifTrue: [<BR>&nbsp;&nbsp;"mapping is done in BitBlt by zero-filling or truncating each color component"<BR>&nbsp;&nbsp;^ nil].</FONT></DIV>
<DIV><FONT face=courier></FONT>&nbsp;</DIV>
<DIV><FONT face=arial>3. Color class &gt;&gt; computeRGBColormapFor: destDepth bitsPerColor: bitsPerColor</FONT></DIV>
<DIV><FONT face=courier>...&nbsp;(#(3 4 5) includes: bitsPerColor)<BR>&nbsp;&nbsp;ifFalse: [self error: 'BitBlt only supports 3, 4, or 5 bits per color component'].<BR></FONT></DIV>
<DIV><FONT face=arial>For a simple test I inserted</FONT></DIV>
<DIV><FONT face=arial>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT face=Courier>&nbsp;depth &gt;= 16&nbsp;ifTrue: [^nil].</FONT></FONT></DIV>
<DIV><FONT face=arial>into Color &gt;&gt; maskingMap: depth. And all my stencil tests ran fine.<BR></FONT></DIV>
<DIV>Can anyone could please give me a hint how the color mapping of BitBlt really works? Thanks a lot</DIV>
<DIV>&nbsp;</DIV>
<DIV>Rudi</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV><p>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam?  Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com