DynaPDFGraphics

I have a nice set of objects which draw themselves into supplied graphic object.
LInes, boxes, text… All good.
I also have some filled lines with borders, and I was only able to achieve that using object 2d items.
There can be two or there things , rotated by perhaps 45 degrees. The lines sometimes have numbers beside them.

A bit like this image:

I have an MBS Dynapdf licence.
I can’t work out how to get an object2d item to use a DynaPdfGraphics object at all, and what I need is for the end result to be a properly scalable thing.

Anyone used object2 items in this way?

Did you see the example project “Create PDF with object2d”?

Thanks for the pointer.
I didn’t have the samples but I have them now.
Adding Object2d works from your sample.

I have a little problem because I (I think) I may also want to use the facilities of GraphicsWrapper class.

The object2d code has these lines:

call pdf.CreateNewPDF f// OK
dim x as new DynaPDFGraphics(pdf,0,0) // seems to work as x is not nil, but it contains a g object which is nil
call pdf.Append //this errors with ‘open page’ messages

The plan is to get a g (graphics) which I can pass to my objects’ .Drawyourself(g) method.
Some of the drawing inside there is object2d, and some is ‘normal’ graphics commands

pdf.Drawobject works if I give it the object2d directly, but I can’t cast the pdf object as a graphics object

Any idea why the property g is nil?

Well, the two example projects are not related. They can not easily be combined.

But nothing stops you from adding the object2d methods from one project to the other.