TransformDescriptor.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / MS / Internal / Ink / InkSerializedFormat / TransformDescriptor.cs / 1305600 / TransformDescriptor.cs

                            //------------------------------------------------------------------------ 
// 
// Copyright (c) Microsoft Corporation. All rights reserved.
// 
//----------------------------------------------------------------------- 

// Primary root namespace for TabletPC/Ink/Handwriting/Recognition in .NET 
namespace MS.Internal.Ink.InkSerializedFormat 
{
    internal class TransformDescriptor 
    {
        private double[]   _transform = new double[6];
        private uint      _size = 0;
        private KnownTagCache.KnownTagIndex _tag = KnownTagCache.KnownTagIndex.Unknown; 

        public KnownTagCache.KnownTagIndex Tag 
        { 
            get
            { 
                return _tag;
            }
            set
            { 
                _tag = value;
            } 
        } 
        public uint Size
        { 
            get
            {
                return _size;
            } 
            set
            { 
                _size = value; 
            }
        } 
        public double[] Transform
        {
            get
            { 
                return _transform;
            } 
        } 

        public bool Compare(TransformDescriptor that) 
        {
            if( that.Tag == Tag )
            {
                if( that.Size == _size ) 
                {
                    for( int i = 0; i < _size; i++ ) 
                    { 
                        if( !DoubleUtil.AreClose(that.Transform[i], _transform[i] ))
                            return false; 
                    }
                    return true;
                }
                else 
                    return false;
            } 
            return false; 
        }
    } 
}


// File provided for Reference Use Only by Microsoft Corporation (c) 2007.


                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK