$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; if ($RowX >= 185) { $RowX = 15; $RowY += $MaxHeight + 6 + 5; if (!$pdf->SamePage($MaxHeight + 6 + 5)) { $OldTeam = '#@#@#'; } }
} else { // $TgNo++; } } // if($OldEvent=='CCW04') debug_svela($TgNo,true); // Distance if ($Distance) { $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);
if ($MyRow = safe_fetch($Rs)) { if ($actTarget != $MyRow->Target or $MyRow->Dist != $TgText) { $actTarget++; $TgNo++; } } else { $TgNo++; } } if (!$TgNo) { $TgNo = 1; } $pdf->SetFillColor(128); if ($SecondaryDistance == 1) { $pdf->SetFont($pdf->FontStd, 'B', 12); $pdf->Rect(10 + ColName + ($TgFirst - 1) * $DimTarget, $TgTop, $DimTarget * $TgNo, 10, 'DF'); $pdf->SetFillColor($TmpColor[0], $TmpColor[1], $TmpColor[2]); $pdf->SetXY(10 + ColName + ($TgFirst - 1) * $DimTarget + 1, $TgTop + 1); $pdf->Cell($DimTarget * $TgNo - 2, 8, $SecondaryDistance, 1, 0, "C", 1); } else { $pdf->SetFont($pdf->FontStd, 'BI', 8); $pdf->SetFillColor($TmpColor[0], $TmpColor[1], $TmpColor[2]); for ($i = 0; $i < $TgNo; $i++) { $pdf->Rect(10 + ColName + ($TgFirst + $i - 1) * $DimTarget, $TgTop, $DimTarget, 6, 'D'); $pdf->Circle(10 + ColName + ($TgFirst + $i - 0.5) * $DimTarget, $TgTop + 3, 1.5, 0, 360, 'DF'); } $pdf->SetXY(10 + ColName + ($TgFirst - 1) * $DimTarget, $TgTop + 6); $pdf->SetFillColor(255); $pdf->Cell($DimTarget * $TgNo, 4, $SecondaryDistance, 1, 0, "C", 1); } }