<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    As I recall, integer coordinates will refer to positions between
    pixels.  If you add 0.5 to your coordinates then you will draw the
    line at the center of the pixel and it will be possible to have a
    single pixel width line.<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 12/29/2015 3:00 PM, Christos
      Sotiriou wrote:<br>
    </div>
    <blockquote
cite="mid:CANp+zOFtwpKs_d_BYoeE0vA4Q9jMBPkA1U8oCjd1AbmXSqxVPg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_default" style="color:rgb(7,55,99)">Hello,<br>
          <br>
        </div>
        <div class="gmail_default" style="color:rgb(7,55,99)">for an
          application using GTK and Cairo for its back-end I am drawing
          to <b>integer</b> <b>coordinates</b> (cairo scale is 1) for
          efficiency using simple cairo function calls.<br>
          <br>
        </div>
        <div class="gmail_default" style="color:rgb(7,55,99)">I would
          like to draw single pixel lines. In Cairo version
          cairo-1.14.0-2.fc20.x86_64, using a line width of <b>1 (or
            1.0)</b> works fine.<br>
          <br>
        </div>
        <div class="gmail_default" style="color:rgb(7,55,99)">In Cairo
          version 1.8.8-2.1.48 (Suse) a line width of 1 does not draw
          the line at all, or draws halfway.<br>
          <br>
        </div>
        <div class="gmail_default" style="color:rgb(7,55,99)">When I
          change the line width to <b>2 (or 2.0)</b>, the line is
          drawn. I know that in the FAQ a line width of 2.0 is
          recommended : <a moz-do-not-send="true"
            href="http://cairographics.org/FAQ/#sharp_lines">http://cairographics.org/FAQ/#sharp_lines</a>.<br>
          <br>
        </div>
        <div class="gmail_default" style="color:rgb(7,55,99)">Is this
          the only solution, i.e. to change the line width to 2.0? When
          I do that the lines appear slightly thicker that I would like!<br>
        </div>
        <div class="gmail_default" style="color:rgb(7,55,99)"><br>
        </div>
        <div class="gmail_default" style="color:rgb(7,55,99)">Thank you
          for your help,<br>
        </div>
        <div class="gmail_default" style="color:rgb(7,55,99)"><br>
        </div>
        <div class="gmail_default" style="color:rgb(7,55,99)">Christos.<br
            clear="all">
        </div>
        <br>
        -- <br>
        <div class="gmail_signature">
          <div dir="ltr">
            <div>
              <div dir="ltr">
                <div>--------------------------------------------------------------------------<br>
                  Christos P. Sotiriou<br>
                  email: <a moz-do-not-send="true"
                    href="mailto:csotiriou@gmail.com" target="_blank">csotiriou@gmail.com</a><br>
                  Cell (GR): +30 697 8984 222<br>
                </div>
                <div>Cell (US): +1 858 247 9436<br>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <br>
  </body>
</html>