tags:

views:

9

answers:

0

I'm using the Report Writer from Siberix to generate PDF reports, but I can't figure out how to measure the text I'm about to write when using a canvas. So if I have an IGroup and code like this:

var canvas = group.AddCanvas();

canvas.Font = new Siberix.Graphics.Fonts.Arial(26);
canvas.Brush = Brushes.Black;
canvas.DrawString(0, 0, "some text");
canvas.DrawRectangle(what_goes_here, 0, 12, 12);

How do I figure out how much space "some text" takes up, so I can draw the rectangle to the right of the text? I was expecting some kind of MeasureString method on one of the objects, but I haven't found it and the user guide doesn't seem to mention anything like that.