img

13 příspěvků

Archiv diskusního fóra

Fórum je uzavřené a slouží pouze ke čtení. Některé informace mohou být zastaralé.

  1. zdravim... mam skript co vytvara 4 zagulatene rohy na boxoch, lenze pri 2 dolnych rohoch sa mi pri radiuse 10 (alebo 11?) zobrazuje taky cudny pas... da sa to nejako odstranit? tu je ten kod: <? header("Content-type: image/png"); $w=11; $h=11; $bcol=$_GET['bordercolor']; $bgcol=$_GET['bgcolor']; $radius=10; $border=1; $img=imagecreate($w+1,$h+1); $background=imagecolorallocatealpha($img,0,0,0,127); $borderc=imagecolorallocate($img,hexdec($bcol[0].$bcol[1]),hexdec($bcol[2].$bcol[3]),hexdec($bcol[4].$bcol[5])); $bg=imagecolorallocate($img,hexdec($bgcol[0].$bgcol[1]),hexdec($bgcol[2].$bgcol[3]),hexdec($bgcol[4].$bgcol[5])); if ($_GET['roh'] == "up_left") { imagefilledellipse($img,$radius,$radius,$radius*2,$radius*2,$borderc); imagefilledellipse($img,$border+$radius,$border+$radius,$radius*2,$radius*2,$bg); } elseif ($_GET['roh'] == "up_right") { imagefilledellipse($img,$w-$radius,$radius,$radius*2,$radius*2,$borderc); imagefilledellipse($img,$w-$border-$radius,$border+$radius,$radius*2,$radius*2,$bg); } elseif ($_GET['roh'] == "down_left") { imagefilledellipse($img,$radius,$h-$radius,$radius*2,$radius*2,$borderc); imagefilledellipse($img,$border+$radius,$w-$border-$radius,$radius*2,$radius*2,$bg); } elseif ($_GET['roh'] == "down_right") { imagefilledellipse($img,$w-$radius,$h-$radius,$radius*2,$radius*2,$borderc); imagefilledellipse($img,$w-$border-$radius,$w-$border-$radius,$radius*2,$radius*2,$bg); } ImagePNG($img); ?>
  2. ano, da.
  3. diki.. moc si mi pomohol...
  4. nevím sice jak to odstranit ale na 11 řádku je chyba: $borderc=imagecolorallocate($img,hexdec($bcol[0].$bcol[1]),hexdec($bcol[2].$bcol[3]),hexde c($bcol[4].$bcol[5])); Opravenej script: <? header("Content-type: image/png"); $w=11; $h=11; $bcol=$_GET['bordercolor']; $bgcol=$_GET['bgcolor']; $radius=10; $border=1; $img=imagecreate($w+1,$h+1); $background=imagecolorallocatealpha($img,0,0,0,127); $borderc=imagecolorallocate($img,hexdec($bcol[0].$bcol[1]),hexdec($bcol[2].$bcol[3]),hexdec ($bcol[4].$bcol[5])); $bg=imagecolorallocate($img,hexdec($bgcol[0].$bgcol[1]),hexdec($bgcol[2].$bgcol[3]),hexdec ($bgcol[4].$bgcol[5])); if ($_GET['roh'] == "up_left") { imagefilledellipse($img,$radius,$radius,$radius*2,$radius*2,$borderc); imagefilledellipse($img,$border+$radius,$border+$radius,$radius*2,$radius*2,$bg); } elseif ($_GET['roh'] == "up_right") { imagefilledellipse($img,$w-$radius,$radius,$radius*2,$radius*2,$borderc); imagefilledellipse($img,$w-$border-$radius,$border+$radius,$radius*2,$radius*2,$bg); } elseif ($_GET['roh'] == "down_left") { imagefilledellipse($img,$radius,$h-$radius,$radius*2,$radius*2,$borderc); imagefilledellipse($img,$border+$radius,$w-$border-$radius,$radius*2,$radius*2,$bg); } elseif ($_GET['roh'] == "down_right") { imagefilledellipse($img,$w-$radius,$h-$radius,$radius*2,$radius*2,$borderc); imagefilledellipse($img,$w-$border-$radius,$w-$border-$radius,$radius*2,$radius*2,$bg); } ImagePNG($img); ?>
  5. heh tak nic mno ... wono se to zalamuje ... a tak se tam dělá mezera no .... :( $borderc=ima............dec($bcol[2].$bcol[3]),hexdec ($bcol[4].$bcol[5]));
  6. samozrejme... ved podrebujes premenne GET v URL bgcolor a bordercolor... musis ten script volat ako http://localhost/kresliroh.php?bgcolor=FF0000&bordercolor=0000FF
  7. Autor: timbulko (euphoria.wz.cz) Datum: 02. 03. 2006 17:20> (...) da sa to nejako odstranit? Autor: fx (fx.xf.cz) Datum: 02. 03. 2006 18:17> ano, da. Autor: timbulko (euphoria.wz.cz) Datum: 02. 03. 2006 18:20> diki.. moc si mi pomohol... LOL a cos cekal za odpoved?
  8. cakal som "rozumnu" odpoved...
  9. jak by jsi odpovedel na "da se to nejak odstranit" ? :) Ja teda bych odpovedel "ano".. ses uz nezeptal: "Da se to nejak odstranit? Pokud ano, tak jak?" :)
  10. kdyz cekas rozumnou odpoved, neni od veci polozit rozumnou otazku.
  11. http://stare.cz/otazky/ "Obecně vzato, neklaďte otázky typu ano-ne, pokud skutečně nežádáte odpověď typu ano-ne."
  12. jo, to je nase Bible :D
  13. ok, pytam sa este raz: ako sa da odstranit ta ciara zo skriptu hore?

← Zpět na všechna témata