List Info

Thread: PerlMagick Draw() questions




PerlMagick Draw() questions
user name
2006-02-23 16:42:52
That makes sense, but it's still not giving me the behavior
I'm 
expecting...here are some examples:

http://test.fend
errhodes.org/arc.php

The 5th & 6th numbers seem to determine the relative
size & skew of the 
arc compared to a circle (setting one of the values to 0 or
leaving the 
6th number out altogether gives you a straight line).  I
also tried 
adding 7th & 8th numbers thinking they might be flags
similar to the 
command-line syntax, or that maybe the angle values belong
in that 
position...but apparently they turn the arc into a polygon!

Timothy Hunter wrote:
> If PerlMagick is anything like RMagick (and I have no
reason to believe 
> it isn't), then the first two pairs of numbers are the
coordinates of a 
> rectangle that bounds the arc. The 5th number is the
angle in degrees 
> where the arc should start (0 degrees is at 3 o'clock)
and the 6th 
> number is the angle in degrees where the arc should
end. Here's an 
> example for the arc defined by (40, 50, 250,180,
0,270).
> 
> Hope this helps!
> 
> 
> 
> 
> 
> On Feb 22, 2006, at 10:40 AM, James Garfield wrote:
> 
>> I'm trying to figure out how the
"points" string passed to the 
>> PerlMagick Draw() method affects the drawing of an
ImageMagick arc:
>>
>> $image->Draw(
>>     stroke => 'black',
>>     fill => 'white',
>>     primitive => 'arc',
>>     points => '150,100 100,50 1,1',
>>     strokewidth => 2
>>     );
>>
>> So far all I've got is that the first two pairs
are the start & end 
>> coordinates.  What are the other values that are
supposed to follow, 
>> i.e. to shape & scale the arc?
>> _______________________________________________
>> Magick-users mailing list
>> Magick-usersimagemagick.org
>> http://studio.imagemagick.org/mailman/listinfo/magick
-users
> 

_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users
PerlMagick Draw() questions
user name
2006-02-27 00:22:22
James Garfield on  wrote...
| That makes sense, but it's still not giving me the
behavior I'm 
| expecting...here are some examples:
| 
| http://test.fend
errhodes.org/arc.php
| 
| The 5th & 6th numbers seem to determine the relative
size & skew of the 
| arc compared to a circle (setting one of the values to 0
or leaving the 
| 6th number out altogether gives you a straight line).  I
also tried 
| adding 7th & 8th numbers thinking they might be flags
similar to the 
| command-line syntax, or that maybe the angle values belong
in that 
| position...but apparently they turn the arc into a
polygon!
| 

First..
   when you give radius numbers which are too small, to work
with the
   line length given, they are used as a ration of maximum
and minimum
   axis lengths.

   As such the 5 and 6 number will produce a circle for
values 1 1
   for 1 2 or 2 1  you get one axis twice the length of the
other axis.

Second if you add even more numbers it isn't that the arc
becomes a
polygon, but that the extra numbers are passed to the SVG
arc function
as the start of a second arc.

In other words you are suddenly suppling extra path
elements, and
confusing the internal IM graphic algorthims.  Of course in
that case
you will get 'undefined' results, as nothing is programmed
into the
perlMagick API to handle extra numbers.

Basically   garbage in,  garbage out.

PS:  your last example has line segments going to points 1,1
and 90,180
but DO NOT RELAY ON IT.   This 'extra numbers' bug may get
fixed,
then again it may not get fixed, as misuse is itself a bug.


  Anthony Thyssen ( System Programmer )    <A.Thyssengriffith.edu.au>
 -----------------------------------------------------------
------------------
    Philosophy (n):  unintelligible answers to insoluble
problems.
 -----------------------------------------------------------
------------------
     Anthony's Home is his Castle     http://www.cit.gu.
edu.au/~anthony/
_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )