Method: FPDF#SetFillColor

Defined in:
lib/fpdf.rb

#SetFillColor(r, g = -1,, b = -1)) ⇒ Object



357
358
359
360
361
362
363
364
365
366
# File 'lib/fpdf.rb', line 357

def SetFillColor(r,g=-1,b=-1)
    # Set color for all filling operations
    if (r==0 and g==0 and b==0) or g==-1
        @FillColor=sprintf('%.3f g',r/255.0)
    else
        @FillColor=sprintf('%.3f %.3f %.3f rg',r/255.0,g/255.0,b/255.0)
    end
    @ColorFlag=(@FillColor!=@TextColor)
    out(@FillColor) if(@page>0)
end