Public bug reported:

Specifying a tuple/list (with two entries) for the extend parameter in a
linear or radial gradient in a Table will fail, as the parameter is used
with a list compaction as format parameter. Thus it is a list. But the
format needs a tuple, so it fails with a python error. Example usage:

Table([[...]], style=[ ('BACKGROUND', (1, 1), (1, 1), ('RADIALGRADIENT', (1, 
1), (1, 'width'),
 (True, False), # <--- this parameter
('#DEDEDE', '#DEDEDE', '#FDFDFD', '#FFFFFF'), (0, 0.1, 0.9, 1))),

The same code path is taken for Canvas.linearGradient() and
Canvas.radialGradient().

Additionally, specifying positions for the gradient (the last parameter
in the example) will not work for both linear and radial gradients, as
the parameter is ignored if it is given and accessed if it is not given
(one off error).

All can be fixed with a trivial patch - please have a look, this can be
verified to be correct even without reportlab knowledge.

These errors also exist in the most recent upstream version. Please feel
free to also forward the patch.

** Affects: python-reportlab (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: patch

** Patch added: "patch"
   
https://bugs.launchpad.net/bugs/2084118/+attachment/5826688/+files/reportlab.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2084118

Title:
  [PATCH] Trivial bugs in linear gradients in tables

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-reportlab/+bug/2084118/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to