Esempio n. 1
0
 public unsafe ITransformation CreateTransFromDC(int iWidth, int iHeight, long lDpi)
 {
     try
     {
         if (iWidth == 0)
         {
             return(null);
         }
         if (iHeight == 0)
         {
             return(null);
         }
         if (lDpi == 0L)
         {
             return(null);
         }
         IEnvelope envelope = null;
         envelope = new EnvelopeClass();
         envelope.PutCoords(0.0, 0.0, (double)iWidth, (double)iHeight);
         tagRECT grect = new tagRECT();
         IDisplayTransformation transformation = null;
         transformation = new DisplayTransformationClass();
         IDisplayTransformation transformation2 = transformation;
         transformation2.VisibleBounds = envelope;
         transformation2.Bounds        = envelope;
         transformation2.set_DeviceFrame(ref grect);
         transformation2.Resolution = lDpi;
         return(transformation);
     }
     catch (Exception exception)
     {
         this.mErrOpt.ErrorOperate(this.mSubSysName, "FunFactory.SymbolFun", "CreateTransFromDC", exception.GetHashCode().ToString(), exception.Source, exception.Message, "", "", "");
         return(null);
     }
 }