Method: FPDF#SetTextColor
- Defined in:
- lib/fpdf.rb
#SetTextColor(r, g = -1,, b = -1)) ⇒ Object
368 369 370 371 372 373 374 375 376 |
# File 'lib/fpdf.rb', line 368 def SetTextColor(r,g=-1,b=-1) # Set color for text if (r==0 and g==0 and b==0) or g==-1 @TextColor=sprintf('%.3f g',r/255.0) else @TextColor=sprintf('%.3f %.3f %.3f rg',r/255.0,g/255.0,b/255.0) end @ColorFlag=(@FillColor!=@TextColor) end |