Python Forum
[SOLVED] Looking for documentation on Reportlab's canvas.transform() function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Looking for documentation on Reportlab's canvas.transform() function
#1
I've looked 'reportlab-userguide_2022_v3_5.pdf', on page 16 under Changing Geometry, and there's no documentation beyond the mere mention of transform(a, b, c, d, e, f). It does go into more detail on scale() and translate(), the more common functions for beginners.

I've looked in 'reportlab-reference.pdf' on page 11, and get
adjoin a mathematical transform to the current graphics state matrix.
Not recommended for beginners.
Yeah, thanks!

If I open a python REPL, import reportlab, create a canvas.Canvas instance, and help(canvas.transform), I get exactly the same message as is in the reportlab-reference documentation, obviously rendered directly from the docstrings.

My general google fu is not that great, and hasn't thrown anything up yet.

What I'm trying to do is correct a small distortion of my printer. Maybe the simpler canvas.skew() would be sufficient for that. It's even more poorly documented, but should be easier to hope'n'poke/test.

Is there a graphics 'standard' set of six (a, b, c, d, e, f) parameters for transforms that Reportlab is 'obviously' using, that will be documented in other more thorough packages?
Reply
#2
To answer my own question, I finally found something via a net search

docs.reportlab.com/rml/useguide/Chapter_10_More_graphics

It's in the reportlab markup language guide, which I'd ignored as I don't use the markup way of driving it.

However, transform(a, b, c, d, e, f) does this
x' = ax + cy + e
y' = bx + dy + f
Still no proper documentation on skew(alpha, beta), but at least it confirms that they are angles
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Solved] unkown (to me) function def parm "name1:name2" syntax. MvGulik 5 1,082 Nov-11-2022, 11:21 AM
Last Post: MvGulik
  Right to left alignment in python report using Reportlab jalal0034 1 1,847 Sep-27-2022, 04:25 AM
Last Post: jalal0034
  Transform Dic to dataframe d9d9d 4 1,394 Apr-14-2022, 09:35 AM
Last Post: perfringo
  Transform 3 Columns into Single Column DaveG 8 1,889 Apr-04-2022, 08:42 AM
Last Post: Pedroski55
  How to transform from wide to long format in python shantanu97 1 1,661 Nov-21-2021, 11:53 AM
Last Post: buran
  Label Maker FPDF, Reportlab jamesaarr 1 2,672 Aug-09-2021, 11:57 PM
Last Post: Pedroski55
  [Solved] TypeError when calling function Laplace12 2 2,899 Jun-16-2021, 02:46 PM
Last Post: Laplace12
  cyrillic symbols in tables in reportlab. hiroz 5 11,488 Sep-10-2020, 04:57 AM
Last Post: bradmalcom
  Using Reportlab to create a landscape pdf SmukasPlays 2 5,451 Aug-09-2020, 09:31 PM
Last Post: SmukasPlays
  Help! - How to create a Title for a Reportlab Table crabbylou 0 5,360 Mar-29-2020, 09:14 PM
Last Post: crabbylou

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020