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 2669 2669: def [](pdf, info) 2670: @color ||= DEFAULT_COLOR 2671: 2672: desc = info[:descender].abs 2673: xpos = info[:x] - (desc * 2.00) 2674: ypos = info[:y] + (desc * 1.05) 2675: 2676: pdf.save_state 2677: ss = StrokeStyle.new(desc) 2678: ss.cap = :butt 2679: ss.join = :miter 2680: pdf.stroke_style! ss 2681: pdf.stroke_color @color 2682: pdf.circle_at(xpos, ypos, 1).stroke 2683: pdf.restore_state 2684: end