A Message Board, Guestbook, or Poll hosted for your website.
4D SYSTEMS FORUM

Register Login New Posts Chat
4D Systems > Forums > 4DGL (4D Graphics Language) > problems with gfx_bitmap
 
Username:
Password:
 

Thread Tools  | Search This Thread 
Reply
 
Author Comment
 
Kirill_rf
Registered: 12/04/09
Posts: 4

Contact using ICQ

    07/11/09 at 05:47 AM
Reply with quote#1

I want to use gfx_bitmap to draw bitmap graphics for fast picture displaying at uOLED 32028P1.  I looked through the suggested examples in 4DGLworkshop,  but still I don't completely understand how it works. In particular, I wonder how to declare my own bitmap picture using #DATA blocks. Could someone give more information or better examples of using gfx_bitmap?

Kirill_rf
Registered: 12/04/09
Posts: 4

Contact using ICQ

    07/11/09 at 06:04 AM
Reply with quote#2

How to convert my monochrome pictures to hex-sequence format like that below:

    byte image16    // alien
        0x02, 0x10,
        0x3F, 0xFC, 0x40, 0x02, 0x80, 0x01, 0xBC, 0x3D,     
        0x98, 0x19, 0x98, 0x19, 0x81, 0x81, 0x81, 0x81,
        0x80, 0x01, 0x40, 0x02, 0x24, 0x24, 0x23, 0xC4,
        0x21, 0x84, 0x10, 0x08, 0x08, 0x10, 0x07, 0xE0                             
smcmanus
Avatar / Picture

Moderator
Registered: 19/03/07
Posts: 471

Contact using Skype

    07/11/09 at 10:56 AM
Reply with quote#3

Try the following:

#platform "uOLED-32028-P1T"
/*************************************************
* Filename: GFX_Bitmap.4dg
* Created: 2009/11/06
* Author:
* Description:
************************************************** /
#DATA
byte image16 // alien
0x02, 0x10,
0x3F, 0xFC, 0x40, 0x02, 0x80, 0x01, 0xBC, 0x3D,
0x98, 0x19, 0x98, 0x19, 0x81, 0x81, 0x81, 0x81,
0x80, 0x01, 0x40, 0x02, 0x24, 0x24, 0x23, 0xC4,
0x21, 0x84, 0x10, 0x08, 0x08, 0x10, 0x07, 0xE0
#END
func main()
var x,y;
repeat
x:=10;
y:=10;
while(x < 100)
gfx_Bitmap(image16, x, y, 0x07E0);
pause(20);
gfx_Bitmap(image16, x++, y++, 0x0000);
pause(20);
wend
pause(1000);
forever
endfunc


Steve


__________________
Any technology, sufficiently developed, is indistinguishable from magic. A.C. Clark(RIP)

NEW! Lower prices on all 4D Systems products for 2009!
http://shop.littlepcbsolutions.com
Previous Thread | Next Thread
Reply

 
Bookmarks
 
Digg Diggdel.icio.us del.icio.usStumbleUpon StumbleUponGoogle Google