private SetAttribute ( |
||
_Element | ||
_Attribute | string | |
_Value | string | |
return |
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()); }
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() ); }
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() ); }
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()); }