eaiovnaovbqoebvqoeavibavo AddExtGState(array('ca'=>$alpha, 'CA'=>$alpha, 'BM'=>'/'.$bm)); $this->SetExtGState($gs); } function AddExtGState($parms) { $n = count($this->extgstates)+1; $this->extgstates[$n]['parms'] = $parms; return $n; } function SetExtGState($gs) { $this->_out(sprintf('/GS%d gs', $gs)); } function _enddoc() { if(!empty($this->extgstates) && $this->PDFVersion<'1.4') $this->PDFVersion='1.4'; parent::_enddoc(); } function _putextgstates() { for ($i = 1; $i <= count($this->extgstates); $i++) { $this->_newobj(); $this->extgstates[$i]['n'] = $this->n; $this->_put('<extgstates[$i]['parms']; $this->_put(sprintf('/ca %.3F', $parms['ca'])); $this->_put(sprintf('/CA %.3F', $parms['CA'])); $this->_put('/BM '.$parms['BM']); $this->_put('>>'); $this->_put('endobj'); } } function _putresourcedict() { parent::_putresourcedict(); $this->_put('/ExtGState <<'); foreach($this->extgstates as $k=>$extgstate) $this->_put('/GS'.$k.' '.$extgstate['n'].' 0 R'); $this->_put('>>'); } function _putresources() { $this->_putextgstates(); parent::_putresources(); } //girar texto function TextWithDirection($x, $y, $txt, $direction='R') { if ($direction=='R') $s=sprintf('BT %.2F %.2F %.2F %.2F %.2F %.2F Tm (%s) Tj ET',1,0,0,1,$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt)); elseif ($direction=='L') $s=sprintf('BT %.2F %.2F %.2F %.2F %.2F %.2F Tm (%s) Tj ET',-1,0,0,-1,$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt)); elseif ($direction=='U') $s=sprintf('BT %.2F %.2F %.2F %.2F %.2F %.2F Tm (%s) Tj ET',0,1,-1,0,$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt)); elseif ($direction=='D') $s=sprintf('BT %.2F %.2F %.2F %.2F %.2F %.2F Tm (%s) Tj ET',0,-1,1,0,$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt)); else $s=sprintf('BT %.2F %.2F Td (%s) Tj ET',$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt)); if ($this->ColorFlag) $s='q '.$this->TextColor.' '.$s.' Q'; $this->_out($s); } function TextWithRotation($x, $y, $txt, $txt_angle, $font_angle=0) { $font_angle+=90+$txt_angle; $txt_angle*=M_PI/180; $font_angle*=M_PI/180; $txt_dx=cos($txt_angle); $txt_dy=sin($txt_angle); $font_dx=cos($font_angle); $font_dy=sin($font_angle); $s=sprintf('BT %.2F %.2F %.2F %.2F %.2F %.2F Tm (%s) Tj ET',$txt_dx,$txt_dy,$font_dx,$font_dy,$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt)); if ($this->ColorFlag) $s='q '.$this->TextColor.' '.$s.' Q'; $this->_out($s); } //**************************************************************************** */ // Tabla coloreada function GenerarCuadro($id_taller) { //FONDO $this->Image('assets/img/logo_ceg_redondo2.png','185','10','17','17','PNG'); //datos del alumno $this->SetFont('Arial','',15); $this->SetTextColor(20); $this->setXY(20,10); $this->SetFont('Arial','B',9);$this->Cell(40,10,utf8_decode("CENTRO EDUCATIVO GETSEMANÍ")); $this->setXY(20,15); $this->SetFont('Arial','B',9);$this->Cell(40,10,utf8_decode("Registro de Resultados Escuela de Arte Bimestral")); $this->setXY(20,20); $this->SetFont('Arial','B',9);$this->Cell(40,10,"del Rendimiento Escolar - Ciclo Escolar 2025"); $this->setXY(140,30); $this->SetFont('Arial','B',9);$this->Cell(40,10,"Bimestre: _________________________"); $this->setXY(140,36); $this->SetFont('Arial','B',9);$this->Cell(40,10,"Maestro: _________________________"); $this->setXY(140,42); $this->SetFont('Arial','B',9);$this->Cell(40,10,"Hora: _________________________"); $this->setXY(12,73); //datos $consultas=new Grados2(); $Taller=$consultas->BuscarNT($id_taller); foreach($Taller as $datosTaller){ $this->SetFont('Arial','B',9);$this->Cell(40,10,utf8_decode($datosTaller['nombre'])); } $this->setXY(10,70); $this->Cell(55,15,'',1,0,'C',false); //Empieza la cabecera $this->SetFillColor(225,228,242); $this->SetTextColor(0,0,0); $this->SetDrawColor(0, 0, 0); $this->SetFont('Arial','I',6); $this->setXY(68,55); $textoA=$this->TextWithDirection(72,94,'Responsabilidad (20 pts)','U'); $this->Cell(7,40,$textoA,1,0,'C',false); $textoA=$this->TextWithDirection(79,94,utf8_decode('Dedicación y ejecución (20 pts)'),'U'); $this->Cell(7,40,$textoA,1,0,'C',false); $textoA=$this->TextWithDirection(86,94,'Manejo de recursos y creatividad (20 pts)','U'); $this->Cell(7,40,$textoA,1,0,'C',false); $textoA=$this->TextWithDirection(93,94,utf8_decode('Comp, int. con compañeros y equipo (20 pts)'),'U'); $this->Cell(7,40,$textoA,1,0,'C',false); $textoA=$this->TextWithDirection(100,94,utf8_decode('Organización y limpieza (20 pts)'),'U'); $this->Cell(7,40,$textoA,1,0,'C',false); $textoA=$this->TextWithDirection(107,94,'Total (100 pts)','U'); $this->Cell(7,40,$textoA,1,0,'C',false); $this->SetFont('Arial','',7); $this->SetFont('Arial','',7); $this->setXY(10,95); $this->Cell(5,5,'No',1,0,'C',true); $this->Cell(8,5,'Carnet',1,0,'C',true); $this->Cell(48,5,'Apellidos y nombres del alumno',1,0,'C',true); $this->Cell(7,5,'1',1,0,'C',true); $this->Cell(7,5,'2',1,0,'C',true); $this->Cell(7,5,'3',1,0,'C',true); $this->Cell(7,5,'4',1,0,'C',true); $this->Cell(7,5,'5',1,0,'C',true); $this->Cell(7,5,'6',1,0,'C',true); $this->Ln(); //Buscar los datos $datosAlumnos=$consultas->buscarAlumnoT($id_taller); $this->SetWidths(array(5,8,48,7,7,7,7,7,7)); $ajuste=0; if($datosAlumnos){ $this->SetFont('Arial','I',7.5); $contador=1; $this->SetFont('Arial','I',7.5); foreach($datosAlumnos as $fila){ $this->setX(10); $this->Row(array($contador,$fila['carnet'],$fila['apellidos'].', '.$fila['nombres'].' - '.$fila['nombre_corto'],'','','','','',''), $contador); $contador++; } } } /* PARA MULTICELL*/ var $widths; var $aligns; function SetWidths($w) { //Set the array of column widths $this->widths=$w; } function SetAligns($a) { //Set the array of column alignments $this->aligns=$a; } function Row($data, $contador) { //Calculate the height of the row $nb=0; for($i=0;$iNbLines($this->widths[$i],$data[$i])); $h=4*$nb; //Issue a page break first if needed $this->CheckPageBreak($h); //Draw the cells of the row for($i=0;$iwidths[$i]; $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L'; //Save the current position $x=$this->GetX(); $y=$this->GetY(); //Draw the border $this->Rect($x,$y,$w,$h); //Print the text $this->MultiCell($w,4,$data[$i],0,$a); //Put the position to the right of the cell $this->SetXY($x+$w,$y); } //Go to the next line $this->Ln($h); } function CheckPageBreak($h) { //$h=$h-400; //If the height h would cause an overflow, add a new page immediately if($this->GetY()+$h>$this->PageBreakTrigger) $this->AddPage($this->CurOrientation); } function NbLines($w,$txt) { //Computes the number of lines a MultiCell of width w will take $cw=&$this->CurrentFont['cw']; if($w==0) $w=$this->w-$this->rMargin-$this->x; $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; $s=str_replace("\r",'',$txt); $nb=strlen($s); if($nb>0 and $s[$nb-1]=="\n") $nb--; $sep=-1; $i=0; $j=0; $l=0; $nl=1; while($i<$nb) { $c=$s[$i]; if($c=="\n") { $i++; $sep=-1; $j=$i; $l=0; $nl++; continue; } if($c==' ') $sep=$i; $l+=$cw[$c]; if($l>$wmax) { if($sep==-1) { if($i==$j) $i++; } else $i=$sep+1; $sep=-1; $j=$i; $l=0; $nl++; } else $i++; } return $nl; } /* PARA MULTICELL*/ } ?>