Re: ISSUE: what does getStyleProperty return?

At 02:49 PM 1/19/2009 -0800, David Cruikshank wrote:
>On the other hand there isn't any analogous value for raster 
>intensity...so it has to return the intensity value that was set.

Right.  But I don't see that as a problem, since there is only one mode for 
setting raster intensity.

Responding to your initial idea, I think there is some logic to returning 
the value in the mode that corresponds to how the CGM:1999 attributes are 
expressed.  But wait!  It is not as simple as it looks:

stroke-weight SP:  NVDC or % [as a multiplier on current line/edge widths]
LINE/EDGE WIDTH cgm attribute:  VDC, or MM, or ScaleFactor (times 
impl-dependent "nominal"), or % (of VDC extent).

The APS content in the metafile could have the line/edge width in one of 4 
Specification Modes, and it would seem that you would have to select 
VDC/NVDC arbitrarily as the "canonical" mode.

But the stroke-weight % option might present a wrinkle that determines the 
answer of this issue.  Consider this example.

BegAPS;
line width 5mm;
polyline;
line width 10mm;
polyline;
EndAPS

If a DOM call sets stroke-weight to 10mm, then both polylines are 
10mm.  But if it sets stroke-weight to 200%, then the first polyline is 
10mm and the second is 20mm.

In the latter case, getSP('stroke-weight') could NOT return an NVDC value 
that was meaningful, right?  So I think the answer to the issue needs to 
be:  return it in the mode in which it was set (or "empty string" if the SP 
was never set).

Does anyone see a way around this conclusion, that does not involve a bunch 
of weird rules and tedious calculations?

Regards,
-Lofton.








>On Mon, Jan 19, 2009 at 12:38 PM, David Cruikshank 
><<mailto:dvdcruikshank@gmail.com>dvdcruikshank@gmail.com> wrote:
>>Just shooting from the hip here, but I would expect the return value to 
>>correspond to the common value of the attribute in CGM.  We introduced 
>>these "intensity" or percentage values WebCGM, but for simplicity I think 
>>the return should probably be the value that makes sense when you 
>>consider the same attribute value in CGM.
>>
>>Just my thoughts.
>>
>>Dave
>>
>>
>>On Mon, Jan 19, 2009 at 9:10 AM, Lofton Henderson 
>><<mailto:lofton@rockynet.com>lofton@rockynet.com> wrote:
>>>ISSUE:  does getStyleProperty have to return the SP in the same form in 
>>>which it was set?
>>>
>>>Ref: 
>>><http://lists.w3.org/Archives/Public/public-webcgm-wg/2009Jan/0005.html>http://lists.w3.org/Archives/Public/public-webcgm-wg/2009Jan/0005.html
>>>
>>>Discussion:  Benoit asks the simple question, which we apparently have 
>>>never addressed...
>>>
>>>At 10:59 AM 1/7/2009 -0500, Bezaire, Benoit wrote:
>>>>[....] I wonder if the implementation has to return the exact same 
>>>>string that was used to set the attribute.
>>>>
>>>>Example for stroke-weight: setStyleProperty("stroke-weight", "200%"), 
>>>>getStyleProperty("stroke-weight") returns 0.5 (assuming original was 0.25).
>>>
>>>Question 1:  do any of our past minutes or email address this?
>>>
>>>Question 2:  has anyone implemented yet?  What have you implemented?
>>>
>>>RECOMMENDATION:  (none yet.)
>>>
>>>### end ###

Received on Tuesday, 20 January 2009 00:17:52 UTC