OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Proposal: draw:wrap-influence-on-position


Dear TC members,

I would like to propose a new graphic property
"draw:wrap-influence-on-position" that details how the wrapping mode
graphic property (that is the "style:wrap" attribute) influences the
positionig of a drawing shape.

More specifically, the new attribute is intended as a hint to the
layout algorithm to help decide on the placement of images/shapes in
certain cases where several 'correct' placements could be used. All
three options describe different, correct interpretations of the
layout constraints already in the format. The new hint would allow to
disambiguate between these situations.


Details: The object position, anchoring and the wrapping mode interact
with each other, sometimes in surprising ways. The new property
specifies an optional layout hint allows to detail how this would be
handled, per frame. There is a default setting that essentially
specifies 'normal' behaviour, plus two settings for alternative ways
of handling such situations. For many common situations, the setting
doesn't actually make any difference. However, we found that sometimes
the layout differences can be quite significant, which in our opinion
warrents the new attribute.


An example:

Consider a paragraph with two images. The anchor position is marked by
'@', 'm' stands for any other letter, and 'I' marks an image. The
images are anchored at svg:x=2 svg:y=-2 and svg:x=12 svg:y=-2. (For
the example, I use 'character' units.)

a) The paragraphs without images:

mmmmmmmmmmmmmmmmmmmm
mmmmmmmmmmmmmmmmmmmm
mmmmmmmmmm
@nnnnnnnnnnnnnnnnnnn
nnnnnnnnnnnnnnnnnnnn
nnnnnnnnnn

b) If one would now place two 8x3 images *without* wrap-around at
positions 2,-2 and 12,-2, one gets the following result:

mmmmmmmmmmmmmmmmmmmm
mmIIIIIIIImmIIIIIIII
mmIIIIIIII  IIIIIIII
@nIIIIIIIInnIIIIIIII
nnnnnnnnnnnnnnnnnnnn
nnnnnnnnnn

Note that the images overlap the text.

1) If we place images as if there was no wrap-around and then 
wrap-around anyway we get the following positions:

mmmmmmmmmmmmmmmmmmmm
mmIIIIIIIImmIIIIIIII
mmIIIIIIIImmIIIIIIII
mmIIIIIIIImmIIIIIIII
mmmmmmmmmmmmmmmmmmmm
mmmmmmmm
@nnnnnnnnnnnnnnnnnnn
nnnnnnnnnnnnnnnnnnnn
nnnnnnnnnn

Problem: Note that the anchor was moved due to the wrap-around, so
that now the positions are off by 3 lines. The images are now at
svg:y=-5 instead of svg:y=-2.

2) If we try to fullfil our image position and anchoring constraints,
we will arrive at something like this:

mmmmmmmmmmmmmmmmmmmm
mmmmmmmmmmmmmmmmmmmm
mmIIIIIIIImmIIIIIIII
mmIIIIIIIImmIIIIIIII
mmIIIIIIII  IIIIIIII
@nnnnnnnnnnnnnnnnnnn
nnnnnnnnnnnnnnnnnnnn
nnnnnnnnnn

Note that we are still off by one on the image image positions, but I
can't get any closer with ASCII art. :-) In real world documents, one
can usually arrive at the given positions by successively doing the
wrap-around, and then moving the images accordingly. This essentially
requires a fix-point iteration of the layout algorithms, in that one
successively moves items around to fullfil the various constriants on
the object positions, until a good match is found. Not all formatters
are willing to go to this length.

3) An alternative

As an alternative, one could proceed as in 1), but do so successively
for each image. One would first place the left image and do
wrap-around (as in 1). Only after that one would place the right image
(as in 1, but taking the intermediate result into account). This gets
us closer to the 2) solution, at efforts comparable to 1).

mmmmmmmmmmmmmmmmmmmm
mmIIIIIIIImmmmmmmmmm
mmIIIIIIIImmIIIIIIII
mmIIIIIIIImmIIIIIIII
mmmm        IIIIIIII
@nnnnnnnnnnnnnnnnnnn
nnnnnnnnnnnnnnnnnnnn
nnnnnnnnnn


I would consider solution 2) above the default, as that gets the
closest to the actual position specification in the file
format. However as said above, we see value in all three options, and
would like to include the new attribute as a hint.


For naming, I would suggest the following:

draw:wrap-influence-on-position="iterative" (default; see 2)
draw:wrap-influence-on-position="once-concurrent" (see 1)
draw:wrap-influence-on-position="once-successive" (see 3)


Sincerely,
Daniel



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]