Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Newbie Question - Help with GF: (11 Items)
   
Newbie Question - Help with GF  
Hi All,

I am Newbie with QNX GF and QNX in general.  I am trying to use Momentics IDE to connect to a x86 VM target using qconn.
  What I want to do is to be able to draw an based on some parameters and then save it in a PNG format on the target 
file system (VM running neutrino).  I would like to then be able to load the png file in a browser and display the image
.

Can anyone someone tell me what is the best way to start?  Is GF the correct place to start.  With GF, I could not find 
anyway to render to a file rather that a graphic device!

I apologize if some my graphic terminology is not correct.  I am trying to evaluate the QNX platform for a future 
project and this would help me get started.

Thanks in advance.

Reza. 
Re: Newbie Question - Help with GF  
Sorry, I had a typo in the previous e-mail:  I was trying to say that I am trying to draw ellipses and save them as a 
png file.

Thanks,

Reza.
Re: Newbie Question - Help with GF  
I'd suggest taking a look at libimg. There also doc for the api as well. The gf api allows you to render things like 
ellipses and libimg would allow you to write data from gf surfaces as pngs. You could then load png files into gf 
surfaces or to render them as gf images.

----- Original Message -----
From: Reza Salehi [mailto:community-noreply@qnx.com]
Sent: Thursday, May 19, 2011 06:30 PM
To: advanced-graphics <post85978@community.qnx.com>
Subject: Re: Newbie Question - Help with GF

Sorry, I had a typo in the previous e-mail:  I was trying to say that I am trying to draw ellipses and save them as a 
png file.

Thanks,

Reza.



_______________________________________________

Advanced Graphics
http://community.qnx.com/sf/go/post85978
Re: Newbie Question - Help with GF  
Thank you very much Joel. At least I know where to start looking.

After looking into libimg, I found the img_load and img_load_file APIs.  However, one of these APIs deal with streaming 
data and another with a filesystem file!  I could not find and API that would directly read and load an image from GF 
surface.  Can you please tell which libimg API does that?

Also, QNX usually has some very good code examples or tutorials on these types of things.  Do you know a link or a 
location where I can find an example of how to do something like this instead of me asking stupid questions and wasting 
peoples time on the this Forum?

Thanks again,

Reza.
Re: Newbie Question - Help with GF  
I don't have a link handy, but you can get a pointer from a CPU accessible surface. You can pass the pointrr 

----- Original Message -----
From: Reza Salehi [mailto:community-noreply@qnx.com]
Sent: Thursday, May 19, 2011 07:44 PM
To: advanced-graphics <post85982@community.qnx.com>
Subject: Re: Newbie Question - Help with GF

Thank you very much Joel. At least I know where to start looking.

After looking into libimg, I found the img_load and img_load_file APIs.  However, one of these APIs deal with streaming 
data and another with a filesystem file!  I could not find and API that would directly read and load an image from GF 
surface.  Can you please tell which libimg API does that?

Also, QNX usually has some very good code examples or tutorials on these types of things.  Do you know a link or a 
location where I can find an example of how to do something like this instead of me asking stupid questions and wasting 
peoples time on the this Forum?

Thanks again,

Reza.




_______________________________________________

Advanced Graphics
http://community.qnx.com/sf/go/post85982
Re: Newbie Question - Help with GF  
Oops accidently hit send to soon. You can get a pointer from a gf surface using gf to either read or write image data. 
Libimg accepts a pointer for the src or dst for image encode/decode operations.

----- Original Message -----
From: Joel Pilon
Sent: Thursday, May 19, 2011 07:46 PM
To: 'post85982@community.qnx.com' <post85982@community.qnx.com>
Subject: Re: Newbie Question - Help with GF

I don't have a link handy, but you can get a pointer from a CPU accessible surface. You can pass the pointrr 

----- Original Message -----
From: Reza Salehi [mailto:community-noreply@qnx.com]
Sent: Thursday, May 19, 2011 07:44 PM
To: advanced-graphics <post85982@community.qnx.com>
Subject: Re: Newbie Question - Help with GF

Thank you very much Joel. At least I know where to start looking.

After looking into libimg, I found the img_load and img_load_file APIs.  However, one of these APIs deal with streaming 
data and another with a filesystem file!  I could not find and API that would directly read and load an image from GF 
surface.  Can you please tell which libimg API does that?

Also, QNX usually has some very good code examples or tutorials on these types of things.  Do you know a link or a 
location where I can find an example of how to do something like this instead of me asking stupid questions and wasting 
peoples time on the this Forum?

Thanks again,

Reza.




_______________________________________________

Advanced Graphics
http://community.qnx.com/sf/go/post85982
Re: Newbie Question - Help with GF  
Thanks Joel.  However, after checking the libgf, it seems like it doesn't support drawing of ellipses!  I only see 
polyline and rectangular drawing functions.

Cheers,

Reza.
Re: Newbie Question - Help with GF  
My mistake, my memory is a little rusty. You'll have to generate and tessellate your own ellipses in gf. Or you might be
 able to use photon and the pgdrawellise function.

----- Original Message -----
From: Reza Salehi [mailto:community-noreply@qnx.com]
Sent: Thursday, May 19, 2011 08:42 PM
To: advanced-graphics <post85987@community.qnx.com>
Subject: Re: Newbie Question - Help with GF

Thanks Joel.  However, after checking the libgf, it seems like it doesn't support drawing of ellipses!  I only see 
polyline and rectangular drawing functions.

Cheers,

Reza.



_______________________________________________

Advanced Graphics
http://community.qnx.com/sf/go/post85987
Re: Newbie Question - Help with GF  
Joel Pilon wrote:
> My mistake, my memory is a little rusty. You'll have to generate and tessellate your own ellipses in gf. Or you might 
be able to use photon and the pgdrawellise function.

  ... with SDL_Gfx you will get antialized ellipses :)

--Armin

http://www.steinhoff-automation.com

> ----- Original Message -----
> From: Reza Salehi [mailto:community-noreply@qnx.com]
> Sent: Thursday, May 19, 2011 08:42 PM
> To: advanced-graphics<post85987@community.qnx.com>
> Subject: Re: Newbie Question - Help with GF
>
> Thanks Joel.  However, after checking the libgf, it seems like it doesn't support drawing of ellipses!  I only see 
polyline and rectangular drawing functions.
>
> Cheers,
>
> Reza.
>
>
>
> _______________________________________________
>
> Advanced Graphics
> http://community.qnx.com/sf/go/post85987
>
>
>
>
> _______________________________________________
>
> Advanced Graphics
> http://community.qnx.com/sf/go/post85995
>
>
Re: Newbie Question - Help with GF  
Hi Armin,

Thanks for your comment.  Do you know if there is a site that tells you how to install sdl_gfx library/ies and write a 
hello world program to draw an ellipse on VM x86 target running Nuternia 6.5?

Thanks in advance,

Reza.
Re: Newbie Question - Help with GF  
Reza Salehi wrote:
> Hi Armin,
>
> Thanks for your comment.  Do you know if there is a site that tells you how to install sdl_gfx library/ies and write a
 hello world program to draw an ellipse on VM x86 target running Nuternia 6.5?

SDL  1.3:  
http://community.qnx.com/sf/projects/qnx_community_sdl_project/   --> 
have a look to the OpenGL ES support
SDL_Gfx: http://www.ferzkopp.net/joomla/content/view/19/14/  ... it 
compiles out of the box.

--Armin



> Thanks in advance,
>
> Reza.
>
>
>
>
> _______________________________________________
>
> Advanced Graphics
> http://community.qnx.com/sf/go/post86028
>
>