/usr/share/doc/racket/draw/unsafe.html is in racket-doc 6.7-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>29 Unsafe Libraries</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">▼</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">The Racket Drawing Toolkit</a></td></tr></table></div><div class="tocviewsublisttop" style="display: block;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="overview.html" class="tocviewlink" data-pltdoc="x">Overview</a></td></tr><tr><td align="right">2 </td><td><a href="bitmap_.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bitmap%</span></span></a></td></tr><tr><td align="right">3 </td><td><a href="bitmap-dc_.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bitmap-<wbr></wbr>dc%</span></span></a></td></tr><tr><td align="right">4 </td><td><a href="brush_.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">brush%</span></span></a></td></tr><tr><td align="right">5 </td><td><a href="brush-list_.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">brush-<wbr></wbr>list%</span></span></a></td></tr><tr><td align="right">6 </td><td><a href="color_.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">color%</span></span></a></td></tr><tr><td align="right">7 </td><td><a href="color-database___.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">color-<wbr></wbr>database<%></span></span></a></td></tr><tr><td align="right">8 </td><td><a href="dc___.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">dc<%></span></span></a></td></tr><tr><td align="right">9 </td><td><a href="dc-path_.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">dc-<wbr></wbr>path%</span></span></a></td></tr><tr><td align="right">10 </td><td><a href="font_.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">font%</span></span></a></td></tr><tr><td align="right">11 </td><td><a href="font-list_.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">font-<wbr></wbr>list%</span></span></a></td></tr><tr><td align="right">12 </td><td><a href="font-name-directory___.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">font-<wbr></wbr>name-<wbr></wbr>directory<%></span></span></a></td></tr><tr><td align="right">13 </td><td><a href="gl-config_.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">gl-<wbr></wbr>config%</span></span></a></td></tr><tr><td align="right">14 </td><td><a href="gl-context___.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">gl-<wbr></wbr>context<%></span></span></a></td></tr><tr><td align="right">15 </td><td><a href="linear-gradient_.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">linear-<wbr></wbr>gradient%</span></span></a></td></tr><tr><td align="right">16 </td><td><a href="pdf-dc_.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pdf-<wbr></wbr>dc%</span></span></a></td></tr><tr><td align="right">17 </td><td><a href="pen_.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pen%</span></span></a></td></tr><tr><td align="right">18 </td><td><a href="pen-list_.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pen-<wbr></wbr>list%</span></span></a></td></tr><tr><td align="right">19 </td><td><a href="point_.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">point%</span></span></a></td></tr><tr><td align="right">20 </td><td><a href="post-script-dc_.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">post-<wbr></wbr>script-<wbr></wbr>dc%</span></span></a></td></tr><tr><td align="right">21 </td><td><a href="ps-setup_.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">ps-<wbr></wbr>setup%</span></span></a></td></tr><tr><td align="right">22 </td><td><a href="radial-gradient_.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">radial-<wbr></wbr>gradient%</span></span></a></td></tr><tr><td align="right">23 </td><td><a href="record-dc_.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">record-<wbr></wbr>dc%</span></span></a></td></tr><tr><td align="right">24 </td><td><a href="region_.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">region%</span></span></a></td></tr><tr><td align="right">25 </td><td><a href="svg-dc_.html" class="tocviewlink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">svg-<wbr></wbr>dc%</span></span></a></td></tr><tr><td align="right">26 </td><td><a href="Drawing_Functions.html" class="tocviewlink" data-pltdoc="x">Drawing Functions</a></td></tr><tr><td align="right">27 </td><td><a href="Drawing_Contracts.html" class="tocviewlink" data-pltdoc="x">Drawing Contracts</a></td></tr><tr><td align="right">28 </td><td><a href="Signature_and_Unit.html" class="tocviewlink" data-pltdoc="x">Signature and Unit</a></td></tr><tr><td align="right">29 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Unsafe Libraries</a></td></tr><tr><td align="right">30 </td><td><a href="Drawing_Conveniences.html" class="tocviewlink" data-pltdoc="x">Drawing Conveniences</a></td></tr><tr><td align="right">31 </td><td><a href="libs.html" class="tocviewlink" data-pltdoc="x">Platform Dependencies</a></td></tr><tr><td align="right"></td><td><a href="doc-bibliography.html" class="tocviewlink" data-pltdoc="x">Bibliography</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">►</a></td><td>29 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Unsafe Libraries</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">29.1 </td><td><a href="#%28part._.Handle_.Brushes%29" class="tocviewlink" data-pltdoc="x">Handle Brushes</a></td></tr><tr><td align="right">29.2 </td><td><a href="#%28part._.Cairo_.Library%29" class="tocviewlink" data-pltdoc="x">Cairo Library</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">29.1<tt> </tt></span><a href="#%28part._.Handle_.Brushes%29" class="tocsubseclink" data-pltdoc="x">Handle Brushes</a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fdraw%2Funsafe%2Fbrush..rkt%29._make-handle-brush%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>handle-<wbr></wbr>brush</span></span></a></td></tr><tr><td><span class="tocsublinknumber">29.2<tt> </tt></span><a href="#%28part._.Cairo_.Library%29" class="tocsubseclink" data-pltdoc="x">Cairo Library</a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fdraw%2Funsafe%2Fcairo-lib..rkt%29._cairo-lib%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">cairo-<wbr></wbr>lib</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.7", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.7");">top</a></span><span class="navright"> <a href="Signature_and_Unit.html" title="backward to "28 Signature and Unit"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "The Racket Drawing Toolkit"" data-pltdoc="x">up</a> <a href="Drawing_Conveniences.html" title="forward to "30 Drawing Conveniences"" data-pltdoc="x">next →</a></span> </div><h3 x-source-module="(lib "scribblings/draw/draw.scrbl")" x-source-pkg="draw-doc" x-part-tag=""unsafe"">29<tt> </tt><a name="(part._unsafe)"></a>Unsafe Libraries</h3><p>The <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/draw</span></a> library is currently implemented using Cairo
and Pango. The <span class="RktSym"><a href="bitmap_.html#%28meth._%28%28%28lib._racket%2Fdraw..rkt%29._bitmap~25%29._get-handle%29%29" class="RktValLink" data-pltdoc="x">get-handle</a></span> in <span class="RktSym"><a href="bitmap_.html" class="RktValLink" data-pltdoc="x">bitmap%</a></span> method exposes the
underlying Cairo surface for a <span class="RktSym"><a href="bitmap_.html" class="RktValLink" data-pltdoc="x">bitmap%</a></span> object, while
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fdraw%2Funsafe%2Fbrush..rkt%29._make-handle-brush%29%29" class="RktValLink" data-pltdoc="x">make-handle-brush</a></span> supports the creation of a brush from an
existing Cairo surface. The representation of handles for these
methods, however, is subject to change if the <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/draw</span></a>
library is implemented differently in the future.</p><h4 x-source-module="(lib "scribblings/draw/draw.scrbl")" x-source-pkg="draw-doc" x-part-tag=""Handle_Brushes"">29.1<tt> </tt><a name="(part._.Handle_.Brushes)"></a><a name="(mod-path._racket/draw/unsafe/brush)"></a>Handle Brushes</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._racket%2Fdraw%2Funsafe%2Fbrush%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/draw/unsafe/brush</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">draw-lib</span></span></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/draw/unsafe/brush..rkt)._make-handle-brush))"></a><span title="Provided from: racket/draw/unsafe/brush | Package: draw-lib"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fdraw%2Funsafe%2Fbrush..rkt%29._make-handle-brush%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-handle-brush</a></span></span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">handle</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">width</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">height</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">transformation</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span></td></tr><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="hspace"> </span>[</td><td valign="top"><span class="RktPn">#:copy?</span><span class="hspace"> </span><span class="RktVar">copy?</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">→</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Object_and_Class_Contracts.html%23%2528def._%2528%2528lib._racket%252Fclass..rkt%2529._is-a%7E3f%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">is-a?/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="brush_.html" class="RktValLink" data-pltdoc="x">brush%</a></span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">handle</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=foreign&rel=foreign_pointer-funcs.html%23%2528def._%2528%2528quote._%7E23%7E25foreign%2529._cpointer%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">cpointer?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">width</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">height</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._exact-nonnegative-integer%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td valign="top"><span class="hspace"> </span></td><td valign="top"><span class="RktVar">transformation</span></td><td valign="top"><span class="hspace"> </span></td><td valign="top">:</td><td valign="top"><span class="hspace"> </span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vector%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">vector/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fvector..rkt%2529._vector%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">vector/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">real?</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=number-types.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._real%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">real?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">copy?</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span><span class="hspace"> </span>=<span class="hspace"> </span><span class="RktVal">#t</span></td></tr></table></blockquote></div><div class="SIntrapara">Creates a brush given a <span class="RktVar">handle</span> that (currently) is a
<span class="stt">cairo_surface_t</span>. If <span class="RktVar">copy?</span> is true, then the surface is
copied, so that it can be freed or modified after the brush is
created; if <span class="RktVar">copy?</span> is <span class="RktVal">#f</span>, the surface must remain available
and unchanged as long as the brush can be used.</div></p><p>The <span class="RktVar">width</span> and <span class="RktVar">height</span> arguments specify the surface
bounds for use when the surface must be copied—<wbr></wbr>even when
<span class="RktVar">copy?</span> is <span class="RktVal">#f</span>. The surface may need to be converted to a
stipple bitmap, for example, when drawing to a monochrome target.</p><p>The given surface is treated much like a stipple bitmap: it is
implicitly repeated, and the given <span class="RktVar">transformation</span> (if any)
determines the surface’s alignment relative to the target drawing
context.</p><p>When the brush is used with a <span class="RktSym"><a href="record-dc_.html" class="RktValLink" data-pltdoc="x">record-dc%</a></span> object, and if that
object’s <span class="RktSym"><a href="record-dc_.html#%28meth._%28%28%28lib._racket%2Fdraw..rkt%29._record-dc~25%29._get-recorded-datum%29%29" class="RktValLink" data-pltdoc="x">get-recorded-datum</a></span> method is called, then the
surface is effectively converted to a stipple bitmap for the result datum.</p><h4 x-source-module="(lib "scribblings/draw/draw.scrbl")" x-source-pkg="draw-doc" x-part-tag=""Cairo_Library"">29.2<tt> </tt><a name="(part._.Cairo_.Library)"></a><a name="(mod-path._racket/draw/unsafe/cairo-lib)"></a>Cairo Library</h4><p><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left" colspan="2"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._racket%2Fdraw%2Funsafe%2Fcairo-lib%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/draw/unsafe/cairo-lib</span></a><span class="RktPn">)</span></td></tr><tr><td align="left"> </td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">draw-lib</span></span></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._racket/draw/unsafe/cairo-lib..rkt)._cairo-lib))"></a><span title="Provided from: racket/draw/unsafe/cairo-lib | Package: draw-lib"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fdraw%2Funsafe%2Fcairo-lib..rkt%29._cairo-lib%29%29" class="RktValDef RktValLink" data-pltdoc="x">cairo-lib</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=foreign&rel=Loading_Foreign_Libraries.html%23%2528def._%2528%2528quote._%7E23%7E25foreign%2529._ffi-lib%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">ffi-lib?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">A reference to the Cairo library for use with functions such as
<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=foreign&rel=Loading_Foreign_Libraries.html%23%2528def._%2528%2528lib._ffi%252Funsafe..rkt%2529._get-ffi-obj%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">get-ffi-obj</a></span>, or <span class="RktVal">#f</span> if Cairo is unavailable.</div></p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.7", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.7");">top</a></span><span class="navright"> <a href="Signature_and_Unit.html" title="backward to "28 Signature and Unit"" data-pltdoc="x">← prev</a> <a href="index.html" title="up to "The Racket Drawing Toolkit"" data-pltdoc="x">up</a> <a href="Drawing_Conveniences.html" title="forward to "30 Drawing Conveniences"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|