/** * Returns the instance of DrawingArea class with default values of button visibility settings. * * @param caller The calling object, to be used for callbacks. * @param pOnlyIncludeForeground If true, only foreground of the drawn image will be returned as a result of this activity. If false, also * background will be included. * @param bgImage Background image to be set in the canvas view. */ public static DrawingArea getInstance(DrawingAreaOnResult caller, bool pOnlyIncludeForeground, byte[] bgImage) { ZLog.Log ("DrawingArea getInstance start"); if (caller == null) return null; if ((mSPenManager = GameObject.Find("_SPenManager")) == null) { ZLog.Log ("DrawingArea getInstance - creating manager game object."); mSPenManager = new GameObject ("_SPenManager"); AndroidJNI.AttachCurrentThread (); AndroidJNIHelper.debug = true; } if ((mInstance = mSPenManager.GetComponent<DrawingArea> ()) == null) { ZLog.Log ("DrawingArea getInstance - adding component to manager game object."); mInstance = mSPenManager.AddComponent<DrawingArea> (); mInstance.init (bgImage); } else { if (bgImage != null) { mInstance.setBackgroundImage (bgImage); } } mInstance.mCaller = caller; mInstance.mOnlyIncludeForeground = pOnlyIncludeForeground; ZLog.Log ("DrawingArea getInstance end"); return mInstance; }
/** * Returns the instance of DrawingArea class with default values of button visibility settings. * * @param caller The calling object, to be used for callbacks. * @param pOnlyIncludeForeground If true, only foreground of the drawn image will be returned as a result of this activity. If false, also * background will be included. */ public static DrawingArea getInstance(DrawingAreaOnResult caller, bool pOnlyIncludeForeground) { return getInstance(caller, pOnlyIncludeForeground, null); }
/** * Returns the instance of DrawingArea class with default values of pOnlyIncludeForeground and button visibility settings. * * @param caller The calling object, to be used for callbacks. */ public static DrawingArea getInstance(DrawingAreaOnResult caller) { return getInstance(caller, false); }