lib/barby/outputter/cairo_outputter.rb in barby-0.6.2 vs lib/barby/outputter/cairo_outputter.rb in barby-0.6.3
- old
+ new
@@ -21,9 +21,14 @@
register :to_svg if Cairo.const_defined?(:SVGSurface)
attr_writer :x, :y, :xdim, :height, :margin
+ def initialize(*)
+ super
+ @x, @y, @xdim, @height, @margin = nil
+ end
+
#Render the barcode onto a Cairo context
def render_to_cairo_context(context, options={})
if context.respond_to?(:have_current_point?) and
context.have_current_point?
current_x, current_y = context.current_point