Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 18 in printed book and digital formats -- plus a one-year subscription (beginning with 19.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 19.5 ('Xojo Business Solution')
Instant purchase and download via GumRoad!

COLUMN

Rotating PDFs Part 1

Finally we can rotate and scale. Maybe.

Issue: 19.5 (September/October 2021)
Author: Marc Zeedar
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: No description available.
Article Length (in bytes): 7,886
Starting Page Number: 82
Article Number: 19507
Resource File(s):

Download Icon project19507.zip Updated: 2021-08-31 23:29:16

Related Link(s): None

Excerpt of article text...

I recently wrote some articles about Xojo's new PDF features (see xDev 18.6 and 19.3), but two key additions—the rotation and scale commands of the graphics class—were missing in action. They worked for pictures, but not for the PDFGraphics class (despite it being a subset of graphics).

Finally, with the release of Xojo 2021R2.1, that problem has been solved.

Or has it? While the features are now implemented, the implementation leaves some questions as to how useful they will be.

Let's Rotate

In theory, using the rotate command is easy. Just add a line like g.rotate(10) to your code (where g is a graphics or PDFGraphics object). As always, though, it's not as simple as it looks.

First, rotation happens in radians, not degrees. (Why? I don't know. I'm not a math person and stuff like this just bewilders me. My whole education has taught me to think in degrees.)

...End of Excerpt. Please purchase the magazine to read the full article.