Re: py2cairo, about bindings to "typedef enum _cairo_operator"

<[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <1317910455.2025.5.camel@localhost>
On Sun, 2011-09-25 at 12:00 -0700, [email protected]
wrote:
> Hi,
> 
> 
> I am not very used to community mailing lists, nor to ask questions to
> everybody.
> 
> I am using py2cairo, the cairo bindings for Python 2, under Windows. I
> use
> it with pygame, everything works fine, now that I found the correct
> dlls
> (maybe I could write a tuto about that)...
> 
> 
> I am now trying to use the CAIRO_OPERATOR_MULTIPLY (
> http://cairographics.org/manual/cairo-cairo-t.html#cairo-operator-t,
> and
> http://cairographics.org/operators/ in "Blend Modes") which appears in
> cairo
> 1.10, according to the documentation. But, in pycairo 1.10.0, I can't
> find
> it as cairo.OPERATOR_MULTIPLY (
> http://cairographics.org/documentation/pycairo/3/reference/constants.html#constants-operator
> ).
> 
> So, I "git cloned" the rep and found in src/cairomodule.c :
> "CONSTANT(OPERATOR_CLEAR); CONSTANT(OPERATOR_SOURCE); ..."
> Would it be as easy as adding "CONSTANT(OPERATOR_MULTIPLY);" to enable
> it under pycairo ???
Yes.

>  Hopelessly, I can't build py2cairo right now under Windows
> because I don't have any building system installed yet, and it does
> not look easy at all.
> 
pycairo 1.10.0 does not have support for CAIRO_OPERATOR_MULTIPLY. It
should be fixed in the next version.

In the meantime you may be able to use
  cairo.OPERATOR_SATURATE + 1
to get the desired result.

Steve
> 
> Thank you all for this great work around cairo. 


--
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.