Exemplo n.º 1
0
 public MatrixD(OTF2Dot14[,] tr,    VecD shift)
     : this()
 {
     if (tr!=null)
     {
         if ((tr.GetLength(0)!=2)||(tr.GetLength(1)!=2))
         {
             throw new ExceptionGMath("MatrixD","MatrixD",null);
         }
         for (int i=0;i<2;i++)
             for (int j=0;j<2;j++)
             {
                 this.tr[i,j]=(double)tr[i,j];
             }
     }
     else
     {
         this.tr[0,0]=this.tr[1,1]=1.0;
         this.tr[0,1]=this.tr[1,0]=0.0;
     }
     if (shift!=null)
     {
         this.tr[2,0]=shift.X;
         this.tr[2,1]=shift.Y;
     }
 }
Exemplo n.º 2
0
 public GErrComponentIncorrectTransform(int indGlyphOwner, int indGlyphComponent,
     OTF2Dot14[,] tr)
     : base(indGlyphOwner, indGlyphComponent)
 {
     // ValInfoBasic
     base.Name = "GERR_COMPONENT_INCORRECT_TRANSFORM";
     // this
     if ((tr.GetLength(0)!=2)||(tr.GetLength(1)!=2))
     {
         throw new ExceptionGlyph("GErrComponentIncorrectTransform","GErrComponentIncorrectTransform",null);
     }
     this.tr=new OTF2Dot14[2,2];
     for (int i=0; i<2; i++)
         for (int j=0; j<2; j++)
             this.tr[i,j]=tr[i,j];
 }