Re: OMBitMap ...

From: PRADEEP RAMACHANDRAN <arpradeep@lycos.com>
Date: Tue Sep 04 2001 - 08:34:14 EDT

Thanks Don, I coud not have had a more detailed explanation.

I should have figured it by myself, but I was caught up in some
other issues.

Regards,
Pradeep.

--
On Thu, 30 Aug 2001 13:47:51  
 Donald Dietrick wrote:
>Hi Pradeep,
>
>There isn't a height and width restriction on OMBitmaps, but you do have 
>to be careful about the byte array that is used for one.  The OMBitmap 
>is based on an X bitmap, not a Windows bmp file.  Each bit of the bytes 
>corresponds to a pixel.  If the height and/or width of the bitmap isn't 
>a multiple of 8, you have to round up the number of bytes used so that 
>the excess bits are covered in that extra byte for the row.
>
>So, for a 4x4 bitmap, you need:
>
>ooooxxxx|ooooxxxx|ooooxxxx|ooooxxxx -> 4 bytes, where x's are the bits 
>being used for the bitmap ( and whether they are 1 or 0 dictates either 
>foreground or background color), and o's are the leftover bits (they are 
>ignored).  The '|' are byte boundaries.
>
>The bits, per byte,  look like they are used in reverse order because 
>they are - least significant bit, per byte, is used in that order.
>
>For a 6x6 bitmap:
>
>ooxxxxxx|ooxxxxxx|ooxxxxxx|ooxxxxxx|ooxxxxxx|ooxxxxxx
>
>for a 10x10 bitmap
>
>xxxxxxxx|ooooooxx|xxxxxxxx|ooooooxx|xxxxxxxx|ooooooxx|xxxxxxxx|ooooooxx|xxxxxxxx|
>ooooooxx|xxxxxxxx|ooooooxx|xxxxxxxx|ooooooxx|xxxxxxxx|ooooooxx|xxxxxxxx|ooooooxx|
>xxxxxxxx|ooooooxx
>
>The DemoLayer bitmap is confusing because it uses a multiple of 8 as a 
>side, and the subtleties are hidden.
>
>I'm going to add the above explaination to the OMBitmap documentation.
>
>Hope this helps,
>
>Don
>
>
>
>On Wednesday, August 29, 2001, at 09:40 AM, PRADEEP RAMACHANDRAN wrote:
>
>> Hello,
>>
>> Are there minimum height,width restrictions while
>> creating an OMBitMap.
>>
>> Changing the OMBitMap in the Demo Layer to use a
>> 4 x 4 pixel height/width throws up an
>> ArrayIndexOutOfBoundsException ...
>>
>> Regards,
>> Pradeep.
>>
>>
>>
>>
>>
>> Get 250 color business cards for FREE!
>> http://businesscards.lycos.com/vp/fastpath/
>>
>> --
>> [To unsubscribe to this list send an email to "majdart@bbn.com"
>> with the following text in the BODY of the message "unsubscribe 
>> openmap-users"]
>>
>
>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>Donald F. Dietrick, dietrick@bbn.com
>BBN Technologies, 10 Moulton Street, Cambridge, MA 02138
>617.873.3031 FAX 2794
>=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/
--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Sep 4 08:36:21 2001

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:31 EDT