2009-09-30 15:20:52 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2009-11-19 13:26:13 +00:00
|
|
|
<!-- $Revision$ -->
|
2009-09-30 15:20:52 +00:00
|
|
|
|
|
|
|
<phpdoc:classref xml:id="class.cairooperator" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
|
|
|
|
|
|
|
|
<title>The CairoOperator class</title>
|
|
|
|
<titleabbrev>CairoOperator</titleabbrev>
|
|
|
|
|
|
|
|
<partintro>
|
|
|
|
|
|
|
|
<!-- {{{ CairoOperator intro -->
|
|
|
|
<section xml:id="cairooperator.intro">
|
|
|
|
&reftitle.intro;
|
|
|
|
<para>
|
|
|
|
This is used to set the compositing operator for all cairo drawing operations.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
The default operator is <constant>CairoOperator::OVER</constant>
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
The operators marked as unbounded modify their destination even outside of the mask layer (that is,
|
|
|
|
their effect is not bound by the mask layer). However, their effect can still be limited by way of clipping.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
To keep things simple, the operator descriptions here document the behavior for when both source and destination
|
|
|
|
are either fully transparent or fully opaque. The actual implementation works for translucent layers too.
|
|
|
|
For a more detailed explanation of the effects of each operator, including the mathematical definitions,
|
|
|
|
see http://cairographics.org/operators/.
|
|
|
|
</para>
|
|
|
|
</section>
|
|
|
|
<!-- }}} -->
|
|
|
|
|
|
|
|
<section xml:id="cairooperator.synopsis">
|
|
|
|
&reftitle.classsynopsis;
|
|
|
|
|
|
|
|
<!-- {{{ Synopsis -->
|
|
|
|
<classsynopsis>
|
|
|
|
<ooclass><classname>CairoOperator</classname></ooclass>
|
|
|
|
|
|
|
|
<!-- {{{ Class synopsis -->
|
|
|
|
<classsynopsisinfo>
|
|
|
|
<ooclass>
|
|
|
|
<classname>CairoOperator</classname>
|
|
|
|
</ooclass>
|
|
|
|
</classsynopsisinfo>
|
|
|
|
<!-- }}} -->
|
2009-12-29 09:42:00 +00:00
|
|
|
<classsynopsisinfo role="comment">&Constants;</classsynopsisinfo>
|
2009-09-30 15:20:52 +00:00
|
|
|
<fieldsynopsis>
|
|
|
|
<modifier>const</modifier>
|
|
|
|
<type>integer</type>
|
|
|
|
<varname linkend="cairooperator.constants.clear">CairoOperator::CLEAR</varname>
|
|
|
|
<initializer>0</initializer>
|
|
|
|
</fieldsynopsis>
|
|
|
|
<fieldsynopsis>
|
|
|
|
<modifier>const</modifier>
|
|
|
|
<type>integer</type>
|
|
|
|
<varname linkend="cairooperator.constants.source">CairoOperator::SOURCE</varname>
|
|
|
|
<initializer>1</initializer>
|
|
|
|
</fieldsynopsis>
|
|
|
|
<fieldsynopsis>
|
|
|
|
<modifier>const</modifier>
|
|
|
|
<type>integer</type>
|
|
|
|
<varname linkend="cairooperator.constants.over">CairoOperator::OVER</varname>
|
|
|
|
<initializer>2</initializer>
|
|
|
|
</fieldsynopsis>
|
|
|
|
<fieldsynopsis>
|
|
|
|
<modifier>const</modifier>
|
|
|
|
<type>integer</type>
|
|
|
|
<varname linkend="cairooperator.constants.in">CairoOperator::IN</varname>
|
|
|
|
<initializer>3</initializer>
|
|
|
|
</fieldsynopsis>
|
|
|
|
<fieldsynopsis>
|
|
|
|
<modifier>const</modifier>
|
|
|
|
<type>integer</type>
|
|
|
|
<varname linkend="cairooperator.constants.out">CairoOperator::OUT</varname>
|
|
|
|
<initializer>4</initializer>
|
|
|
|
</fieldsynopsis>
|
|
|
|
<fieldsynopsis>
|
|
|
|
<modifier>const</modifier>
|
|
|
|
<type>integer</type>
|
|
|
|
<varname linkend="cairooperator.constants.atop">CairoOperator::ATOP</varname>
|
|
|
|
<initializer>5</initializer>
|
|
|
|
</fieldsynopsis>
|
|
|
|
<fieldsynopsis>
|
|
|
|
<modifier>const</modifier>
|
|
|
|
<type>integer</type>
|
|
|
|
<varname linkend="cairooperator.constants.dest">CairoOperator::DEST</varname>
|
|
|
|
<initializer>6</initializer>
|
|
|
|
</fieldsynopsis>
|
|
|
|
<fieldsynopsis>
|
|
|
|
<modifier>const</modifier>
|
|
|
|
<type>integer</type>
|
|
|
|
<varname linkend="cairooperator.constants.dest-over">CairoOperator::DEST_OVER</varname>
|
|
|
|
<initializer>7</initializer>
|
|
|
|
</fieldsynopsis>
|
|
|
|
<fieldsynopsis>
|
|
|
|
<modifier>const</modifier>
|
|
|
|
<type>integer</type>
|
|
|
|
<varname linkend="cairooperator.constants.dest-in">CairoOperator::DEST_IN</varname>
|
|
|
|
<initializer>8</initializer>
|
|
|
|
</fieldsynopsis>
|
|
|
|
<fieldsynopsis>
|
|
|
|
<modifier>const</modifier>
|
|
|
|
<type>integer</type>
|
|
|
|
<varname linkend="cairooperator.constants.dest-out">CairoOperator::DEST_OUT</varname>
|
|
|
|
<initializer>9</initializer>
|
|
|
|
</fieldsynopsis>
|
|
|
|
<fieldsynopsis>
|
|
|
|
<modifier>const</modifier>
|
|
|
|
<type>integer</type>
|
|
|
|
<varname linkend="cairooperator.constants.dest-atop">CairoOperator::DEST_ATOP</varname>
|
|
|
|
<initializer>10</initializer>
|
|
|
|
</fieldsynopsis>
|
|
|
|
<fieldsynopsis>
|
|
|
|
<modifier>const</modifier>
|
|
|
|
<type>integer</type>
|
|
|
|
<varname linkend="cairooperator.constants.xor">CairoOperator::XOR</varname>
|
|
|
|
<initializer>11</initializer>
|
|
|
|
</fieldsynopsis>
|
|
|
|
<fieldsynopsis>
|
|
|
|
<modifier>const</modifier>
|
|
|
|
<type>integer</type>
|
|
|
|
<varname linkend="cairooperator.constants.add">CairoOperator::ADD</varname>
|
|
|
|
<initializer>12</initializer>
|
|
|
|
</fieldsynopsis>
|
|
|
|
<fieldsynopsis>
|
|
|
|
<modifier>const</modifier>
|
|
|
|
<type>integer</type>
|
|
|
|
<varname linkend="cairooperator.constants.saturate">CairoOperator::SATURATE</varname>
|
|
|
|
<initializer>13</initializer>
|
|
|
|
</fieldsynopsis>
|
|
|
|
|
|
|
|
</classsynopsis>
|
|
|
|
<!-- }}} -->
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<!-- {{{ CairoOperator constants -->
|
|
|
|
<section xml:id="cairooperator.constants">
|
|
|
|
&reftitle.constants;
|
2012-01-03 07:06:01 +00:00
|
|
|
<variablelist>
|
2009-09-30 15:20:52 +00:00
|
|
|
|
2012-01-03 07:06:01 +00:00
|
|
|
<varlistentry xml:id="cairooperator.constants.clear">
|
|
|
|
<term><constant>CairoOperator::CLEAR</constant></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Clear destination layer (bounded)</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2009-09-30 15:20:52 +00:00
|
|
|
|
2012-01-03 07:06:01 +00:00
|
|
|
<varlistentry xml:id="cairooperator.constants.source">
|
|
|
|
<term><constant>CairoOperator::SOURCE</constant></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Replace destination layer (bounded) </para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2009-09-30 15:20:52 +00:00
|
|
|
|
2012-01-03 07:06:01 +00:00
|
|
|
<varlistentry xml:id="cairooperator.constants.over">
|
|
|
|
<term><constant>CairoOperator::OVER</constant></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Draw source layer on top of destination layer (bounded) </para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2009-09-30 15:20:52 +00:00
|
|
|
|
2012-01-03 07:06:01 +00:00
|
|
|
<varlistentry xml:id="cairooperator.constants.in">
|
|
|
|
<term><constant>CairoOperator::IN</constant></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Draw source where there was destination content (unbounded) </para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2009-09-30 15:20:52 +00:00
|
|
|
|
2012-01-03 07:06:01 +00:00
|
|
|
<varlistentry xml:id="cairooperator.constants.out">
|
|
|
|
<term><constant>CairoOperator::OUT</constant></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Draw source where there was no destination content (unbounded) </para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2009-09-30 15:20:52 +00:00
|
|
|
|
2012-01-03 07:06:01 +00:00
|
|
|
<varlistentry xml:id="cairooperator.constants.atop">
|
|
|
|
<term><constant>CairoOperator::ATOP</constant></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Draw source on top of destination content and only there </para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2009-09-30 15:20:52 +00:00
|
|
|
|
2012-01-03 07:06:01 +00:00
|
|
|
<varlistentry xml:id="cairooperator.constants.dest">
|
|
|
|
<term><constant>CairoOperator::DEST</constant></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Ignore the source </para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2009-09-30 15:20:52 +00:00
|
|
|
|
2012-01-03 07:06:01 +00:00
|
|
|
<varlistentry xml:id="cairooperator.constants.dest-over">
|
|
|
|
<term><constant>CairoOperator::DEST_OVER</constant></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Draw destination on top of source </para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2009-09-30 15:20:52 +00:00
|
|
|
|
2012-01-03 07:06:01 +00:00
|
|
|
<varlistentry xml:id="cairooperator.constants.dest-in">
|
|
|
|
<term><constant>CairoOperator::DEST_IN</constant></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Leave destination only where there was source content (unbounded) </para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2009-09-30 15:20:52 +00:00
|
|
|
|
2012-01-03 07:06:01 +00:00
|
|
|
<varlistentry xml:id="cairooperator.constants.dest-out">
|
|
|
|
<term><constant>CairoOperator::DEST_OUT</constant></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Leave destination only where there was no source content </para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2009-09-30 15:20:52 +00:00
|
|
|
|
2012-01-03 07:06:01 +00:00
|
|
|
<varlistentry xml:id="cairooperator.constants.dest-atop">
|
|
|
|
<term><constant>CairoOperator::DEST_ATOP</constant></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Leave destination on top of source content and only there (unbounded) </para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2009-09-30 15:20:52 +00:00
|
|
|
|
2012-01-03 07:06:01 +00:00
|
|
|
<varlistentry xml:id="cairooperator.constants.xor">
|
|
|
|
<term><constant>CairoOperator::XOR</constant></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Source and destination are shown where there is only one of them </para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2009-09-30 15:20:52 +00:00
|
|
|
|
2012-01-03 07:06:01 +00:00
|
|
|
<varlistentry xml:id="cairooperator.constants.add">
|
|
|
|
<term><constant>CairoOperator::ADD</constant></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Source and destination layers are accumulated </para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2009-09-30 15:20:52 +00:00
|
|
|
|
2012-01-03 07:06:01 +00:00
|
|
|
<varlistentry xml:id="cairooperator.constants.saturate">
|
|
|
|
<term><constant>CairoOperator::SATURATE</constant></term>
|
|
|
|
<listitem>
|
|
|
|
<para>Like <constant>CairoOperator::OVER</constant>, but assuming source and dest are disjoint geometries </para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2009-09-30 15:20:52 +00:00
|
|
|
|
2012-01-03 07:06:01 +00:00
|
|
|
</variablelist>
|
2009-09-30 15:20:52 +00:00
|
|
|
</section>
|
|
|
|
<!-- }}} -->
|
|
|
|
|
|
|
|
|
|
|
|
</partintro>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</phpdoc:classref>
|
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:t
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
sgml-parent-document:nil
|
2010-02-03 13:03:22 +00:00
|
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
2009-09-30 15:20:52 +00:00
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
-->
|