Class | PDF::Writer::TagBullet |
In: |
lib/pdf/writer.rb
|
Parent: | Object |
A callback function to support drawing of a solid bullet style. Use with <C:bullet>.
DEFAULT_COLOR | = | Color::RGB::Black | The default bullet color. |
color | [RW] |
Sets the style for <C:bullet> callback bullets that follow. Default
is Color::RGB::Black.
Set this to nil to get the default colour. |
# File lib/pdf/writer.rb, line 2640 2640: def [](pdf, info) 2641: @color ||= DEFAULT_COLOR 2642: 2643: desc = info[:descender].abs 2644: xpos = info[:x] - (desc * 2.00) 2645: ypos = info[:y] + (desc * 1.05) 2646: 2647: pdf.save_state 2648: ss = StrokeStyle.new(desc) 2649: ss.cap = :butt 2650: ss.join = :miter 2651: pdf.stroke_style! ss 2652: pdf.stroke_color @color 2653: pdf.circle_at(xpos, ypos, 1).stroke 2654: pdf.restore_state 2655: end