[Render] Howto avoid black rect outside of the drawable when compositing?
Soeren Sandmann
sandmann at daimi.au.dk
Tue Jul 15 20:29:34 PDT 2008
Pierre-Loup Griffais <pgriffais at nvidia.com> writes:
> On Tuesday 15 July 2008 15:27:08 Clemens Eisserer wrote:
> > Hello,
> >
> > I am trying to draw a transformed image using XRender, which works
> > quite fine, however the problem I experience is that pixels which are
> > outside of the src-picture are rendered black:
> > http://picasaweb.google.com/linuxhippy/Transformations/photo#52233687016232
> >18514
> >
> > The XRender-protocol-spec says:
> > > When fetching pixels from the source or mask pictures, Render provides
> > > three options for pixel values which fall outside the drawable (this
> > > includes pixels within a window geometry obscured by other windows).
> > > + Transparent. Missing values are replaced with transparent.
> >
> > However I was not able to figure out howto set "it" to "transparent".
> > Any hints or ideas are really appreciated.
>
> The spec says a lot of things...
Indeed.
> In practice your options for fetching outside a Picture are the various
> repeatTypes (pictAttribs.repeat, bit CPRepeat):
>
> > #define RepeatNone 0
> > #define RepeatNormal 1
> > #define RepeatPad 2
> > #define RepeatReflect 3
>
> None of those allow you to do what you want; you'll need to use a mask with
> the same transformation as your source Picture.
RepeatNone should result in pixels outside the window being treated as
transparent. If it doesn't, then that's a bug.
Soren
More information about the xorg
mailing list