Comments for "EllipseArc"

» Submit Your Comment
Please log in to enter your comment. If you are not a registered PEAR developer, you can comment by sending an email to pear-dev@lists.php.net.
» Comments
  • Vasil Rangelov  [2011-12-10 13:16 UTC]

    I don't get it... the manual page of imagecreatearc()[1] shows there is a width parameter, so thick arcs should be supported, no?

    As for alpha transparency on thick arcs, if it is supported on 1px wide arcs, but not for ones with larger width, I'd count that as a bug in PHP.


    [1] http://php.net/manual/en/function.imagearc.php
  • Vasil Rangelov  [2011-12-10 13:22 UTC]

    Oh... sorry... I read the comments on the very page I linked to, and realized... you're talking about *borders* thicker than 1px. The way you've phrased it in your documentation page made it sound as if you were talking about the arcs themselves.
  • Austin Ekwebelam  [2011-12-11 00:16 UTC]

    Thanks Vasil, I'll look at the wording to make it a bit clearer.
  • Christian Weiske  [2011-12-12 07:42 UTC]

    The "class" is just a classifief function that draws an arc on a gd resource, which is not stated anywhere int that class. It also defines a function which is unneeded.

    I think you should merge that code as single function into Image_Canvas, but not propose it as standalone package.
  • Austin Ekwebelam  [2011-12-12 09:23 UTC]

    Hi Christian,

    Your observation about EllipseArc being a classified function is correct. It was initially a function: it was when I tried to make it "PEAR-Ready" that I had to make it a class (I'm quite new to PHP, and every PEAR example/tutorial I saw seemed to demand the use of a class... oh well, I learnt how to use PHP classes as a result).

    My real intention was to write a function that was equivalent to "imagearc" and "imagefilledarc": I didn't want or need a class. I investigated using Image_Canvas prior to making EllipseArc an independent class but I felt that Image_Canvas contained too many other things that a user might not want. For example, I've drawn many shapes and often used imagearc, imagefilledarc, imagepolygon etc but have never used or needed Image_Canvas.

    The code for EllipseArc also seemed a bit large to squeeze into another class. This in itself is not a problem: if it has to go into Image_Canvas, then I'll do it.

    The "wrapper" function was mainly provided as a way to show how I originally wanted EllipseArc to be used: I wanted it to be called in the same manner as imagearc and imagefilledarc (I even arranged EllipseArc's arguments so it has a similar pattern to those two functions).