Method: PDF::Writer::Graphics#fill_stroke

Defined in:
lib/extensions/pdf-writer/pdf/writer/graphics.rb

#fill_stroke(rule = nil) ⇒ Object

Fills and then strokes the path. Open subpaths are implicitly closed before being filled. This is the same as constructing two identical path objects, calling #fill on one and #stroke on the other. Paths filled and stroked in this manner are treated as if they were one object for PDF transparency purposes (the PDF transparency model is not yet supported by PDF::Writer).

See #fill for more information on fill rules.



106
107
108
109
110
111
112
113
# File 'lib/extensions/pdf-writer/pdf/writer/graphics.rb', line 106

def fill_stroke(rule = nil)
  if :even_odd == rule
    add_content(" B*")
  else
    add_content(" B")
  end
  self
end