Sha256: 1eb4709268df0cf747098b9557caf2a3838d60d3a52c5f7af8d1b7902e5abd18
Contents?: true
Size: 623 Bytes
Versions: 3
Compression:
Stored size: 623 Bytes
Contents
# We can change the stroke and fill colors providing an HTML rgb 6 digit color # code string ("AB1234") or 4 values for CMYK. require_relative '../example_helper' filename = File.basename(__FILE__).gsub('.rb', '.pdf') Prawn::ManualBuilder::Example.generate(filename) do stroke_axis # Fill with Yellow using RGB (Unlike css, there is no leading #) fill_color 'FFFFCC' fill_polygon [50, 150], [150, 200], [250, 150], [250, 50], [150, 0], [50, 50] # Stroke with Purple using CMYK stroke_color 50, 100, 0, 0 stroke_rectangle [300, 300], 200, 100 # Both together fill_and_stroke_circle [400, 100], 50 end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
prawn-2.2.2 | manual/graphics/color.rb |
prawn-2.2.1 | manual/graphics/color.rb |
prawn-2.2.0 | manual/graphics/color.rb |