コード例 #1
0
 public virtual void SetOriginMat(CSMatrix mat)
 {
     CocoStudioEngineAdapterPINVOKE.CSComControlNode_SetOriginMat(this.swigCPtr, CSMatrix.getCPtr(mat));
     if (CocoStudioEngineAdapterPINVOKE.SWIGPendingException.Pending)
     {
         throw CocoStudioEngineAdapterPINVOKE.SWIGPendingException.Retrieve();
     }
 }
コード例 #2
0
ファイル: CSMatrix.cs プロジェクト: yuluos/CocoStudio2.0.6
        public override bool Equals(object obj)
        {
            if (!(obj is CSMatrix))
            {
                return(false);
            }
            CSMatrix csMatrix = (CSMatrix)obj;

            return(obj != null && (double)this.CX == (double)csMatrix.CX && ((double)this.CY == (double)csMatrix.CY && (double)this.CM11 == (double)csMatrix.CM11) && ((double)this.CM12 == (double)csMatrix.CM12 && (double)this.CM21 == (double)csMatrix.CM21) && (double)this.CM22 == (double)csMatrix.CM22);
        }
コード例 #3
0
        public virtual PointF TransformPoint(PointF p, CSMatrix mat)
        {
            Vec2 vec2 = new Vec2(CocoStudioEngineAdapterPINVOKE.CSComControlNode_TransformPoint(this.swigCPtr, Vec2.getCPtr(new Vec2(p.X, p.Y)), CSMatrix.getCPtr(mat)), true);

            if (CocoStudioEngineAdapterPINVOKE.SWIGPendingException.Pending)
            {
                throw CocoStudioEngineAdapterPINVOKE.SWIGPendingException.Retrieve();
            }
            return(new PointF(vec2.x, vec2.y));
        }
コード例 #4
0
        public virtual MatrixNode Mat4ToMatrixNode(CSMatrix mat)
        {
            MatrixNode matrixNode = new MatrixNode(CocoStudioEngineAdapterPINVOKE.CSComControlNode_Mat4ToMatrixNode(this.swigCPtr, CSMatrix.getCPtr(mat)), true);

            if (CocoStudioEngineAdapterPINVOKE.SWIGPendingException.Pending)
            {
                throw CocoStudioEngineAdapterPINVOKE.SWIGPendingException.Retrieve();
            }
            return(matrixNode);
        }
コード例 #5
0
        public virtual CSMatrix Mat4Identity(CSMatrix pM)
        {
            CSMatrix csMatrix = new CSMatrix(CocoStudioEngineAdapterPINVOKE.CSComControlNode_Mat4Identity(this.swigCPtr, CSMatrix.getCPtr(pM)), true);

            if (CocoStudioEngineAdapterPINVOKE.SWIGPendingException.Pending)
            {
                throw CocoStudioEngineAdapterPINVOKE.SWIGPendingException.Retrieve();
            }
            return(csMatrix);
        }
コード例 #6
0
        public virtual CSRect RectApplyTransform(Rectangle rect, CSMatrix mat)
        {
            CSRect csRect = new CSRect(CocoStudioEngineAdapterPINVOKE.CSComControlNode_RectApplyTransform(this.swigCPtr, Rect.getCPtr(new Rect((float)rect.X, (float)rect.Y, (float)rect.Width, (float)rect.Height)), CSMatrix.getCPtr(mat)), true);

            if (CocoStudioEngineAdapterPINVOKE.SWIGPendingException.Pending)
            {
                throw CocoStudioEngineAdapterPINVOKE.SWIGPendingException.Retrieve();
            }
            return(csRect);
        }
コード例 #7
0
ファイル: CSMatrix.cs プロジェクト: yuluos/CocoStudio2.0.6
 public static HandleRef getCPtr(CSMatrix obj)
 {
     return(obj == null ? new HandleRef((object)null, IntPtr.Zero) : obj.swigCPtr);
 }