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
  Transform 3 Columns into Single Column DaveG 9 3,453 Mar-19-2025, 03:46 AM
Last Post: robbert23
  Transform a pdf to markdown zzied 0 308 Feb-11-2025, 10:22 AM
Last Post: zzied
  [SOLVED] Reportlab - change a single page orientation beetlecad 1 1,378 Aug-16-2024, 05:43 PM
Last Post: beetlecad
  Highlight text with Reportlab beetlecad 2 1,640 Aug-07-2024, 09:36 AM
Last Post: Pedroski55
  [Solved] unkown (to me) function def parm "name1:name2" syntax. MvGulik 5 2,093 Nov-11-2022, 11:21 AM
Last Post: MvGulik
  Right to left alignment in python report using Reportlab jalal0034 1 3,347 Sep-27-2022, 04:25 AM
Last Post: jalal0034
  Transform Dic to dataframe d9d9d 4 2,355 Apr-14-2022, 09:35 AM
Last Post: perfringo
  How to transform from wide to long format in python shantanu97 1 2,310 Nov-21-2021, 11:53 AM
Last Post: buran
  Label Maker FPDF, Reportlab jamesaarr 1 4,048 Aug-09-2021, 11:57 PM
Last Post: Pedroski55
  [Solved] TypeError when calling function Laplace12 2 3,774 Jun-16-2021, 02:46 PM
Last Post: Laplace12

Forum Jump:

User Panel Messages

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