Re: inital background-image patch

2002-04-23 Thread Peter B. West

Arved,


4.9.6 Layering and Conflict of Marks

has

If A and B are areas with the same stacking layer, the backgrounds of A 
and B come beneath all other marks generated by A and B. Further, if A 
is an ancestor of B (still with the same stacking layer), then the 
background of A is beneath all the areas of B, and all the areas of B 
are beneath the intrinsic areas (and border) of A.

If A and B have the same stacking layer and neither is an ancestor of 
the other, then it is an error if either their backgrounds conflict or 
if a non-background mark of A conflicts with a non-background mark of B. 
An implementation may recover by proceeding as if the marks from the 
first area in the pre-order traversal order are beneath those of the 
other area.


Reading the rest of the section, I would assume that in the absence of 
any specific z-index values, all of the descendants of the region share 
the region's z-index.  In that case the first of the paragraphs above 
would seem to hold, which would put the region backgound at the bottom. 
 Fortunately the regions generate no intrinsic marks.  In the case of 
conflicts (second paragraph) the marks generated at the region would 
still be on the bottom.

Peter

Arved Sandstrom wrote:

The only thing that may cause a problem with this interpretation, if outer
regions are being used, is in rendering conflict of marks. You cannot
specify z-index on regions so this only works if you can guarantee that
region-body gets rendered first, and I don't know if that is a spec
requirement.

  




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: inital background-image patch

2002-04-22 Thread Arved Sandstrom

Hi, Dimitri

With respect to full-page backgrounds this is something that has come up
before. fo:simple-page-master does not take background properties so you
have to work with regions or below, which do. Let's say that you don't have
any outer regions - you could have a region-body with zero-margins, and a
background would fill the page. Because regions have zero width borders and
padding unfortunately the content rectangle of the region reference area
would fill the page also, but you can use start and end indents, and
space-before and space-after, to constrain your content as desired.

If you had outer regions they could overlap, and your spaces and indents for
the region-body could account for that, too; with a background-color of
transparent on the outer regions you'd be all set.

I am not recommending this because I personally think it goes a bit against
the spirit of the spec, but as near as I can tell it's all perfectly legal.
I seem to recall from last year that we had convinced ourselves that one
could not render backgrounds into regions, but my reading of the spec now
doesn't show me that at all. Maybe others can add their comments.

The only thing that may cause a problem with this interpretation, if outer
regions are being used, is in rendering conflict of marks. You cannot
specify z-index on regions so this only works if you can guarantee that
region-body gets rendered first, and I don't know if that is a spec
requirement.

Regards,
Arved Sandstrom

 -Original Message-
 From: Softgui [mailto:[EMAIL PROTECTED]]
 Sent: April 22, 2002 5:42 AM
 To: [EMAIL PROTECTED]
 Subject: Re: inital background-image patch


 I've tryed this with PDF and it seems to work well, but I
 coudn't find a
 way to have a complete page background (with no resize).
 The back ground is only under the text blocks.
 Have you, or some one else have some background image samples ?
 If not I can work on it if you want (like a new example directory).

 Thanks,
 Dimitri BAELI

 - Message d'origine -
 De : Michael Gratton [EMAIL PROTECTED]
 À : [EMAIL PROTECTED]
 Envoyé : lundi 22 avril 2002 05:11
 Objet : Re: inital background-image patch


 
 
  Arved Sandstrom wrote:
   I will definitely check it out.
  
 
  Thanks Arved. I've put v0.02 of the patch up. This fixes one small bug
  when tiling background images, but more importantly I've removed the
  changes to fix addRectFoo() wanting a negative height. This simpilifies
  the patch and greatly reduces the scope of the changes. Let me know what
  you think.
 
  I'm going to start on getting the other renderers working next.
 
  http://web.vee.net/fop/background-image_0.02.patch
  http://web.vee.net/fop/fop-background-image-0.02-bin.tar.gz
  http://web.vee.net/fop/fop-background-image-0.02-bin.zip
 
  Cheers.
  Mike,
 
  --
  Michael Gratton [EMAIL PROTECTED]
  Recall Design http://www.recalldesign.com/
  s: 53 Gilbert Street Adelaide SA 5000 Australia
  t: +61 8 8217 0500 f: +61 8 8217 0555
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: inital background-image patch

2002-04-22 Thread Arved Sandstrom

 -Original Message-
 From: Michael Gratton [mailto:[EMAIL PROTECTED]]
 Sent: April 22, 2002 11:11 PM
 To: [EMAIL PROTECTED]
 Subject: Re: inital background-image patch

 Arved Sandstrom wrote:
 
  I seem to recall from last year that we had convinced ourselves that one
  could not render backgrounds into regions, but my reading of
 the spec now
  doesn't show me that at all. Maybe others can add their comments.

 I don't see why not, given the spec lists the Common border, padding,
 and background properties as being allowed, and doesn't forbid use of
 the background properties in the text of the region areas.

 Anyway, the next version of the background-image patch should have
 backgrounds for the region areas working.

 Mike.

Yeah, I rechecked the prose carefully and I didn't spot anything either.
Slight segue: I was up at the cottage this weekend opening up, and lots of
evenings this week are hosed also, but tomorrow evening is open, so I'll
quickly apply your patch, build, run it, and commit it if that all works
out, which I don't doubt. I don't think I noticed anyone else apply it yet -
correct me if I am wrong.

Arved


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: inital background-image patch

2002-04-22 Thread Michael Gratton



Arved Sandstrom wrote:
 Yeah, I rechecked the prose carefully and I didn't spot anything either.

Okay, if no one objects, I'll leave the region area background 
implementation in.

 Slight segue: I was up at the cottage this weekend opening up, and lots of
 evenings this week are hosed also, but tomorrow evening is open, so I'll
 quickly apply your patch, build, run it, and commit it if that all works
 out, which I don't doubt.

Cheers! For the occasion, I've released v0.03 of the patch, please have 
a look at this one instead. 8)

The changes are:

  - backgrounds are now supported on all region areas, including 
fo:region-body.
  - PSRenderer now positions backgrounds properly.
  - I've either tested or at least code-audited all of the Renderer 
impls, and they should all work as well as they did previously.

Still to do (but can be done after the patch has landed):

  - fix PDFRenderer.drawImageCropped() so it works properly.
  - implement drawImageFoo() methods in the other renderers.
  - refactor renderImageArea() in the other renderers
  - sort out the addRectFoo() negative height mess (is this worth doing?)

Patch, binaries:

http://web.vee.net/fop/background-image_0.03.patch
http://web.vee.net/fop/fop-background-image-0.03-bin.tar.gz
http://web.vee.net/fop/fop-background-image-0.03-bin.zip

/mike

-- 
Michael Gratton [EMAIL PROTECTED]
Recall Design http://www.recalldesign.com/
s: 53 Gilbert Street Adelaide SA 5000 Australia
t: +61 8 8217 0500 f: +61 8 8217 0555



smime.p7s
Description: S/MIME Cryptographic Signature


Re: inital background-image patch

2002-04-22 Thread Michael Gratton


Softgui wrote:
 I've tryed this with PDF and it seems to work well, but I coudn't find a
 way to have a complete page background (with no resize).
 The back ground is only under the text blocks.

As Arved said before, the only way to do this would be to put a 
background on the page's fo:region-body and set the page-master margin 
to be 0 so the body region covers the entire page. This is ugly, but 
should work with v0.03 of the background-image patch.

 Have you, or some one else have some background image samples ?
 If not I can work on it if you want (like a new example directory).
 

I've been using a terribly munged version of docs/examples/fo/images.fo 
for testing the background-image stuff, which I'd be terribly emabrrased 
to show anyone.. 8)

If you want to put a few good examples together which use 
background-color, background-image and background-repeat with various 
combinations of transparent and non-transparent images, that would be cool.

Mike.

-- 
Michael Gratton [EMAIL PROTECTED]
Recall Design http://www.recalldesign.com/
s: 53 Gilbert Street Adelaide SA 5000 Australia
t: +61 8 8217 0500 f: +61 8 8217 0555



smime.p7s
Description: S/MIME Cryptographic Signature


Re: inital background-image patch

2002-04-21 Thread Michael Gratton



Arved Sandstrom wrote:
 I will definitely check it out.
 

Thanks Arved. I've put v0.02 of the patch up. This fixes one small bug 
when tiling background images, but more importantly I've removed the 
changes to fix addRectFoo() wanting a negative height. This simpilifies 
the patch and greatly reduces the scope of the changes. Let me know what 
you think.

I'm going to start on getting the other renderers working next.

http://web.vee.net/fop/background-image_0.02.patch
http://web.vee.net/fop/fop-background-image-0.02-bin.tar.gz
http://web.vee.net/fop/fop-background-image-0.02-bin.zip

Cheers.
Mike,

-- 
Michael Gratton [EMAIL PROTECTED]
Recall Design http://www.recalldesign.com/
s: 53 Gilbert Street Adelaide SA 5000 Australia
t: +61 8 8217 0500 f: +61 8 8217 0555



smime.p7s
Description: S/MIME Cryptographic Signature


RE: inital background-image patch

2002-04-19 Thread Arved Sandstrom

I will definitely check it out.

Regards,
AHS

 -Original Message-
 From: Michael Gratton [mailto:[EMAIL PROTECTED]]
 Sent: April 19, 2002 1:02 AM
 To: [EMAIL PROTECTED]
 Subject: inital background-image patch
 
 
 
 Guys,
 
 An initial maintenance-branch patch for background-image and 
 background-repeat property support can be found at:
 
http://web.vee.net/fop/background-image_0.01.patch
 
 This patch is *not* ready to get comitted to the repository, rather I'm 
 posting it to a) get some help testing it, b) get feedback about the 
 nature and scope of the changes I've made.
 
 So please, have a look at it, try it out, and send me as much feedback 
 as possible, especially on:
   - The API changes to AbstractRenderer.
   - Changing addRectFoo() to only ever expect +ve heights.
   - Seeing if the MIF and TXT renderers still work as advertised (but 
 without bg image support).
 
 To support background images, the following has changed:
 
   - Implemented the background-image and background-repeat properties.
   - PropertyManager resolves the bg image source to a FopImage when 
 first retreiving an instance of BackgroundProps.
   - Areas now store an instance of BackgroundProps rather than just the 
 background color.
   - AbstractRenderer has a concrete doBackground() method, and abstract 
 drawImageFoo() methods to support doBackground(), renderImageArea() and 
 possibly others.
   - PDFRenderer and PrintRenderer have been modified to use 
 doBackground() and provide concrete implementations of the 
 drawImageFoo() methods.
 
 As a direct result:
 
   - PDFRenderer.renderImageArea() has been generalized and moved into 
 AbstractRenderer.
   - Start of support for working region-foo backgrounds has been added
   - The addRectFoo() methods should now expect only +ve heights
 
 Stuff that isn't working:
   - All renderers other than PDFRenderer, and possibly the MIF renderer 
 and TXTRenderer.
   - Image cropping, so on a tiled background, the last row and column of 
 images are scaled rather than cropped if the width/height if the content 
 area isn't an exact multiple of the image's width/height.
 
 Binaries for testing can be found at:
 
http://web.vee.net/fop/fop-background-image-0.01-bin.tar.gz
http://web.vee.net/fop/fop-background-image-0.01-bin.zip
 
 Please *do not* use this binary in a production system.
 
 Thanks (especially for reading this far ;),
 Mike.
 
 -- 
 Michael Gratton [EMAIL PROTECTED]
 Recall Design http://www.recalldesign.com/
 s: 53 Gilbert Street Adelaide SA 5000 Australia
 t: +61 8 8217 0500 f: +61 8 8217 0555
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]