DirectFB - Home of the pragmatist Roadmap


[directfb-dev] Magnifying glass
Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[directfb-dev] Magnifying glass



Hi guys,

I just finished my first version of the magnifying glass:
http://laatikko.tml.hut.fi/dfb.jpg
http://laatikko.tml.hut.fi/maglass.c

I'm still having some problems with my getpixel function. I read from somewhere that matrox runs accelerated only in 16bit mode, but it turned out that surface pixel format is 32bits ARGB. Does anybody have a handy getpixel function? Mine currently works for 32 bit ARGB only, and I can't really test the function on anything else.

Denis Oliver Kropp wrote:

The visible framebuffer, i.e. the composition of all windows,
is the surface of the display layer. You can get access to it via
IDirectFBDisplayLayer::GetSurface(). Reading or blitting from it
provides the visible screen content.

I do this, but I get a warning from dfb. Hope this isn't too serious ;) The documentation says something like "works only in exclusive mode"...

Unfortunately, the glass window itself is included. Unless a warp effect
is wanted, like the one of qmag on our Qt screenshot, you would have to
hide the glass window temporarily. This is not acceptable as it would produce
easily visible flicker.

I set opacity to 0x10 just before rendering.. that way you see where you are moving the window...

A rough idea is to provide a public API to the stack compositing engine.
The simplest version satisfying your needs would be the following method:

IDirectFBDisplayLayer::ComposeTo( IDirectFBDisplayLayer *thiz,
DFBRegion *region, IDirectFBWindow *upper, IDirectFBSurface *destination )

It would compose the chosen 'region' of the stack using all windows
stacked below 'upper' writing to 'destination'.

However, polling the contents by regularly calling this method wouldn't be
acceptable, too. So there should be a way to get a notification for each
window stack update. Adding a new event class DFEC_DISPLAYLAYER and adding
CreateEventBuffer() and AttachEventBuffer() to IDirectFBDisplayLayer would
offer this and much more, e.g. events for configuration changes including
screen resolution etc.

This would be the right way to do it... I'm afraid that I don't have enough experience with DFB yet to stab it there myself..

juha



--
Info: To unsubscribe send a mail to ecartis@directfb.org with "unsubscribe directfb-dev" as subject.



Home | Main Index | Thread Index


directfb.org / Development / Old Archives