• Login or register

discuss.effbot.org

  • Popular
  • Recent
  • The aggdraw Module (effbot.org)
    1 point by effbot 4 months ago
    • 4 comments
  • 1 point by yanone 1 month ago 1 child

    hi fredrik,

    i'll try to contact you this way since i couldn't find an email on your site.

    aggdraw. the curveto() doesn't work. it draws straight lines instead of curves.
    the last post by tal leming regarding this is from march 2006. have you made progress in this field? i even tried the dev svn version.

    i can't find any other way to draw PS outlines into an image, since the Path() of renderPM of reportlab isn't implemented yet, and drawing a PDF and imagemagicking it into an image is the least thing i would like to do.

    i'll buy you any refreshment you like, if you help me on this.
    thanks and best regards,
    yanone

    • link
    • reply
    • 1 point by effbot 1 month ago 0 children

      I've posted a workaround to the image-sig mailing list. It's probably not the best way to do it, but it'll hopefully get you going.

      • link
      • reply
  • 2 points by nu 4 months ago 1 child

    [ Bug report for aggdraw Dib module]
    Hi. I'm a Japanese, so plese excuse my poor English.

    1) Scanlines of Windows DIB must be 4-byte aligned , but draw_dib() function in aggdraw.cxx doesn't consider that.
    The result of this is somewhat distorted output, when width % 4 != 0.

    2) In function draw_dealloc(), buffer_data[] is deleted by ordinary operater delete[].
    This is OK for Draw object created by draw_new(), but too bad for Dib object created by draw_dib().
    In case of Dib, buffer_data is a pointer given by the CreateDIBSection() API , and not allocated by ordinary operator new[].
    So you must not delete[] this.

    • link
    • reply
    • 1 point by effbot 4 months ago 0 children

      The alignment bug was supposed to be fixed in 1.2a3, but doesn't seem to have made it to the source drop (pilot error?). Anyway, just change the stride calculation to "int stride = (xsize * 3 + 3) & -4;" and you're fine.

      I'll look into the other bug; there are some other fixes done since the a3 release, and it's been sitting in alpha for way too long, so I guess it's time for a new (and non-alpha) release... Thanks /F

      • link
      • reply
  • Widget
  • Recent Comments
  • Leaders
Powered by slinkset.com