SetAttribute() private method

private SetAttribute ( XmlElement _Element, string _Attribute, string _Value ) : CalibratedTexture
_Element System.Xml.XmlElement
_Attribute string
_Value string
return CalibratedTexture
Example #1
0
            public ImageUtility.float4 Location = new ImageUtility.float4();                            // The location (in UV space) where the swatch color was taken (XY=Top Left Corner, ZW=Bottom Right Corner)
            public override void    Save(CalibratedTexture _Owner, XmlElement _SwatchElement)
            {
                base.Save(_Owner, _SwatchElement);

                _Owner.SetAttribute(_SwatchElement, "SampleTopLeft", (new ImageUtility.float2(Location.x, Location.y)).ToString());
                _Owner.SetAttribute(_SwatchElement, "SampleBottomRight", (new ImageUtility.float2(Location.z, Location.w)).ToString());
            }
Example #2
0
            public ImageUtility.float3 xyY; // The color used to build the swatch

            #endregion Fields

            #region Methods

            public virtual void Save( CalibratedTexture _Owner, XmlElement _SwatchElement )
            {
                ImageUtility.float4	XYZ = new ImageUtility.float4( ImageUtility.ColorProfile.xyY2XYZ( xyY ), 1.0f );
                ImageUtility.float3	RGB = (ImageUtility.float3) Texture.Profile.XYZ2RGB( XYZ );
                _Owner.SetAttribute( _SwatchElement, "xyY", xyY.ToString() ).SetAttribute( "RGB", RGB.ToString() );
            }
Example #3
0
            public ImageUtility.float4 Location = new ImageUtility.float4(); // The location (in UV space) where the swatch color was taken (XY=Top Left Corner, ZW=Bottom Right Corner)

            #endregion Fields

            #region Methods

            public override void Save( CalibratedTexture _Owner, XmlElement _SwatchElement )
            {
                base.Save( _Owner, _SwatchElement );

                _Owner.SetAttribute( _SwatchElement, "SampleTopLeft", (new ImageUtility.float2( Location.x, Location.y )).ToString() );
                _Owner.SetAttribute( _SwatchElement, "SampleBottomRight", (new ImageUtility.float2( Location.z, Location.w )).ToString() );
            }
Example #4
0
            public ImageUtility.Bitmap Texture;                                                                 // The bitmap generated from the swatch color

            public virtual void     Save(CalibratedTexture _Owner, XmlElement _SwatchElement)
            {
                ImageUtility.float4 XYZ = new ImageUtility.float4(ImageUtility.ColorProfile.xyY2XYZ(xyY), 1.0f);
                ImageUtility.float3 RGB = (ImageUtility.float3)Texture.Profile.XYZ2RGB(XYZ);
                _Owner.SetAttribute(_SwatchElement, "xyY", xyY.ToString()).SetAttribute("RGB", RGB.ToString());
            }