Code Duplication    Length = 9-10 lines in 2 locations

includes/libraries/Pdf/Tfpdf/tfpdf.class.php 2 locations

@@ 407-416 (lines=10) @@
404
    return $this->page;
405
}
406
407
function SetDrawColor($r, $g=null, $b=null)
408
{
409
    // Set color for all stroking operations
410
    if(($r==0 && $g==0 && $b==0) || $g===null) {
411
            $this->DrawColor = sprintf('%.3F G',$r/255);
412
    } else {
413
            $this->DrawColor = sprintf('%.3F %.3F %.3F RG',$r/255,$g/255,$b/255);
414
    }
415
    if($this->page>0) {
416
            $this->_out($this->DrawColor);
417
    }
418
    }
419
@@ 434-442 (lines=9) @@
431
    }
432
    }
433
434
function SetTextColor($r, $g=null, $b=null)
435
{
436
    // Set color for text
437
    if(($r==0 && $g==0 && $b==0) || $g===null) {
438
            $this->TextColor = sprintf('%.3F g',$r/255);
439
    } else {
440
            $this->TextColor = sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255);
441
    }
442
    $this->ColorFlag = ($this->FillColor!=$this->TextColor);
443
}
444
445
function GetStringWidth($s)