$pdf->SetTextColor(0); $pdf->SetFont($pdf->FontStd, 'B', 7); $pdf->SetXY(10 + ColName + ($TgFirst - $FirstTarget) * $DimTarget, $TopPos + 3); $pdf->Cell($DimTarget * $TgNo, $CurDistGap, $Distance, 'LR', 0, "C"); } // scrive il rettangolo colorato di sfondo $pdf->SetFillColor($TmpColor[0], $TmpColor[1], $TmpColor[2]); $pdf->SetTextColor($TmpColor[3]); $pdf->Rect(10 + ColName + ($TgFirst - $FirstTarget) * $DimTarget, $TopPos + 3 + $CurDistGap, $DimTarget * $TgNo, 8, "DF"); // if($OldEvent=='RX10') { //// $pdf->Output(); //// die(); // debug_svela($TgNo,true); // } // scrive evento e fase scontornato in bianco $pdf->SetDrawColor(255); $pdf->TextOutline = 2; $pdf->TextOutlineWidth = 1.5; $pdf->SetFont($pdf->FontStd, 'B', 10); $pdf->SetXY(10 + ColName + ($TgFirst - $FirstTarget) * $DimTarget, $TgTop + $CurDistGap); $pdf->Cell($DimTarget * $TgNo, 4, substr($TgText, 0, strpos($TgText, "|")), "", 0, "C", 0); $pdf->SetFont($pdf->FontStd, 'B', 8); $pdf->SetXY(10 + ColName + ($TgFirst - $FirstTarget) * $DimTarget, $TgTop + 4 + $CurDistGap); $pdf->Cell($DimTarget * $TgNo, 4, substr(strrchr($TgText, "|"), 1), "", 0, "C", 0); // riscrive il tutto ma in nero $pdf->SetDrawColor(0); $pdf->TextOutline = 0; $pdf->SetFont($pdf->FontStd, 'B', 10); $pdf->SetXY(10 + ColName + ($TgFirst - $FirstTarget) * $DimTarget, $TgTop + $CurDistGap); $pdf->Cell($DimTarget * $TgNo, 4, substr($TgText, 0, strpos($TgText, "|")), "", 0, "C", 0); $pdf->SetFont($pdf->FontStd, 'B', 8);
$MaxHeight = 0; $OldTeam = $MyRow->NationCode; $OldDiv = '#@#@#'; } //Cambio di divisione if ($OldDiv != $MyRow->DivCode) { $RowX = 15; $pdf->SetXY($RowX, $pdf->GetY() + 10); $pdf->SetFont($pdf->FontStd, 'B', 10); $pdf->Cell(185, 7, $MyRow->DivDescription, 0, 1, 'L', 0); $RowY = $pdf->GetY() + 1; $MaxHeight = 0; $OldDiv = $MyRow->DivCode; } //Carico l'immagine $pdf->SetDrawColor(0x99, 0x0, 0x0); $height = 0; if (!is_null($MyRow->PhPhoto)) { $im = imagecreatefromstring(base64_decode($MyRow->PhPhoto)); $height += imagesy($im) * 20 / imagesx($im); imagedestroy($im); $pdf->Image('@' . base64_decode($MyRow->PhPhoto), $RowX + 6, $RowY, 20, 0); $pdf->Rect($RowX + 6, $RowY, 20, $height, 'D'); } $MaxHeight = $MaxHeight > $height ? $MaxHeight : $height; // Inizio dei dati degli atleti $pdf->SetDefaultColor(); $pdf->SetFont($pdf->FontStd, '', 8); $pdf->SetXY($RowX, $RowY + ($height > 0 ? $height : $MaxHeight) + 2); $pdf->Cell(32, 4, $MyRow->FirstName . ' ' . $MyRow->Name, 0, 0, 'C', 0); $RowX += 37;