Code Duplication    Length = 9-10 lines in 2 locations

lib/FPDF/src/fpdf.php 2 locations

@@ 376-385 (lines=10) @@
373
	return $this->page;
374
}
375
376
function SetDrawColor($r, $g=null, $b=null)
377
{
378
	// Set color for all stroking operations
379
	if(($r==0 && $g==0 && $b==0) || $g===null)
380
		$this->DrawColor = sprintf('%.3F G',$r/255);
381
	else
382
		$this->DrawColor = sprintf('%.3F %.3F %.3F RG',$r/255,$g/255,$b/255);
383
	if($this->page>0)
384
		$this->_out($this->DrawColor);
385
}
386
387
function SetFillColor($r, $g=null, $b=null)
388
{
@@ 399-407 (lines=9) @@
396
		$this->_out($this->FillColor);
397
}
398
399
function SetTextColor($r, $g=null, $b=null)
400
{
401
	// Set color for text
402
	if(($r==0 && $g==0 && $b==0) || $g===null)
403
		$this->TextColor = sprintf('%.3F g',$r/255);
404
	else
405
		$this->TextColor = sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255);
406
	$this->ColorFlag = ($this->FillColor!=$this->TextColor);
407
}
408
409
function GetStringWidth($s)
410
{