[cairo] PDF Blend modes

Soeren Sandmann sandmann at daimi.au.dk
Wed Jun 17 05:25:14 PDT 2009


Hi,

> I'm trying to implement the missing features in poppler cairo backend
> (specially those that are present in splash backend). When I asked ickle
> about blend mode operators in cairo, he told me that Company had started
> to implement it some time ago[1]. So, I have taken Company's repos in
> order to update them and try to use the new cairo operators in poppler. 
> 
> First I tried to rebase blend-mode pixman branch from current master,
> but it was quite painful, too many conflicts, so I finally merged it as
> a single patch. I've set up a public repository for this [2].

This looks great; thanks for doing this!

I can definitely understand why you decided to merge it as one big
patch, but I'd really like to see it broken down a bit if
possible. Benjamin's tree had a lot of small commits; if we can
preserve at least some of them, that would be nice.

> I've also changed composite-test adding more operators[3]. 

Nice!

> So, what's still left to do in cairo/pixman? is there anything else I
> can do to help?

See this mail:

   http://lists.cairographics.org/archives/cairo/2008-December/015931.html

I did some work on top of Benjamin's branch in the blendmode branch of
this repo:

        http://cgit.freedesktop.org/~sandmann/pixman/log/?h=blendmode

The things that remain to be done starting from that:

* Rebase to current master, preserving as much history as possible.

* Review that what I did makes sense (both the code and the math in
  the comment I added).

* Use floating point in the HSL modes

  Because I'm not sure that the overflow protection we have right now
  is correct.

* Getting rid of component alpha versions of HSL and
  return_if_fail()ing if you to use them with a component alpha
  mask. [1]

  [1] They could be done in ways that would be mathematically
  consistent with the other blend modes, but I don't know that it
  would make any visual sense. I could be convinced otherwise, though.

* There is an "#undef Set" which should be "#undef Sat"


Thanks,
Soren


More information about the cairo mailing list