- From: Lofton Henderson <lofton@rockynet.com>
- Date: Wed, 21 Jan 2009 17:57:29 -0700
- To: WebCGM WG <public-webcgm-wg@w3.org>
- Message-Id: <5.1.0.14.2.20090121175042.015aae48@localhost>
Hearing no objections, I implemented the proposed clarification in the for-publication draft, [1] and [2]. [1] http://jigedit.w3.org/lhenders/WWW/Graphics/WebCGM/drafts/current-editor-21/WebCGM21-DOM.html#getStyleProperty [2] http://jigedit.w3.org/lhenders/WWW/Graphics/WebCGM/drafts/current-editor-21/WebCGM21-DOM.html#getStyleProperty-APS -Lofton. At 04:11 PM 1/20/2009 -0700, Lofton Henderson wrote: >It sounds like everyone agrees, and current implementations have done the >same thing. > >If there are no objections, I propose to treat this as a non-substantive >editorial clarification. (Maybe roll it into the pending publication.) > >For the getStyleProperty entries in both the Picture [1] and AppStructure >interfaces: > >In the description of getStyleProperty "Return value" change: >"the Style Property value as a string, or the empty string if that >attribute does not have an explicitly set value (see the inheritance model >for further related discusion)." >to: >"the Style Property value as a string, or the empty string if that Style >Property has not been explicitly set by a setStyleValue call (or >equivalent XCF). For Style Properties that may be set in different modes >-- e.g., NVDC or percentage -- the return value shall be in the mode in >which it was set. For example, if stroke-weight were most recently set to >a percentage value by a setStyleValue call, then getStyleValue shall >return a percentage value. (See the inheritance model for further related >discussion)." > >Any objections or suggestions? > >-Lofton. > >[1] >http://www.w3.org/Graphics/WebCGM/drafts/current-editor-21/WebCGM21-DOM.html#getStyleProperty > >At 09:58 AM 1/20/2009 -0800, David Cruikshank wrote: >>I think WebCGM 2.1 already states that if a SP is not explicitly set, it >>returns a null string, so that shouldn't be a problem. I interpret >>"explicitly set" to mean explicitly set by a call to SetStyleProperty >>(not set by a CGM attribute or control element) >> >>Upon reflecting on the issues involved, I guess I would propose that >>GetStyleProperty should return the value that was passed with the >>SetStyleProperty. >> >>Dave >> >>On Mon, Jan 19, 2009 at 11:51 PM, Weidenbrueck, Dieter >><<mailto:dweidenbrueck@ptc.com>dweidenbrueck@ptc.com> wrote: >>> >>>All, >>> >>> >>> >>>apparently a small but tricky question. >>> >>> >>> >>>getStyleProperty could return a variety of things: >>> >>> >>> >>>1. The value used by setStyleProperty >>>This would ensure that a script writer could retrieve values set via the >>>DOM, and change them. There is an analogy to setTransform/getTransform >>>here IMO. >>>Open: what should the call return if there was no prior setStyleProperty >>>call, should it be null or an error? >>> >>>2. The computed resulting value on the object >>>This is also an interesting value, because it would tell the script >>>writer about the original state of an object (in case there was no prior >>>setStyleProperty call) and the resulting value. >>>Issue: if you get resulting values back there is no way to detect >>>whether this value was in the file, or whether it had been manipulated >>>by script. >>> >>> >>> >>>I personally had always expected 1) because of the analogy to >>>transforms. Whatever you set you can get back. So the term "style >>>property" to me refers to the value set by the call, and not to detailed >>>CGM elements. In fact, it was always my intent to eliminate references >>>to specific CGM elements as much as possible, because no script writer >>>has a clue how CGM elements work. Example: there is no straight >>>equivalent to stroke-width in a CGM file, it affects a variety of things. >>> >>> >>> >>>A small issue is the return value in cases where there is no common >>>value. This may always happen, no matter what getStyleProperty will >>>return. Typical for these cases is to return an error or a special value >>>indicating that there is no common value. >>> >>> >>> >>>Regards, >>> >>>Dieter >>> >>> >>> >>> >>> >>>From: >>><mailto:public-webcgm-wg-request@w3.org>public-webcgm-wg-request@w3.org >>>[mailto:public-webcgm-wg-request@w3.org] On Behalf Of Lofton Henderson >>>Sent: Dienstag, 20. Januar 2009 01:17 >>>To: David Cruikshank >>>Cc: WebCGM WG >>>Subject: 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 Thursday, 22 January 2009 00:58:52 UTC