Re: Drawing an image in the background of a frame
Tim Roberts <[email protected]>
| Newsgroups | gmane.comp.python.reportlab.user |
|---|---|
| Organization | Providenza & Boekelheide, Inc. |
| Message-ID | <[email protected]> |
Lele Gaifax wrote: > I'm asked if it would be possible to obtain something like the following > sketch, where I have a frame with a "background" image and, in a specified > area (a "subframe"), a superimposed list of flowables (paragraphs of text) > with a "white" background: Are you trying to do an automated magazine layout of some kind? That's an extremely difficult thing to automate. People, as a rule, always do a better job of determining the visual appeal of a layout. > The problem is that I should omit the image *iff* the flowables do not fit in > the given area, possibly "trying" further combinations of image+flowables > until one fits, so I cannot simply draw the image and then do a > "subframe.add(flowable)". There are some conflicting requirements here. Does the size of the image represent a bounding box for the flowables? If you omit the image, then what is the bounding box? You said the flowables have to fit in a "specified area". Is that area different for different images? There are ways to determine the height of a flowable for some fixed width, and that may be all you need to know. If you can document how a HUMAN would make these decisions, then you might be able to come up with a computer algorithm, but remember that the computer can't judge "eye appeal". -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc.
smime.p7s
(application/pkcs7-signature, 3.3 KB) - not displayed