IDISPLAY_DrawRect & IGraphics problem!!! | developer.brewmp.com IDISPLAY_DrawRect & IGraphics problem!!! | developer.brewmp.com

Developer

IDISPLAY_DrawRect & IGraphics problem!!!

Forums:

Hello Everyone,
Well i m a newbie and dont know how to use IDisplay interface .. i m trying to draw some shapes on the emulator screen but its not working .. like first i call IDISPLAY_ClearScreen(), then i call SETAEERECT() to set the point of AEERECT object .. then i call IDISPLAY_DrawRect method to draw a rectangle and then i call IDISPLAY_Update to update all the changes made in the display .. but it only clear the screen without showing any rectangle .. plzz tell me is there any other thing that should have to be done before calling IDISPLAY_DrawRect??

And one more thing .. i also tried to use IGraphics interface but when i declare an object of IGraphics .. it gave an error that "the identifier IGraphics not found" .. even though i added all the necessary header files... and the shocking thing is, I didnt find any IGraphics typedef in any header file ... and according to the specs .. IGraphics should be there in Brew 2.0 .. i dont know wats the problem .. plzz plzz plzz help me out so that i can start doing something ..

Thanx n Regards,
Sallu.

Can u write a piece of code u r using, to make ur point more clear.

Can u write a piece of code u r using, to make ur point more clear.

Hello Suppi!!! .. well IDISPLAY_DrawRect problem is solved .. but the IGraphics problem is still there ... i m not able to use IGraphics interface .. i dont know why ... although i added all the necessary header files descrided in the API Reference document ... whenever i declare a pointer to IGraphics it give an error "syntax error identifier IGraphics" .. and surprisingly i didnt find any IGraphics typedef in the header files ...
And i m having a same problem with IMenuCtl interface .. both the interfaces are very important for me .. but not working :confused: ...
Well i m not an authenticated developer yet ... i hope this problem is not occuring becuz of that ... becuz i think BREW 2.0 SDK is same for all?? .. isnt it?? .. plzz help me out ... its urgent ..
Thanx Suppi 4 ur reply...
Regards,
Sallu.

Hello Suppi!!! .. well IDISPLAY_DrawRect problem is solved .. but the IGraphics problem is still there ... i m not able to use IGraphics interface .. i dont know why ... although i added all the necessary header files descrided in the API Reference document ... whenever i declare a pointer to IGraphics it give an error "syntax error identifier IGraphics" .. and surprisingly i didnt find any IGraphics typedef in the header files ...
And i m having a same problem with IMenuCtl interface .. both the interfaces are very important for me .. but not working :confused: ...
Well i m not an authenticated developer yet ... i hope this problem is not occuring becuz of that ... becuz i think BREW 2.0 SDK is same for all?? .. isnt it?? .. plzz help me out ... its urgent ..
Thanx Suppi 4 ur reply...
Regards,
Sallu.

Hey Suppi .. the problem is solved ... by adding "AEEMenu.h" and "AEEGraphics.h"
but why these header files are not descrided in the API Reference documents?? ... thats a total crap ... newayz .. thanx
Regards,
Sallu.

Hey Suppi .. the problem is solved ... by adding "AEEMenu.h" and "AEEGraphics.h"
but why these header files are not descrided in the API Reference documents?? ... thats a total crap ... newayz .. thanx
Regards,
Sallu.

Hey Suppi!!! .. well i m trying to display a jpeg image to the screen by using IGRAPHICS_StretchBlt() .. but its not displaying anything to the screen .. my code is as follows:
IDISPLAY_ClearScreen(CVApp->pIDisplay);
ISHELL_CreateInstance(CVApp->pIShell, AEECLSID_FILEMGR, (void **)&CVApp->pFileMgr);
ISHELL_CreateInstance(CVApp->pIShell, AEECLSID_GRAPHICS, (void **)&CVApp->pGraph);
CVApp->pFile = IFILEMGR_OpenFile(CVApp->pFileMgr,"6682.jpg",_OFM_READ);
if (CVApp->pFile)
{
IFILE_GetInfo(CVApp->pFile,&CVApp->pInfo);
CVApp->pBuff = (byte*) malloc(CVApp->pInfo.dwSize);
IFILE_Read(CVApp->pFile,CVApp->pBuff,CVApp->pInfo.dwSize);
IGRAPHICS_StretchBlt(CVApp->pGraph,0,0,46,50,CVApp->pBuff,AEE_RO_COPY);
free(CVApp->pBuff);

IDISPLAY_Update(CVApp->pIDisplay);
it just displays a white screen .. nothing else .. m i doing something wrong?? .. plzz help ...
Thanx n Regards,
Sallu.

Hey Suppi!!! .. well i m trying to display a jpeg image to the screen by using IGRAPHICS_StretchBlt() .. but its not displaying anything to the screen .. my code is as follows:
IDISPLAY_ClearScreen(CVApp->pIDisplay);
ISHELL_CreateInstance(CVApp->pIShell, AEECLSID_FILEMGR, (void **)&CVApp->pFileMgr);
ISHELL_CreateInstance(CVApp->pIShell, AEECLSID_GRAPHICS, (void **)&CVApp->pGraph);
CVApp->pFile = IFILEMGR_OpenFile(CVApp->pFileMgr,"6682.jpg",_OFM_READ);
if (CVApp->pFile)
{
IFILE_GetInfo(CVApp->pFile,&CVApp->pInfo);
CVApp->pBuff = (byte*) malloc(CVApp->pInfo.dwSize);
IFILE_Read(CVApp->pFile,CVApp->pBuff,CVApp->pInfo.dwSize);
IGRAPHICS_StretchBlt(CVApp->pGraph,0,0,46,50,CVApp->pBuff,AEE_RO_COPY);
free(CVApp->pBuff);

IDISPLAY_Update(CVApp->pIDisplay);
it just displays a white screen .. nothing else .. m i doing something wrong?? .. plzz help ...
Thanx n Regards,
Sallu.

not entirely sure i think that only works with bmps not jpegs,
incidently first page of sdk docs on igraphics
Quote:
IGraphics
Description:
This interface provides the 2D graphics services. It provides services such as:
drawing geometric primitives,
seting colors,
seting pen size,
others.
The following header file is required:
AEEGraphics.h

not entirely sure i think that only works with bmps not jpegs,
incidently first page of sdk docs on igraphics
Quote:
IGraphics
Description:
This interface provides the 2D graphics services. It provides services such as:
drawing geometric primitives,
seting colors,
seting pen size,
others.
The following header file is required:
AEEGraphics.h

Their seems to be a problem of header, it seems as if u r not getting header information of the jpg file u r using in ur buffer which u r using for drawing, & please specify wat exactly u want to do.
Whether u want to draw an image or u want to stretch it.
If u just want to draw u can just use IIMAGE_Draw function.

Their seems to be a problem of header, it seems as if u r not getting header information of the jpg file u r using in ur buffer which u r using for drawing, & please specify wat exactly u want to do.
Whether u want to draw an image or u want to stretch it.
If u just want to draw u can just use IIMAGE_Draw function.

Hello Suppi!!! ... well i want to stretch my image ... but i have found another problem .. i aslo tried IIMAGE_Draw() just to draw a JPG image .. but again i got a white screen .. but when i call IIMAGE_Draw() for PNG .. it worked ... but IGRAPHICS_Stretch() is not working with PNG either ..
I read somewhere that some Brew mobiles dont have support for JPEG images .. is it true?? ... but i m trying it on emulator ..
I m running my application in Sharp_Z-800_SpeedEmu.qsc emulator ... and surprisingly the LG and SAMSUNG emulators are not showing my application icon to launch ... why is that so?? ..
Thanx n Regards,
Sallu.

Hello Suppi!!! ... well i want to stretch my image ... but i have found another problem .. i aslo tried IIMAGE_Draw() just to draw a JPG image .. but again i got a white screen .. but when i call IIMAGE_Draw() for PNG .. it worked ... but IGRAPHICS_Stretch() is not working with PNG either ..
I read somewhere that some Brew mobiles dont have support for JPEG images .. is it true?? ... but i m trying it on emulator ..
I m running my application in Sharp_Z-800_SpeedEmu.qsc emulator ... and surprisingly the LG and SAMSUNG emulators are not showing my application icon to launch ... why is that so?? ..
Thanx n Regards,
Sallu.

Hi Sallu,
There can be a problem of file format, BMP is a reliable format for BREW, whenever u have problem better start with BMP rather than jpeg, which is generally not supported by BREW, & functions like stretchBlt are supported by BMP formats.
If u are using icons then better take BMP format & sizes as- 16x16,26x26,65x42.
suppi

Hi Sallu,
There can be a problem of file format, BMP is a reliable format for BREW, whenever u have problem better start with BMP rather than jpeg, which is generally not supported by BREW, & functions like stretchBlt are supported by BMP formats.
If u are using icons then better take BMP format & sizes as- 16x16,26x26,65x42.
suppi

Hello Suppi!!! .. well u r right its working fine for BMP .. but the thing is .. i want to stretch the images that i will took using the native camera of the mobile ... but i dont know the type of the camera image ... does it return a BMP image?? .. like if the jpeg is not supported by the mobile then obviously the camera image will not be the jpeg .. but if it is not jpeg then wat will be its type?? .. i mean it will b bmp, png or wat?? ...
well suppi i m asking all this becuz i dont have any brew device .. so can u tell me different devices which support jpeg?? .. and also those which not support jpeg ... and must be the version 2.0 devices...
Thanx,
Sallu.

Hello Suppi!!! .. well u r right its working fine for BMP .. but the thing is .. i want to stretch the images that i will took using the native camera of the mobile ... but i dont know the type of the camera image ... does it return a BMP image?? .. like if the jpeg is not supported by the mobile then obviously the camera image will not be the jpeg .. but if it is not jpeg then wat will be its type?? .. i mean it will b bmp, png or wat?? ...
well suppi i m asking all this becuz i dont have any brew device .. so can u tell me different devices which support jpeg?? .. and also those which not support jpeg ... and must be the version 2.0 devices...
Thanx,
Sallu.

Sallu wrote:
I read somewhere that some Brew mobiles dont have support for JPEG images .. is it true??
Definitely not true. But IGRAPHICS_StretchBlt() only supports BMP.

Sallu wrote:
I read somewhere that some Brew mobiles dont have support for JPEG images .. is it true??
Definitely not true. But IGRAPHICS_StretchBlt() only supports BMP.