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

[Validate]