DirectFB - Home of the pragmatist Roadmap


[directfb-dev] Re: SetScreenLocation, cropping
Mailing List archive

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

[directfb-dev] Re: SetScreenLocation, cropping



On Dienstag, 15. Juni 2004 01:37, Ville Syrjälä wrote:
> On Tue, Jun 15, 2004 at 12:51:03AM +0200, Stefan Lucke wrote:
> > On Dienstag, 15. Juni 2004 00:15, Ville Syrjälä wrote:

[ .. ]

> > > Do you want to resize the image so 
> > > that parts of it go outside the visible screen?
> > 
> > No (virtual yes). I want to draw a part of picture so that it fills the screen.
> > With Xv output it is easy. There I can specify source x and y offsets and
> > source width and height witch should be drawn at a given destination area.
> > With Xv-X11 this works with matrox and radeon and I think with others too.
> 
> DirectFB doesn't have any method of specifying source cropping for layers. 
> It would be a useful thing to add though.
> 
> But you since you're looking to fill the entire screen you don't actually 
> need source cropping. SetScreenLocation() will suffice provided that the 
> driver crops things properly. You just have to calculate the coordinates 
> and size accordingly.

So I just missed the functions to set the source and destination rects.
Could you give me a short hint ?

From radeon drivers source I found something like that (radeon_overlay.c),
    if (config->dest.x < 0)
          cropleft = -config->dest.x * surface->width / config->dest.w;

    if (config->dest.y < 0)
          croptop = -config->dest.y * surface->height / config->dest.h;

but no function to set these values. I know that I'm quite new to directfb.



Stefan Lucke





Home | Main Index | Thread Index


directfb.org / Development / Old Archives