PIM Team Case Study: Creating Text Effects With PHP and GD

Written by Bobby Handzhiev


Continued from page 1

if(table=='shadows') { var content=""; var y=810; }

document.getElementById('tabler').style.pixelLeft=mouseX; document.getElementById('tabler').style.pixelTop=y; document.getElementById('tabler').style.visibility='visible'; document.getElementById('tabler').innerHTML=content; } Of course, oncerepparttar user selectrepparttar 107614 desired color we had to hiderepparttar 107615 pallette: function setColor(elid,color,fromid,shc) {

document.getElementById(elid).value=color; document.getElementById('tabler').style.visibility='hidden'; }

Thus we created nice palettes which appear and disappear on a single click and don't take much space onrepparttar 107616 screen.

- Drop Shawdows The decals offered hasrepparttar 107617 ability to have a drop shadow added so we had to add this option torepparttar 107618 online builder. PHP however didn't offered a nice function for that. We created a procedure which drawsrepparttar 107619 texts twice - oncerepparttar 107620 original 100% saturated text and oncerepparttar 107621 shadow with a percentage ofrepparttar 107622 color and appropriate displacement. Of courserepparttar 107623 shadow was drawn onrepparttar 107624 image beforerepparttar 107625 main text. @imagettftext($img, 20, $gr[$i], $x+$dx, $ys[$i]+$dy, $scolors[$shadowcolor], "fonts/".$_POST['fonts'],$word[$i]);

- Arcs The main problem came when we had to 'rotate'repparttar 107626 texts thru arcs. First we created perfect Bezie funtion which to drawrepparttar 107627 curves and adjustrepparttar 107628 letter above them. But what a surprise -repparttar 107629 curves looked perfect alone, but when we adjustedrepparttar 107630 letters above them they seemed rough. After studying this problem we realised thatrepparttar 107631 rough screen resolution andrepparttar 107632 disability to antialiserepparttar 107633 images wouldn't allow us to create nice arcs. We were standing against insoluble problem. We decided to create few arcs with a graphical software (CorelDraw) and to see what could be wrong. We noticed that Corel's curves were looking great after they are manually adjusted. However you can't just leaverepparttar 107634 program to create perfect curves automaticly. A human eye was needed to judge when a curve looks right and when not. We got a totally different direction. There wasn't an universal function to help us. The solution we found was to 'manually' adjust each letter. We created a procedure with cases which were adjusting each letter onrepparttar 107635 appropriate place and with appropriate rotation depending on how long wasrepparttar 107636 text. It worked! We created 2 arrays for each arc type - one array withrepparttar 107637 positions and one array withrepparttar 107638 rotations. The rest was simple: if($arctype) { $start=(35-$l)/2; if($start%2) $start+=1; $gr=array_slice($gr,$start,$l); $ys=array_slice($ys,$start,$l); }

if(!$arctype) { $ys=array(); $gr=array(); //makingrepparttar 107639 arrays for($i=0;$i<$l;$i++) { array_push($ys,50); array_push($gr,0); } }

You can go onrepparttar 107640 atec's site and tryrepparttar 107641 arcs we achieved (http://atecsigns.com/decal/step_1.php). Results Now A-tec Sings's web builder creates perfect decals with graphs, calculatesrepparttar 107642 price and allows you to addrepparttar 107643 decals to your shopping cart and chgeckout (the shopping cart software is also created by PIM Team Bulgaria). The builder allowsrepparttar 107644 visitor to createrepparttar 107645 desired decals with any color, dropped shadow, background and shape, to preview it and to calculaterepparttar 107646 cost for different sizes and quantities. The website and builder were promoted with massive radio advertising company. At that time it wasrepparttar 107647 only decal builder which allowed creating texts arround arcs. Conclusions - Use GD to create text effects - Do not forget that you can create you own functions for what GD does not offer - Do not always search for math perfect formulas. The graphical effects are intended torepparttar 107648 human eye - Load fonts inrepparttar 107649 server - Use javascript and hidden layers to achieve great flexibility

Bobby Handzhiev is senior developer in PIM Team Bulgaria


: Counter Strike, The beginner of Broad Band Pc Gaming:

Written by Fahad Ahmed Bashir


Continued from page 1

WEAPONS AND OTHER EQUIPMENTS: Weapons armors and other equipment are very important parts ofrepparttar game. There is a wide variety of different equipments like night vision, hand grenades and other pistols and guns. The player have to buy those stuff. In order to buy ammos and other equipments, player must be in a shopping cart area and more importantly have funds in his account. There are a lot of small and big, simple and advance equipments available in Counter Strike pistols and sub machine guns arerepparttar 107613 main features ofrepparttar 107614 game. Each Weapon is different from other. Thus allrepparttar 107615 Weapons and equipment gives a realistic touch torepparttar 107616 game. Money management is one ofrepparttar 107617 most important part ofrepparttar 107618 game. Therefore by buying a particular equipment or weapon and using atrepparttar 107619 time when it is needed will takerepparttar 107620 player atrepparttar 107621 top ofrepparttar 107622 game without any involvement of difficulty. PLAYING THE GAME: As there are two teams i-e Counter Terrorists and Terrorists. The player has option of either joining either ofrepparttar 107623 team. A server is created by any player usually byrepparttar 107624 host and every player must join that server in order to playrepparttar 107625 game. The Counter Terrorist look to eliminaterepparttar 107626 Terrorists completely or fulfillrepparttar 107627 map objectives whilerepparttar 107628 Terrorist forces look to completely destroyrepparttar 107629 Counter Terrorists. Thus different Map have different challenges and strategies for each team. When a player dies he is unable to continue playing untilrepparttar 107630 whole round ends untilrepparttar 107631 ending ofrepparttar 107632 roundrepparttar 107633 player enters a spectator mode which they are free to roam around throughoutrepparttar 107634 map and check out allrepparttar 107635 remaining actions. CONCLUSION: It can be concluded in a way that Counter Strike will always have this privilege that it isrepparttar 107636 starter ofrepparttar 107637 prefect broad band PC gaming which will lead to revolutionizerepparttar 107638 PC gaming world.



Hello I m Fahad Ahmed Bashir the student of Software Enginneering in Karachi University 1st year


    <Back to Page 1
 
ImproveHomeLife.com © 2005
Terms of Use