(none) imager-devel
/ help / lists / applications / search /
 

Re: Ellipses & Antialiasing

From: Tony Cook (
18926@xyz.molar.is)
Date: Thu 17 Apr 2008 - 00:00:45 GMT

  • Next message: Bruno Czekay: "Re: Ellipses & Antialiasing"

    On Wed, Apr 16, 2008 at 12:11:53PM +0200, Bruno Czekay wrote:
    > Hello
    >
    > Two questions:
    > 1. At the moment, Imager does not support drawing ellipses (or arcs of
    > elliptical shape). Is this feature somewhere near on the TODO list? AFAIK it
    > depends on some new C function in the underlying library.

    This is the first time I recall anyone asking for it.

    A complete ellipse, with the axes of symmetry parallel to the X and Y
    axes is pretty simple to support.

    Complexities include:

    a) when drawing a pie segment, are the angles specified the real
    angles (since the scaling changes the angles if you just use sin() and
    cos() directly) or the angle before scaling? I can see cases where
    both are useful.

    b) can you control the angles of the axes of symmetry? (the axes would
    remain at right angles to each other) Does this change the effect of
    the d1 and d2 parameters?

    I've added this to the TODO list.

    > 2. In the POD for Imager::Draw one can read "box, arc, do not support
    > antialiasing yet", however there are calls to functions like i_circle_aa or
    > i_arc_aa. I tried an arc with aa => 1 and it works fine (hovewer it is
    > filled, as the POD says).

    You're right. Anti-aliased arc() fills were added in 0.46. I've
    corrected the BUGS section for the next release.

    http://imager.perl.org/cgi-bin/viewcvs.cgi?rev=1465&view=rev

    Tony



  •