Class PDF::Writer::TagBullet
In: lib/pdf/writer.rb
Parent: Object
Transaction::Simple SimpleTable TechBook Complex Action Procset FontDescriptor FontEncoding Destination Info Catalog Encryption Contents Pages Outline Outlines Annotation Page Font ViewerPreferences Image Hash OHash QuickRef FontMetrics ARC4 StrokeStyle PolygonPoint ImageInfo StdDev lib/pdf/simpletable.rb lib/pdf/techbook.rb lib/pdf/writer.rb lib/pdf/quickref.rb Math lib/pdf/writer/fontmetrics.rb lib/pdf/writer/ohash.rb lib/pdf/writer/arc4.rb lib/pdf/writer/strokestyle.rb lib/pdf/writer/graphics.rb lib/pdf/writer/object.rb lib/pdf/writer/object/image.rb External EN Lang OffsetReader lib/pdf/writer/graphics/imageinfo.rb Graphics lib/pdf/writer/object/outlines.rb lib/pdf/writer/object/destination.rb lib/pdf/writer/object/viewerpreferences.rb lib/pdf/writer/object/fontencoding.rb lib/pdf/writer/object/page.rb lib/pdf/writer/object/contents.rb lib/pdf/writer/object/procset.rb lib/pdf/writer/object/pages.rb lib/pdf/writer/object/info.rb lib/pdf/writer/object/encryption.rb lib/pdf/writer/object/catalog.rb lib/pdf/writer/object/outline.rb lib/pdf/writer/object/fontdescriptor.rb lib/pdf/writer/object/action.rb lib/pdf/writer/object/font.rb lib/pdf/writer/object/annotation.rb Object Writer lib/pdf/charts/stddev.rb Charts PDF dot/m_33_0.png

A callback function to support drawing of a solid bullet style. Use with <C:bullet>.

Methods

[]  

Constants

DEFAULT_COLOR = Color::RGB::Black   The default bullet color.

Attributes

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.

Public Class methods

[Source]

      # 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

[Validate]