<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="cid:filelist.xml@01C74C36.CFD9F060">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:HyphenationZone>21</w:HyphenationZone>
<w:EnvelopeVis/>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;
        text-underline:single;}
span.StyleCourrierlectronique17
        {mso-style-type:personal-compose;
        mso-style-noshow:yes;
        mso-ansi-font-size:10.0pt;
        mso-bidi-font-size:10.0pt;
        font-family:Arial;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:windowtext;}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
span.GramE
        {mso-style-name:"";
        mso-gram-e:yes;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;
        mso-header-margin:35.4pt;
        mso-footer-margin:35.4pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
        {mso-style-name:"Tableau Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]-->
</head>
<body lang=FR link=blue vlink=purple style='tab-interval:35.4pt'>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>Hi,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>I’m a new user of Cairo.
I can draw and display directly into the drawable created by XcreateSimpleWindow;
but now, I’m trying to draw into a Pixmap with XcreatePixmap and then
display it in the window... <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>Sorry, It is probably
ridiculus for most of you. but I don’t understand.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><span
style='mso-spacerun:yes'> </span><span
style='mso-spacerun:yes'> </span>gc = XDefaultGCOfScreen(DefaultScreenOfDisplay(dpy));<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><span
style='mso-spacerun:yes'> </span>window = XCreateSimpleWindow (dpy,
rootwin, posX, posY, SIZEX, SIZEY, 0, BlackPixel(dpy, screen), BlackPixel(dpy,
screen));<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><span
style='mso-spacerun:yes'> </span>XStoreName(dpy, window, "Hello");<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><span
style='mso-spacerun:yes'> </span>XSelectInput(dpy, window,
ExposureMask|ButtonPressMask);<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><span
style='mso-spacerun:yes'> </span>XMapWindow(dpy, window);<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><span
style='mso-spacerun:yes'> </span><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><span
style='mso-spacerun:yes'> </span>drawable = XCreatePixmap (dpy, rootwin,
SIZEX, SIZEY, DefaultDepth (dpy, screen));<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><span
style='mso-spacerun:yes'> </span>surface = cairo_xlib_surface_create (dpy,
<b><span style='font-weight:bold'>drawable</span></b>, DefaultVisual (dpy,
screen), SIZEX, SIZEY);<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><span
style='mso-spacerun:yes'> </span>cairo_xlib_surface_set_size (surface,
SIZEX, SIZEY);<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><span
style='mso-spacerun:yes'> </span></span></font><span class=SpellE><span
class=GramE><font size=2 face=Arial><span style='font-size:10.0pt;font-family:
Arial'>paint</span></font></span></span><span class=GramE><font size=2
face=Arial><span style='font-size:10.0pt;font-family:Arial'>(</span></font></span><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>surface);<span
style='mso-tab-count:2'> </span>/*
<span class=SpellE>just</span> <span class=SpellE>draw</span> un <span
class=SpellE>circle</span> *<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'> </span><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><span style='mso-spacerun:yes'> </span></span></font><font
size=2 face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:Arial;
mso-ansi-language:EN-GB'>XCopyArea(dpy, drawable, window, gc, 0, 0, SIZEX,
SIZEY, 0, 0);<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial;mso-ansi-language:EN-GB'>Am I wrong? <o:p></o:p></span></font></p>
</div>
</body>
</html>