This site is no longer active and is available for archival purposes only. Registration and login is disabled.

How to display a bitmap ?


How to display a bitmap ?

Postby MetsDuManche » Jul 9, 2007 @ 11:59am

Hello,

I'm new in this forum, and new in Edge Lib development. So my question may appear a newbee's one, I'm sorry :)

I need this library to create a rich interface for our mobile software, that may work on the largest scope of phones. I was considering a Java ME development, but it doesn't seem to be able to let me do what I want.

I do believe Edge will be the best choice. I could install the SDK, and start trying to program, using the samples. It works with the emulator and with my phone too (HTC P3600). That's great.

But It's long to understand well how it works. Could you give me a help so that I may display a picture somewhere on the screen ? How can I display a picture 1) from a file on disk and 2) from a file in project resources ? I'm using Visual Studio 2005.

Thanks a lot for your help.
Jean-Michel CAMBOT
StoreXperience.com
MetsDuManche
pm Member
 
Posts: 13
Joined: Jul 9, 2007 @ 11:21am


Postby edge » Jul 9, 2007 @ 1:51pm

EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby MetsDuManche » Jul 9, 2007 @ 2:13pm

Jean-Michel CAMBOT
StoreXperience.com
MetsDuManche
pm Member
 
Posts: 13
Joined: Jul 9, 2007 @ 11:21am


Postby edge » Jul 9, 2007 @ 2:17pm

EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby MetsDuManche » Jul 9, 2007 @ 2:25pm

Jean-Michel CAMBOT
StoreXperience.com
MetsDuManche
pm Member
 
Posts: 13
Joined: Jul 9, 2007 @ 11:21am


Postby edge » Jul 9, 2007 @ 2:35pm

EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby MetsDuManche » Jul 9, 2007 @ 2:44pm

Jean-Michel CAMBOT
StoreXperience.com
MetsDuManche
pm Member
 
Posts: 13
Joined: Jul 9, 2007 @ 11:21am


Postby MetsDuManche » Jul 9, 2007 @ 3:13pm

Jean-Michel CAMBOT
StoreXperience.com
MetsDuManche
pm Member
 
Posts: 13
Joined: Jul 9, 2007 @ 11:21am


Postby MetsDuManche » Jul 9, 2007 @ 3:57pm

Jean-Michel CAMBOT
StoreXperience.com
MetsDuManche
pm Member
 
Posts: 13
Joined: Jul 9, 2007 @ 11:21am


Postby edge » Jul 10, 2007 @ 9:35am

Hi,

Good to know it worked. For the emulator this may be more complicated as you need to copy the file. Perhaps you can try creating a .CAB setup file of your application including the bitmap picture. Examples and programs needed to create .CAB files are present in the EDGELIB SDK samples.

For transparency set the colorkey. When blitting specify EFX_COLORKEY as a flag. To colorize the font add EFX_COLORIZE as a flag and add an additional parameter with the color you like to use. Because EDGELIB uses rasterized fonts, it's not possible to draw it in different sizes.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby MetsDuManche » Jul 10, 2007 @ 12:49pm

Thanks again for your answer.
Transparency works using this flag, it's perfect. I could change the color of the font too.

I had to check the PNT value received by the onStylusDown event, because it is not true if display mode is landscape (x = y, and y = ScreenHeight-x ...).

Is it possible to get a bold effect with the font (for instance by changing the border color like the font color) ?

Where can I find documentation about this ? I don't find what I need in online HTML reference, nor in tutorials or samples.

I also need to know how I can get a picture from resources instead of a file, so that my images may be included in exe file ? This is very important for my application.

Thanks for your support.
Jean-Michel CAMBOT
StoreXperience.com
MetsDuManche
pm Member
 
Posts: 13
Joined: Jul 9, 2007 @ 11:21am


Postby edge » Jul 11, 2007 @ 9:59am

EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby MetsDuManche » Jul 11, 2007 @ 1:46pm

Thank you for the answer. I will try this code, and load different fonts manually to get larger ones.

The device giving wrong stylus touch position is a HTC P3600. When I am in portrait mode, and start the programme, everything is ok. When I start the programme while the device is in landscape mode, display is ok, but stylus reports wrong coordonates (x = y and y = height-x).
I hope it is the same for all devices, otherwise, let me know if you resolved this "problem".

We will soon register for the SDK, because it seems to allow us doing what we need.

Best regards
Jean-Michel CAMBOT
StoreXperience.com
MetsDuManche
pm Member
 
Posts: 13
Joined: Jul 9, 2007 @ 11:21am


Postby edge » Jul 11, 2007 @ 8:50pm

Hi,

Would you like to make a small test on this device? Call GetSystemRotation from ClassEDisplay and check the return value.

If the device is in portrait mode, it should return ROT_NONE (value 0), and when it is in landscape mode it should return ROT_90DEG (value 1). We suspect there is a problem with this function. Can you tell me which library you're using (2002, 2003 or 2005)?
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby MetsDuManche » Jul 12, 2007 @ 4:57pm

I made this test :

In portrait mode (standard), I get a rotation of 0.
In landscape mode, I get a rotation of 3.

May this help ?

I'm using Windows Mobile 2005.

Regarding hte loading of images from resources, I couldn't get it working, but I used instead your pack functions that are perfect! I got my pictures in a single resources file, and extract them while starting the application. It's exactly what I needed.
Jean-Michel CAMBOT
StoreXperience.com
MetsDuManche
pm Member
 
Posts: 13
Joined: Jul 9, 2007 @ 11:21am


Next

Return to EDGELIB


Sort


Forum Description

Powerful and affordable C++ middleware solution covering true multi-platform 2D, 3D and network features for Apple iPhone, Windows Mobile, Symbian S60, UIQ, Linux and Windows desktop.

Moderator:

edge

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron