[Bug 2084118] Re: [PATCH] Trivial bugs in linear gradients in tables

Ubuntu Foundations Team Bug Bot 2084118 at bugs.launchpad.net
Thu Oct 10 08:28:56 UTC 2024


The attachment "patch" seems to be a patch.  If it isn't, please remove
the "patch" flag from the attachment, remove the "patch" tag, and if you
are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by
~brian-murray, for any issues please contact him.]

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

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

Status in python-reportlab package in Ubuntu:
  New

Bug description:
  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.

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




More information about the foundations-bugs mailing list