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

 


Help: OASIS Mailing Lists Help | MarkMail Help

cgmo-webcgm message

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


Subject: Re: [cgmo-webcgm] Initial values, % sub-issue [was: Re[2]: [cgmo-webcgm] Style properties]


At 10:24 AM 5/18/2005 -0400, Benoit Bezaire wrote:
>Hi Lofton,
>
>Good explanations, thanks!
>
>Ok, so I guess what's left to do, is to state what these style
>properties map to in the CGM standard and verify that 100% is an
>acceptable value for all of them.
>
>background-color: maps to BACKGROUND COLOUR, 100% is ok.

Agree.

>character-height: maps to ?

CHARACTER HEIGHT (I think 100% is fine)

>fill-color: maps to ?

FILL COLOUR (I think 100% is fine)

>intensity: maps to ?

all prim. attr. colors (someone correct me if I'm wrong):
LINE COLOUR, EDGE COLOUR, FILL COLOUR, TEXT COLOUR (I think 100% is fine)

(See 5.7.5, following the style properties table:  "a value of 100% will 
keep the current color intact" [I think, s/color/colors/ ]

>stroke-color: maps to ?

LINE COLOUR and EDGE COLOUR (I think 100% is fine)

>stroke-weight: maps to LINE WIDTH & EDGE WIDTH, 100% is ok.

Agree.

>text-color: maps to ?

TEXT COLOUR (I think 100% is fine)

>text-font: (gone?)

I hope so.

>raster-intensity: maps to ?

The colors in CELL ARRAY and Tile Array (TILE & BITONAL TILE) elements,
(I think 100% is fine).


>Can you fill in the blanks (or someone else for that matter)?
>
>Regards,
>
>--
>  Benoit   mailto:benoit@itedo.com
>
>
>Tuesday, May 17, 2005, 7:09:24 PM, Lofton wrote:
>
>LH> Hi Benoit,
>
>LH> In keeping with your request to break down into smaller bits, I'll 
>focus on
>LH> one specific sub-issue here.  The ISO CGM attribute model, what % means,
>LH> and how that affects possible Initial Value (%) specification.  Excuse if
>LH> it got long or if I'm being pedantic, but I threw in a couple examples
>LH> because I sense a confusion between the CGM attribute model and a SVG-like
>LH> model -- they're different.
>
>LH> At 02:58 PM 5/17/2005 -0400, Benoit Bezaire wrote:
> >>[...]
> >>LH> In my opinion, the inheritance model for both the APS attributes and
> >>LH> style properties are similar with one exception: style properties do
> >>LH> not have an 'Initial Value'. Note: Lofton may or may not agree with
> >>LH> me, I'm not sure on what we agree on yet.
> >>
> >>LH> They do not have an initial value that is inherent or
> >>LH> explicit in the WebCGM instance (since they are not CGM attributes).
> >>
> >>LH> However, IMO it would be perfectly consistent to define
> >>LH> "Initial value:  100%" for all of them (except text-font).  It is
> >>LH> a valid value of the style property, and it essentially means,
> >>LH> "per whatever is in the CGM instance" (I.e., don't change/override
> >>LH> the current values of the affected CGM attributes).
> >>I'm not sure it is that simple. I'm not convinced (yet) that
> >>100% as initial value is fine for all of them. Another problem I see,
> >>is that in CSS there's a Applies To: notion, which we don't have. I
> >>don't think it is possible to define an inheritance model without
> >>specifying the Applies To:.
>
>LH> I'm going to reverse the order of your examples, because background color
>LH> is something of a pathological case in CGM, and differs from the other
>LH> style properties.
>
> >>Example 2: what does it mean to have 'stroke-weight' set to 100% at
> >>the Picture level when the first instance of LINEWIDTH in my CGM file
> >>is one line above a LINE primitive (i.e., LINEWIDTH is not found under
> >>BEGPIC or BEGPICBODY; but BEGAPSBODY;)?
>
>LH> The ISO CGM standard makes clear that, at any point in every CGM data
>LH> stream, there is a well-defined value of every CGM attribute. Even
>LH> immediately after the BegPic element, every attribute has a well defined
>LH> value, because the ISO CGM standard defines a default for every attribute
>LH> (in clause 8).  Example:
>
>LH> BegMet;
>LH> ...
>LH> BegPic;
>LH> BegPicBody;
>LH> line 0 0 1 1 2 2;
>LH> linewidth 50;
>LH> line 0 2 1 1 2 0;
>
>LH> ISO CGM clause 8 tells me that the line width of the first line is about
>LH> 32.7, which is its clause-8-determined default value (or exactly 32.767 --
>LH> I'm sweeping some details under the rug here).  The line width of the
>LH> second line is 50, which is explicitly set by that occurrence of the
>LH> attribute.  Modify the example a little bit:
>
>LH> BegMet;
>LH> ...
>LH> BegPic;
>LH> BegPicBody;
>LH> BegAps obj1;
>LH>    BegApsBody;
>LH>    line 0 0 1 1 2 2;
>LH>    EndAps;
>LH> BegAps obj2;
>LH>    BegApsBody;
>LH>    linewidth 50;
>LH>    line 0 2 1 1 2 0;
>LH> EndAps;
>
>LH> The values of the line widths for the two lines are the same as
>LH> before.  This is a bit different than SVG objects, where each 
>occurrence of
>LH> a graphical primitive object (e.g., rect) implicitly has an "Initial 
>value"
>LH> (default) of all of its drawing properties attached to it, unless there is
>LH> an explicit occurrence of the attribute on the element.  (CGM is a modal
>LH> stream or state list model, SVG is an object model, is the way I think 
>of it.)
>
>LH> Now, stroke-weight affects CGM line width and CGM edge width. However, it
>LH> can only be applied to APSs.  Conceptually, I think of it as being applied
>LH> to the BegAps, and then affects everything in that APS, **until the
>LH> matching EndAps**.  Because of the "until matching EndAps", this
>LH> stroke-weight style property behaves differently than CGM attributes.  It
>LH> affects everything within the APS, but does not persist beyond the end of
>LH> the APS.
>
>LH> As I understand our intention, % value of the WebCGM DOM style property
>LH> stroke-weight is applied as follows, where lw is the current value of line
>LH> width and lw' is the new value:
>LH> lw' = sw * lw
>LH> ew' = sw * ew
>
>LH> So suppose we were to define that every APS in the metafile has a
>LH> stroke-weight Initial Value of 100%.  Then every line-width and every
>LH> edge-width in the CGM is exactly ... unchanged from what ISO CGM standard
>LH> says it should be.
>
>LH> In the example above, the first line thus has line-width 32.7 and the
>LH> second has line-width 50.  Suppose the DOM now sets stroke-weight to 200%
>LH> for obj1.  The the first line width is 65.4 and the second is still 50.
>
> >>Does WebCGM clearly define on what LINEWIDTH applies to and where can
> >>it legally be specified in the CGM file?
>
>LH> Not WebCGM itself, but the ISO CGM standard of which WebCGM is a
>LH> profile.  Yes, ISO CGM clearly defines to what elements LINE WIDTH applies
>LH> (the dozen or so "line" graphical primitives), where LINE WIDTH elements
>LH> can occur (anywhere in the Picture Body outside of APS, or in an APS body
>LH> within APS), and what is the value of every CGM attribute immediately 
>after
>LH> the BEGIN PICTURE element.  WebCGM adheres to the ISO CGM rules.
>
> >>Example 1: what does it mean to have 'background-color' set to 100%?
> >>What does this map to in CGM? And does it have an implied value?
>
>LH> This case is a little more pathological than all the other style
>LH> properties.  Skip if you like, but in brief...
>
>LH> CGM has a BACKGROUND COLOUR element, that applies at the whole-picture
>LH> level (cannot change within pictures).  Sweeping aside some details, 
>at the
>LH> processing of the BEGIN PICTURE element the background color of the 
>picture
>LH> is well-defined.  The WebCGM DOM style property background-color of 100%
>LH> would mean -- the background color of the picture, as determined by 
>ISO CGM
>LH> rules, is unchanged.  If the value were 50%, well ... apply the
>LH> fade-towards-white computation that the spec defines.
>
>LH> All for now,
>LH> -Lofton.




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