[rt-users] Graphviz anti-aliased output?
Ruslan Zakirov
ruz at bestpractical.com
Mon Aug 25 15:14:00 EDT 2008
It's not a limitation of the module. Try "print $graph->as_text" and
you'll see that it's has nothing specific that turn of anti-aliasing.
Tested with sample from the module using:
t.pl > res.png
t_with_as_text.pl | dot -Tpng > res_via_dot.png
Both images are anti-aliased.
On Mon, Aug 25, 2008 at 10:25 PM, Aaron Hathaway
<aaron.hathaway at prager.com> wrote:
>
>
>> -----Original Message-----
>> From: ruslan.zakirov at gmail.com [mailto:ruslan.zakirov at gmail.com] On Behalf Of
>> Ruslan Zakirov
>> Sent: Sunday, August 24, 2008 11:25 PM
>> To: Aaron Hathaway
>> Cc: rt-users at lists.bestpractical.com
>> Subject: Re: [rt-users] Graphviz anti-aliased output?
>>
>> On Mon, Aug 25, 2008 at 8:56 AM, Aaron Hathaway
>> <aaron.hathaway at prager.com> wrote:
>> > Message: 2
>> > Date: Sun, 24 Aug 2008 16:54:30 +1000
>> > From: trentbuck at gmail.com (Trent W. Buck)
>> > Subject: Re: [rt-users] Graphviz anti-aliased output?
>> > To: rt-users at lists.fsck.com
>> > Message-ID: <30bpzikimx.fsf at Clio.twb.ath.cx>
>> > Content-Type: text/plain; charset=us-ascii
>> >
>> > "Aaron Hathaway" <aaron.hathaway at prager.com> writes:
>> >
>> >> I know the latest version of Graphviz can output lovely anti-aliased
>> >> graphs. Is there an easy way to get RT to anti-alias its Graphviz
>> >> output?
>> >
>> >
>> > (Note: I have yet to look at RT's graphviz integration.)
>> >
>> > Perhaps an easy way would be to tell RT to use dot -Tsvg instead of
>> > -Tpng? Then the web pages would include SVG and be rendered client-side
>> > (and thus be antialiased in Firefox, at least).
>> >
>> > OTOH, this seems to be antialiased already (with graphviz 2.20):
>> >
>> > echo 'digraph { x -> y; }' | dot -Tpng | with-temp-file display
>> >
>> > so perhaps you just need to upgrade your Graphviz?
>> >
>> > I'm also running 2.2, and by default, it does output with anti-aliasing.
>> > But RT's implementation doesn't.
>> >
>> > I think this has to do with the perl module GraphViz, which handles
>> > integration with graphviz. I'm not sure the module can take advantage of
>> > anti-aliasing--but I don't know.
>> This module generates a graph in dot format. May be we use some
>> properties that disable anti-aliasing. I did some googling, but havn't
>> found anything interesting.
>> --
>> Best regards, Ruslan.
>
> It's a limitation of the module. I ran the test code from the module's README:
>
> use GraphViz;
>
> my $g = GraphViz->new();
>
> $g->add_node('London');
> $g->add_node('Paris', label => 'City of\nlurve');
> $g->add_node('New York');
>
> $g->add_edge('London' => 'Paris');
> $g->add_edge('London' => 'New York', label => 'Far');
> $g->add_edge('Paris' => 'London');
>
> print $g->as_png;
>
> It outputs an aliased PNG. SVG output (i.e., as_svg) is displayed--as you'd expect--with anti-aliasing.
>
> --Aaron
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>
--
Best regards, Ruslan.
More information about the rt-users
mailing list