Method: FPDF#SetDrawColor
- Defined in:
- lib/fpdf.rb
#SetDrawColor(r, g = -1,, b = -1)) ⇒ Object
347 348 349 350 351 352 353 354 355 |
# File 'lib/fpdf.rb', line 347 def SetDrawColor(r,g=-1,b=-1) # Set color for all stroking operations if (r==0 and g==0 and b==0) or g==-1 @DrawColor=sprintf('%.3f G',r/255.0) else @DrawColor=sprintf('%.3f %.3f %.3f RG',r/255.0,g/255.0,b/255.0) end out(@DrawColor) if(@page>0) end |