[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 115: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 115: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 115: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
PocketMatrix • View topic - how to render image
This site is no longer active and is available for archival purposes only. Registration and login is disabled.

how to render image


how to render image

Postby akabeer1983 » Feb 2, 2009 @ 9:02am

Hi,
i am new to EDGElib, i tried to load and render an image using sample code, provided in the topic: " need help to draw png image" in this forum.
____________________________________________

E2DSurface titlebg;
SetRect(&rc, 0, 0, buffer->GetWidth(), 50);
buffer->FillRect(&rc, E_RGBX(0, 255, 0));
display->CreateSurface(&titlebg, "splash.png");
buffer->BltFast(0, 0, &titlebg, NULL);

____________________________________________

The simulator is not rendering anything, but is black.
i placed the image in Classes folder, res folder and also in the projec folder, still not getting.
i tried to change the rectangle size, etc.
can anyone help me?
akabeer1983
pm Member
 
Posts: 11
Joined: Jan 27, 2009 @ 8:24am


Postby edge » Feb 2, 2009 @ 11:33am

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 akabeer1983 » Feb 2, 2009 @ 2:48pm

Hi,
Thanks for reply.
I have 2 doubts:
1) i executed the following code:

E2DSurface *image;
image = new E2DSurface();
long result = edisp -> CreateSurface(image, "map.jpg", EST_READONLY);
It runs properly, but the value of result is 7, (not E_OK).

But if i comment out the memory allocation for image //image = new E2DSurface();
and try to execute, iIt displays a big error, a line of which reads as:
Xcode could not locate source file: esurf_2d.cpp (line: 1493)

SHOULD I ALLOCATE MEMORY FOR image?


2) if i provide the absolute path of image "/projects/ImageRender/map.jpg",
then it displays image properly.
WHAT IS THE FORMAT FOR PATH?
akabeer1983
pm Member
 
Posts: 11
Joined: Jan 27, 2009 @ 8:24am


Postby edge » Feb 3, 2009 @ 8:41am

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 akabeer1983 » Feb 3, 2009 @ 9:04am

akabeer1983
pm Member
 
Posts: 11
Joined: Jan 27, 2009 @ 8:24am


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