Antialiasing

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

Antialiasing

Post by Todd_Z »

http://www.acdrifter.com/Visitors/?page=Browsers

The Pie Graph looks really ugly, is there anyway to make it look like straight lines, etc.
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

What are you using to create the graph? Jgraph?
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

Post by Todd_Z »

custom script using gd library
User avatar
wwwapu
Forum Contributor
Posts: 197
Joined: Wed Apr 07, 2004 11:57 am
Location: Turku, Finland

Post by wwwapu »

Maybe this is something yuo need.Undocumented but anyways http://fi2.php.net/manual/en/function.i ... ialias.php
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

What I do to antialias is make the image twice as big as it needs to be, then create a true color image the right size, and use imagecopyresampled to copy the big version into the correct size version.

See this method in action at: http://www.ooer.com/spirograph/
User avatar
Todd_Z
Forum Regular
Posts: 708
Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan

Post by Todd_Z »

Onion2k - That was an amazing method. It worked perfectly.
Post Reply