Niels,

Thank you.  This helps.  I'm able to create sub surfaces.  I'm not using the 
concept of "windows" in my project, so I'm going to stick with managing 
non-primary buffers myself using sub surfaces.

Cheers,
Ben


-----Original Message-----
From: Niels Roest [mailto:ni...@directfb.org]
Sent: Wednesday, April 22, 2009 3:12 AM
To: Ben Henry
Cc: directfb-dev@directfb.org
Subject: Re: [directfb-dev] Architecture and Fonts on a Surface question

Hi Ben.

about 1... This depends on what you want to do yourself. If you use the
primary surface as-is, you will have a single buffer, so if you have the
common case of windows covering each other you need to handle this
yourself. If you use windows, well, each window has its own buffer, so
moving and changing Z-order is handled by DirectFB. For a regular,
bog-standard GUI, you should use Windows.

about 2... It is probably easiest to look at some examples, e.g.
DirectFB-examples (download page on www.directfb.org). Basically,
idirectfb->CreateSurface( idirectfb, &desc, &isurface ) with desc.flags
= 0x6 and desc.width and desc.height filled is minimally required.

You might take a look at LiTE (available via www.directfb.org) which is
a Toolkit Engine (it provides GUI widgets and widget handling such as
mouse move/resize).

Greets
Niels


Ben Henry wrote:
>
> Hello all,
>
> 1. I'm using dfb++ to develop a basic GUI. I'd like to know the
> recommended method of building a layered UI. Do you suggest rendering
> shapes, text, images and video into their own surfaces and blitting
> these onto the primary surface whenever Flip is called? Or, do you
> recommend using Windows (I don't know how this works). I've been using
> Surfaces, but have had a few issues (question 2 is one of them) that
> have kept me from being entirely productive.
>
> 2. I'd like to call DrawString or FillRectangle in something other
> than the primary surface (see question 1 for reasoning). The problem
> is, without an ImageProvider or VideoProvider, getting the description
> and creating a surface is not something I've been able to figure out
> how to do. Could I get some clues into how to create a surface with a
> custom height and width and to draw text or a shape onto it?
>
> Thank you!
>
> Ben Henry
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> directfb-dev mailing list
> directfb-dev@directfb.org
> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
>


--

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"

_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to