man-pages/man3/X11::Protocol::Ext::RENDER.3pm.html
2021-03-31 01:06:50 +01:00

219 lines
6.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of Protocol::Ext::RENDER</TITLE>
</HEAD><BODY>
<H1>Protocol::Ext::RENDER</H1>
Section: User Contributed Perl Documentation (3pm)<BR>Updated: 2004-04-03<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
X11::Protocol::Ext::RENDER - Perl module for the X Rendering Extension
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<PRE>
use X11::Protocol;
$x = X11::Protocol-&gt;new($ENV{'DISPLAY'});
$x-&gt;init_extension('RENDER') or die;
</PRE>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
The <FONT SIZE="-1">RENDER</FONT> extension adds a new set of drawing primitives which
effectively represent a replacement of the drawing routines in the
core protocol, redesigned based on the needs of more modern
clients. It adds long-desired features such as subpixel positioning,
alpha compositing, direct specification of colors, and multicolored or
animated cursors. On the other hand, it omits features that are no
longer commonly used: wide lines, arbitrary polygons (only triangles
and horizontally-aligned trapezoids are supported), ellipses, bitwise
rendering operations, and server-side fonts (in favor of ``glyphs'' that
are rendered on the client side and transmitted once).
<P>
As of this writing (early 2004), the specification and implementation
both have rough edges, but there are relatively few alternatives for
offloading fancy graphics processing to the server, as is necessary
over slow links or if the client is written in a slow
language. Another possibility you might consider is the 2D subset of
OpenGL, though it doesn't yet have an X11::Protocol-compatible
interface.
<A NAME="lbAE">&nbsp;</A>
<H2>SYMBOLIC CONSTANTS</H2>
This extension adds the constant types 'PictType', 'PictOp',
'SubPixel', 'PolyEdge', and 'PolyMode', with values as defined in the
standard.
<A NAME="lbAF">&nbsp;</A>
<H2>REQUESTS</H2>
This extension adds several requests, called as shown below:
<P>
<PRE>
$x-&gt;RenderQueryVersion($major, $minor)
=&gt;
($major, $minor)
$x-&gt;RenderQueryPictFormats()
=&gt;
([[$id, $type, $depth,
$red, $red_m, $green, $green_m, $blue, $blue_m,
$alpha, $alpha_m, $cmap], ...],
[[$fallback, [$depth, [$visual, $format], ...], ...], ...],
[$subpixel, ...])
$x-&gt;RenderQueryPictIndexValues($pict_format)
=&gt;
([$index, $red, $green, $blue, $alpha], ...)
$x-&gt;RenderQueryFilters($drawable)
=&gt;
([@filters], [@aliases])
$x-&gt;RenderCreatePicture($picture, $drawable, $format,
'attribute' =&gt; $value, ...)
$x-&gt;RenderChangePicture($picture, 'attribute' =&gt; $value, ...)
$x-&gt;RenderSetPictureClipRectangles($pic, $x_origin, $y_origin,
[$x, $y, $width, $height], ...)
$x-&gt;RenderSetPictureTransform($pict, $m11, $m12, $m13,
$m21, $m22, $m23,
$m31, $m32, $m33);
$x-&gt;RenderSetPictureFilter($pict, $filter, @args)
$x-&gt;RenderComposite($op, $src, $mask, $dst, $src_x, $src_y,
$mask_x, $mask_y, $dst_x, $dst_y,
$width, $height)
$x-&gt;RenderFillRectangles($op, $dst, [$red, $green, $blue, $alpha],
[$x, $y, $width, $height], ...)
$x-&gt;RenderTrapezoids($op, $src, $src_x, $src_y, $dst, $mask_format,
[$top, $bottom, $lx1, $ly1, $lx2, $ly2,
$rx1, $ry1, $rx2, $ry2] ,...)
$x-&gt;RenderTriangles($op, $src, $src_x, $src_y, $dst, $mask_format,
[$x1, $y1, $x2, $y2, $x3, $y3])
$x-&gt;RenderTriStrip($op, $src, $src_x, $src_y, $dst, $mask_format,
[$x, $y], [$x, $y], [$x, $y], [$x, $y], ...)
$x-&gt;RenderTriFan($op, $src, $src_x, $src_y, $dst, $mask_format,
[$x, $y], [$x, $y], [$x, $y], [$x, $y], ...)
$x-&gt;RenderCreateGlyphSet($gsid, $format)
$x-&gt;RenderReferenceGlyphSet($gsid, $existing)
$x-&gt;RenderFreeGlyphSet($gsid)
$x-&gt;RenderAddGlyphs($gsid, [$glyph, $width, $height,
$x, $y, $x_off, $y_off, $data], ...)
</PRE>
<P>
Warning: with some server implementations (including XFree86 through 4.4)
passing more than one glyph to AddGlyphs can hang or crash the server.
So don't do that.
<P>
<PRE>
$x-&gt;RenderFreeGylphs($gsid, @glyphs)
$x-&gt;RenderCompositeGlyphs8($op, $src, $dst, $mask_format, $gsid,
$src_x, $src_y,
[$delta_x, $delta_y, $str], ...)
$x-&gt;RenderCompositeGlyphs16($op, $src, $dst, $mask_format, $gsid,
$src_x, $src_y,
[$delta_x, $delta_y, $str], ...)
$x-&gt;RenderCompositeGlyphs32($op, $src, $dst, $mask_format, $gsid,
$src_x, $src_y,
[$delta_x, $delta_y, $str], ...)
</PRE>
<P>
In these three requests, new GlyphSetIDs can also be interspersed with
the array references.
<P>
<PRE>
$x-&gt;RenderCreateCursor($cid, $source, $hot_x, $hot_y)
$x-&gt;RenderCreateAnimCursor($cid, [$cursor, $delay], ...)
</PRE>
<A NAME="lbAG">&nbsp;</A>
<H2>AUTHOR</H2>
Stephen McCamant &lt;<A HREF="mailto:SMCCAM@cpan.org">SMCCAM@cpan.org</A>&gt;.
<A NAME="lbAH">&nbsp;</A>
<H2>SEE ALSO</H2>
<I><A HREF="/cgi-bin/man/man2html?1+perl">perl</A></I>(1),
X11::Protocol,
<I>The X Rendering Extension (XFree86 draft standard)</I>.
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="4"><A HREF="#lbAE">SYMBOLIC CONSTANTS</A><DD>
<DT id="5"><A HREF="#lbAF">REQUESTS</A><DD>
<DT id="6"><A HREF="#lbAG">AUTHOR</A><DD>
<DT id="7"><A HREF="#lbAH">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:06:00 GMT, March 31, 2021
</BODY>
</HTML>