gnustep-dev
[Top][All Lists]
Advanced

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

Compositing and transformations


From: Alexander Malmberg
Subject: Compositing and transformations
Date: Tue, 10 Sep 2002 23:05:45 +0200

Hi,

I've just finished implementing proper compositing handling in back-art,
ie. handling transformations and clipping, and I've noticed that image
drawing in flipped views is messed up. According to the docs I have, the
arguments to the composite method specify the source rectangle in the
source coordinate system, and the destination rectangle is identical,
but shifted according to the destination point.

In a un-flipped view, drawing an image at (100,100) (device space) is
most often done by compositing from the rectangle (0,0)+(width,height)
(lower left corner) in an off-screen window, so the result appears in
the rectangle (100,100)+(width,height). In a flipped view, it seems that
the code expects that compositing from (0,0)+(width,height) to (100,100)
will put the result in (100,100-height)+(width,height) (but without
flipping the actual image), but since the rectangle is specified using
the source's ctm, the flipping is ignored and it still ends up in
(100,100)+(width,height).

AFAICT, I'm doing it correctly now, so -gui should be fixed. I could fix
it, but I'm not sure if NSImage is supposed to handle this (I don't
think so, though), or if views need to check if they're flipped when
drawing images. Also, fixing it in -gui would cause messed up results
with back-xlib until someone fixes it.

- Alexander Malmberg




reply via email to

[Prev in Thread] Current Thread [Next in Thread]