Hi, folks. I'm in the middle of a major overhaul to PDF::Writer. The
API is changing significantly. Here are a couple of changes:
# Set the stroke style. Assume a PDF object instance.
pdf.set_stroke_style(5, :round, :bevel, [3, 5], 1)
# becomes
PDF::Writer::StrokeStyle.new(5) do |ss|
ss.cap = :round
ss.join = :bevel
ss.dash = { :pattern => [ 3, 5 ], :phase => 1 }
pdf.stroke_style ss
end
# Draw a circle at (250, 250) with radius 50. The outline should
# be red and the fill should be blue.
pdf.set_color(1, 0, 0)
pdf.set_stroke_color(0, 0, 1)
pdf.filled_ellipse(250, 250, 50)
pdf.ellipse(250, 250, 50)
# becomes
pdf.stroke_color(Color::Red)
pdf.fill_color(Color::Blue)
pdf.circle_at(250, 250, 50).fill_stroke
The PDF::EZWriter class has entirely disappeared -- it has been
absorbed into the PDF::Writer class. There are no provisions made
for backwards compatibility in any case (original versions did; this
has not been the case for three weeks when I realised that the API
changes I needed to make were far larger than could be comfortably
worked around with the old APIs).
However, there is one major API (tables) that I am finding difficult
to turn into the form that I prefer.
I'm nearly ready to release this new version of PDF::Writer -- we're
going from a technology preview (dubbed 0.1.0 when I made a gem) to
a 1.0 release. The problem is that if I release without this API
change, the next release will be API-incompatible; not as
incompatible as PDF::Writer 0.1 to PDF::Writer 1.0, but incompatible
nonetheless. (I'm not sure how much of the old API could be
translated into the new code.)
So, the question: do I release this drastically new and improved
version of PDF::Writer now, or can people wait a bit longer for me
to finish the table API?
-austin
···
--
Austin Ziegler * halostatue@gmail.com
* Alternate: austin@halostatue.ca