Re: ISSUE: what does getStyleProperty return?

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 <
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:* 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 <
> 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 <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
>
> 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 17:59:13 UTC