I’m totally confused. I saw that PDFgraphics now supports the new graphics.rotate and other commands, but whenever I try and use them I get an unsupportedOperation error that says I can’t use graphics outside of its paint event.
Like this very simple example project doesn’t work:
dim pdf as new pdfDocument
dim g as graphics = pdf.graphics
// Rotate square in center of graphics area
const pi = 3.14159
g.translate(g.width / 2, g.height / 2)
g.rotate(pi / 4) // 45 degrees or 1/8 of a circle
g.drawingColor = color.blue
g.fillRectangle(10, 10, 50, 50)
dim f as folderItem = specialFolder.desktop.child("test.pdf")
pdf.save(f)
Am I doing something wrong or does this new feature not actually work?