a couple more stupid x related questions

Jaymz Julian jaymz@artificial-stupidity.net
Sat, 21 Feb 2004 00:33:24 +1100


hi.  I'm about to make myself look incredibly stupid, but having blow away
an embarrasing amount of time looking at these two things (no, not *that*
embarassing, stfu :-p), I figured it's time to look stupid.

Is there a simple way to create a picture from a another picture?  I 
understand how to do this from an Pixmap, but not from a Picture.  Hrm,
that doens't make much sense, I should elaborate.

What I actually want to do, is have two Picture's pointing at the same 
Window, with the second picture having the desaturate and blur convolutions
set.  Of course, when I try and create a second picture from the same window,
the xserver returns an error, which is rather unhandy(tm).

Having looked stupid, we hit problem #2.  Is there a simple way that already
exists to have damage make the change boxes it generates slightly larger than
what is required?  explanation:

I have the above mentioned convolutions.  Great, fun, all works, right.  Then
the window gets convoluted, with, say, a 5x5 matrix.  Okay, fine, now each
pixel is effected by the pixels around it (2 in each direction, blah blah).
So say we have an xterm, and a charecter is deleted.  The charecter goes away,
that's no problem, but we're left with the halo from it's blur :).  This is not
actually noticable in a shadow, but it kills the other thing I've implented that
uses this (literal focus - all windows which aren't focused are blured... yes,
it's stupiud,but it's *cute*.).  Also, it's not right, and we don't want to
be doing things which are not right :).  (there is a seperate bit of code which
takes care of this when actually performing a convolution on a chaged window as
well, right now, for precisly this reason - i'd kind of like to make that go 
away, too, although I suspect it still has a use for pure pixmaps anyhow, blah
blah)

I did, btw, do the obvious thing, or just drawing more pixels - this led to the
server going "oh, extra bits of the window were damaged, better redraw", add
bits for convolution, "oh, extra bits of the window were damaged, better 
redraw", and so on and so ofrth for a nontrivial amount of time, until it 
decided it was bored :).

thanks in advance

	-- jj

-- 
--
Jaymz Julian - Coder, Visionary, Fat Ass.
"Hannibal is a serial killer. He only likes to kill and eat people. 
 Very few people have `I want to be killed and eaten' on their cards, 
 so Hannibal is out of a job." - http://cards.sf.net