none
satMod, satOff documentation? RRS feed

  • Question

  • Hi;

    The OpenXML documentation describes the use of both, but the examples it has does not include those elements so it's sort-of hard to figure out what's going on. Is there better documentation anywhere?

    Same for lum & hue Mod/Off.

    thanks - dave


    Very funny video - What's your Metaphor?
    Wednesday, December 22, 2010 6:23 PM

Answers

All replies

  • Hello Dave,

    Thanks for posting. Actually, I am not very good at issues about Open XML SDK. However, I will try to give you some useful resources. By doing some research on it, unfortunately, there is not a official documentation about these two elements. All I could find are MSDN pages: http://social.msdn.microsoft.com/Search/en-US?query=satMod%20satOff&ac=8. Please try to check it, and see if this could help you.

    Also in this forum, there are two threads about satMod. Please check this link. Thanks for your understanding and support.

    If this post does not help you, just feel free to follow up. A Merry Christmas to you, Dave :-)


    Bessie Zhao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, December 24, 2010 3:23 AM
  • I know next to nothing about this but, according to the Office Compliance document (http://msdn.microsoft.com/en-us/library/ee908652(v=office.12).aspx), satOff and lumOff are explicitly not supported by Office - 'and may produce unexpected color'. It is less clear about the others but my suspicion is that these values cannot be changed anywhere in the Office UI so, although there might be theoretical support for them, it is of little consequence unless you are working with colours in OpenXML format produced by something other than Office - and there are few, if any, tools, that do that (AFAIK!).
     

    Enjoy,
    Tony
    www.WordArticles.com
    Friday, December 24, 2010 10:01 AM
  • Hi Tony; We've found Word does use satMod for chart background colors when it is set to do a fade from one side to the other. Thanks dave
    Very funny video - What's your Metaphor?
    Friday, December 24, 2010 4:56 PM
  • Hi Bessie; I read those but most of the other questions seem to have the same issue - they don't understand exactly how this works. Is this part of Open XML documented anywhere? Thanks Dave
    Very funny video - What's your Metaphor?
    Friday, December 24, 2010 5:01 PM
  • Hello again Dave,

    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience. Thank you for your understanding and support.


    Bessie Zhao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, December 27, 2010 9:14 AM
  • Hi;

    Any luck getting more complete documentation?

    thanks - dave


    Very funny video - What's your Metaphor?
    Monday, January 3, 2011 8:37 PM
  • Hi,

    satMod (SaturationModulation Class) , satOff (SaturationOffset Class) are available only in office 2010 (similarly for lum & hue Mod/Off ).

    The value for them specifies a percentage in 1000ths of a percent. E.g.: value of 1 represents 0.001%.

    The documentation is available in MSDN. You can refer to  the following link for the documentation on these classes :

    http://msdn.microsoft.com/en-us/library/ee881636.aspx

    Also, you can use the Open XML SDK 2.0 Productivity tool to refer to the documentation. Following link can be used to download the Open XML SDK 2.0 and the tools:

    http://www.microsoft.com/downloads/en/details.aspx?FamilyId=C6E744E5-36E9-45F5-8D8C-331DF206E0D0&displaylang=en

    Following example to generate the FillTextEffect in a word document makes use of SaturationModulation and SaturationOffset classes.

    // Creates an FillTextEffect instance and adds its children.
        public FillTextEffect GenerateFillTextEffect()
        {
          FillTextEffect fillTextEffect1 = new FillTextEffect();
    
          GradientFillProperties gradientFillProperties1 = new GradientFillProperties();
    
          GradientStopList gradientStopList1 = new GradientStopList();
    
          GradientStop gradientStop1 = new GradientStop(){ StopPosition = 0 };
    
          SchemeColor schemeColor1 = new SchemeColor(){ Val = SchemeColorValues.ExtraSchemeColor1 };
          Tint tint1 = new Tint(){ Val = 66000 };
          SaturationModulation saturationModulation1 = new SaturationModulation(){ Val = 16 };
          SaturationOffset saturationOffset1 = new SaturationOffset(){ Val = 100000 };
    
          schemeColor1.Append(tint1);
          schemeColor1.Append(saturationModulation1);
          schemeColor1.Append(saturationOffset1);
    
          gradientStop1.Append(schemeColor1);
    
          GradientStop gradientStop2 = new GradientStop(){ StopPosition = 76000 };
    
          SchemeColor schemeColor2 = new SchemeColor(){ Val = SchemeColorValues.ExtraSchemeColor1 };
          Tint tint2 = new Tint(){ Val = 44500 };
          SaturationModulation saturationModulation2 = new SaturationModulation(){ Val = 16 };
          SaturationOffset saturationOffset2 = new SaturationOffset(){ Val = 100000 };
    
          schemeColor2.Append(tint2);
          schemeColor2.Append(saturationModulation2);
          schemeColor2.Append(saturationOffset2);
    
          gradientStop2.Append(schemeColor2);
    
          GradientStop gradientStop3 = new GradientStop(){ StopPosition = 100000 };
    
          SchemeColor schemeColor3 = new SchemeColor(){ Val = SchemeColorValues.ExtraSchemeColor1 };
          Tint tint3 = new Tint(){ Val = 23500 };
          SaturationModulation saturationModulation3 = new SaturationModulation(){ Val = 16 };
          SaturationOffset saturationOffset3 = new SaturationOffset(){ Val = 100000 };
    
          schemeColor3.Append(tint3);
          schemeColor3.Append(saturationModulation3);
          schemeColor3.Append(saturationOffset3);
    
          gradientStop3.Append(schemeColor3);
    
          gradientStopList1.Append(gradientStop1);
          gradientStopList1.Append(gradientStop2);
          gradientStopList1.Append(gradientStop3);
          LinearShadeProperties linearShadeProperties1 = new LinearShadeProperties(){ Angle = 5400000, Scaled = OnOffValues.Zero };
    
          gradientFillProperties1.Append(gradientStopList1);
          gradientFillProperties1.Append(linearShadeProperties1);
    
          fillTextEffect1.Append(gradientFillProperties1);
          return fillTextEffect1;
        }
    

    Thanks!

    Pradip

    Thursday, January 6, 2011 3:47 PM
  • Hi Pradip;

    Thank you for the answer. My concern is the following if you can answer these.

    1. If I have satMod and satOff, which do I apply first? It makes a different color based on the order.

    2. For satMod I am doing sat = (sat * modValue) / 100000, for satOff I am doing sat += off / 100000d - but the final color I get is a bit different from the color Word shows in the chart. Is this the correct calculation? (The difference might be the conversion between HSL and RGB.)

    thanks - dave


    Very funny video - What's your Metaphor?
    Thursday, January 6, 2011 4:04 PM
  • Hi David,

     

    Please post this question to the Specification forum (http://social.msdn.microsoft.com/Forums/en-US/category/openspecifications ). It is a forum for Open XML Specification Documentation.

     

    Thanks!

    Pradip

    • Marked as answer by DavidThi808 Saturday, January 15, 2011 12:53 AM
    Friday, January 14, 2011 8:36 PM