コード例 #1
0
 internal Translator(CompatibilityInfo _enclosing)
 {
     this._enclosing      = _enclosing;
     mContentInsetsBuffer = null;
     mVisibleInsetsBuffer = null;
     mTouchableAreaBuffer = null;
 }
コード例 #2
0
        public override bool gatherTransparentRegion(android.graphics.Region region)
        {
            if (mWindowType == android.view.WindowManagerClass.LayoutParams.TYPE_APPLICATION_PANEL)
            {
                return(base.gatherTransparentRegion(region));
            }
            bool opaque = true;

            if ((mPrivateFlags & SKIP_DRAW) == 0)
            {
                // this view draws, remove it from the transparent region
                opaque = base.gatherTransparentRegion(region);
            }
            else
            {
                if (region != null)
                {
                    int w = getWidth();
                    int h = getHeight();
                    if (w > 0 && h > 0)
                    {
                        getLocationInWindow(mLocation);
                        // otherwise, punch a hole in the whole hierarchy
                        int l = mLocation[0];
                        int t = mLocation[1];
                        region.op(l, t, l + w, t + h, android.graphics.Region.Op.UNION);
                    }
                }
            }
            if (android.graphics.PixelFormat.formatHasAlpha(mRequestedFormat))
            {
                opaque = false;
            }
            return(opaque);
        }
コード例 #3
0
ファイル: Region.cs プロジェクト: zhouweiaccp/XobotOS
 public override bool Equals(object obj)
 {
     if (obj == null || !(obj is android.graphics.Region))
     {
         return(false);
     }
     android.graphics.Region peer = (android.graphics.Region)obj;
     return(nativeEquals(mNativeRegion, peer.mNativeRegion));
 }
コード例 #4
0
ファイル: FrameLayout.cs プロジェクト: zhouweiaccp/XobotOS
        public override bool gatherTransparentRegion(android.graphics.Region region)
        {
            bool opaque = base.gatherTransparentRegion(region);

            if (region != null && mForeground != null)
            {
                applyDrawableToTransparentRegion(mForeground, region);
            }
            return(opaque);
        }
コード例 #5
0
 internal Translator(CompatibilityInfo _enclosing, float applicationScale, float applicationInvertedScale
                     )
 {
     this._enclosing               = _enclosing;
     mContentInsetsBuffer          = null;
     mVisibleInsetsBuffer          = null;
     mTouchableAreaBuffer          = null;
     this.applicationScale         = applicationScale;
     this.applicationInvertedScale = applicationInvertedScale;
 }
コード例 #6
0
 /// <summary>Translate the touchable area in application window to Screen.</summary>
 /// <remarks>
 /// Translate the touchable area in application window to Screen. This uses
 /// the internal buffer for touchable area to avoid extra object allocation.
 /// </remarks>
 public virtual android.graphics.Region getTranslatedTouchableArea(android.graphics.Region
                                                                   touchableArea)
 {
     if (this.mTouchableAreaBuffer == null)
     {
         this.mTouchableAreaBuffer = new android.graphics.Region();
     }
     this.mTouchableAreaBuffer.set(touchableArea);
     this.mTouchableAreaBuffer.scale(this.applicationScale);
     return(this.mTouchableAreaBuffer);
 }
コード例 #7
0
ファイル: Region.cs プロジェクト: zffl/androidmono
 public virtual bool setPath(android.graphics.Path arg0, android.graphics.Region arg1)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         return(@__env.CallBooleanMethod(this.JvmHandle, global::android.graphics.Region._setPath3779, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1)));
     }
     else
     {
         return(@__env.CallNonVirtualBooleanMethod(this.JvmHandle, global::android.graphics.Region.staticClass, global::android.graphics.Region._setPath3779, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1)));
     }
 }
コード例 #8
0
ファイル: FrameLayout.cs プロジェクト: zffl/androidmono
 public override bool gatherTransparentRegion(android.graphics.Region arg0)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         return(@__env.CallBooleanMethod(this.JvmHandle, global::android.widget.FrameLayout._gatherTransparentRegion11303, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)));
     }
     else
     {
         return(@__env.CallNonVirtualBooleanMethod(this.JvmHandle, global::android.widget.FrameLayout.staticClass, global::android.widget.FrameLayout._gatherTransparentRegion11303, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)));
     }
 }
コード例 #9
0
ファイル: Region.cs プロジェクト: zffl/androidmono
 public virtual void translate(int arg0, int arg1, android.graphics.Region arg2)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         @__env.CallVoidMethod(this.JvmHandle, global::android.graphics.Region._translate3768, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2));
     }
     else
     {
         @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.graphics.Region.staticClass, global::android.graphics.Region._translate3768, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2));
     }
 }
コード例 #10
0
 public virtual bool gatherTransparentRegion(android.graphics.Region arg0)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         return(@__env.CallBooleanMethod(this.JvmHandle, global::android.view.SurfaceView._gatherTransparentRegion9082, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)));
     }
     else
     {
         return(@__env.CallNonVirtualBooleanMethod(this.JvmHandle, global::android.view.SurfaceView.staticClass, global::android.view.SurfaceView._gatherTransparentRegion9082, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)));
     }
 }
コード例 #11
0
ファイル: Surface.cs プロジェクト: zffl/androidmono
 public virtual void setTransparentRegionHint(android.graphics.Region arg0)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         @__env.CallVoidMethod(this.JvmHandle, global::android.view.Surface._setTransparentRegionHint9051, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
     }
     else
     {
         @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.view.Surface.staticClass, global::android.view.Surface._setTransparentRegionHint9051, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
     }
 }
コード例 #12
0
ファイル: Region.cs プロジェクト: zhouweiaccp/XobotOS
 /// <summary>Set the dst region to the result of translating this region by [dx, dy].
 ///     </summary>
 /// <remarks>
 /// Set the dst region to the result of translating this region by [dx, dy].
 /// If this region is empty, then dst will be set to empty.
 /// </remarks>
 public virtual void translate(int dx, int dy, android.graphics.Region dst)
 {
     libxobotos_Region_translate(mNativeRegion, dx, dy, dst != null ? dst.mNativeRegion
                          : android.graphics.Region.NativeRegion.Zero);
 }
コード例 #13
0
ファイル: Region.cs プロジェクト: zhouweiaccp/XobotOS
 /// <summary>Return a copy of the specified region</summary>
 public Region(android.graphics.Region region) : this(nativeConstructor())
 {
     // the native values for these must match up with the enum in SkRegion.h
     nativeSetRegion(mNativeRegion, region.mNativeRegion);
 }
コード例 #14
0
ファイル: Region.cs プロジェクト: zhouweiaccp/XobotOS
 /// <summary>
 /// Return true if the region is empty, or if the specified region does not
 /// intersect the region.
 /// </summary>
 /// <remarks>
 /// Return true if the region is empty, or if the specified region does not
 /// intersect the region. Returning false is not a guarantee that they
 /// intersect, but returning true is a guarantee that they do not.
 /// </remarks>
 public virtual bool quickReject(android.graphics.Region rgn)
 {
     return(libxobotos_Region_quickReject(mNativeRegion, rgn != null ? rgn.mNativeRegion
                          : android.graphics.Region.NativeRegion.Zero));
 }
コード例 #15
0
ファイル: Surface.cs プロジェクト: zhouweiaccp/XobotOS
 public virtual void setTransparentRegionHint(android.graphics.Region region)
 {
     throw new System.NotImplementedException();
 }
コード例 #16
0
 public abstract void setInsets(android.view.IWindow arg1, int arg2, android.graphics.Rect
                                arg3, android.graphics.Rect arg4, android.graphics.Region arg5);
コード例 #17
0
ファイル: Region.cs プロジェクト: zhouweiaccp/XobotOS
 /// <summary>
 /// Set this region to the result of performing the Op on the specified
 /// regions.
 /// </summary>
 /// <remarks>
 /// Set this region to the result of performing the Op on the specified
 /// regions. Return true if the result is not empty.
 /// </remarks>
 public virtual bool op(android.graphics.Region region1, android.graphics.Region region2
                        , android.graphics.Region.Op op_1)
 {
     return(nativeOp(mNativeRegion, region1.mNativeRegion, region2.mNativeRegion, (int
                                                                                   )op_1));
 }
コード例 #18
0
ファイル: RegionIterator.cs プロジェクト: zhouweiaccp/XobotOS
 /// <summary>Construct an iterator for all of the rectangles in a region.</summary>
 /// <remarks>
 /// Construct an iterator for all of the rectangles in a region. This
 /// effectively makes a private copy of the region, so any subsequent edits
 /// to region will not affect the iterator.
 /// </remarks>
 /// <param name="region">the region that will be iterated</param>
 public RegionIterator(android.graphics.Region region)
 {
     mNativeIter = nativeConstructor(region.nativeInstance);
 }
コード例 #19
0
ファイル: Region.cs プロジェクト: zhouweiaccp/XobotOS
 /// <summary>Set the region to the specified region.</summary>
 /// <remarks>Set the region to the specified region.</remarks>
 public virtual bool set(android.graphics.Region region)
 {
     return(nativeSetRegion(mNativeRegion, region.mNativeRegion));
 }
コード例 #20
0
 public virtual void setTransparentRegion(android.view.IWindow window, android.graphics.Region
                                          region)
 {
     throw new System.NotImplementedException();
 }
コード例 #21
0
 /// <summary>Translate the region in window to screen.</summary>
 /// <remarks>Translate the region in window to screen.</remarks>
 public virtual void translateRegionInWindowToScreen(android.graphics.Region transparentRegion
                                                     )
 {
     transparentRegion.scale(this.applicationScale);
 }
コード例 #22
0
 public virtual void setInsets(android.view.IWindow window, int touchableInsets, android.graphics.Rect
                               contentInsets, android.graphics.Rect visibleInsets, android.graphics.Region touchableRegion
                               )
 {
     throw new System.NotImplementedException();
 }
コード例 #23
0
ファイル: Region.cs プロジェクト: zhouweiaccp/XobotOS
 /// <summary>Set the dst region to the result of scaling this region by the given scale amount.
 ///     </summary>
 /// <remarks>
 /// Set the dst region to the result of scaling this region by the given scale amount.
 /// If this region is empty, then dst will be set to empty.
 /// </remarks>
 /// <hide></hide>
 public virtual void scale(float scale_1, android.graphics.Region dst)
 {
     libxobotos_Region_scale(mNativeRegion, scale_1, dst != null ? dst.mNativeRegion :
                             android.graphics.Region.NativeRegion.Zero);
 }
コード例 #24
0
ファイル: Region.cs プロジェクト: zhouweiaccp/XobotOS
 /// <summary>Perform the specified Op on this region and the specified region.</summary>
 /// <remarks>
 /// Perform the specified Op on this region and the specified region. Return
 /// true if the result of the op is not empty.
 /// </remarks>
 public virtual bool op(android.graphics.Region region, android.graphics.Region.Op
                        op_1)
 {
     return(op(this, region, op_1));
 }
コード例 #25
0
ファイル: GLES20Canvas.cs プロジェクト: zhouweiaccp/XobotOS
 public override bool clipRegion(android.graphics.Region region, android.graphics.Region
                                 .Op op)
 {
     throw new System.NotImplementedException();
 }
コード例 #26
0
ファイル: Region.cs プロジェクト: zffl/androidmono
 public Region(android.graphics.Region arg0)  : base(global::MonoJavaBridge.JNIEnv.ThreadEnv)
 {
     global::MonoJavaBridge.JNIEnv         @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     global::MonoJavaBridge.JniLocalHandle handle = @__env.NewObject(android.graphics.Region.staticClass, global::android.graphics.Region._Region3787, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
     Init(@__env, handle);
 }
コード例 #27
0
 public abstract void setTransparentRegion(android.view.IWindow arg1, android.graphics.Region
                                           arg2);
コード例 #28
0
ファイル: Region.cs プロジェクト: zhouweiaccp/XobotOS
 /// <summary>Set the region to the area described by the path and clip.</summary>
 /// <remarks>
 /// Set the region to the area described by the path and clip.
 /// Return true if the resulting region is non-empty. This produces a region
 /// that is identical to the pixels that would be drawn by the path
 /// (with no antialiasing).
 /// </remarks>
 public virtual bool setPath(android.graphics.Path path, android.graphics.Region clip
                             )
 {
     return(nativeSetPath(mNativeRegion, path.nativeInstance, clip.mNativeRegion));
 }
コード例 #29
0
ファイル: Path.cs プロジェクト: hakeemsm/XobotOS
		// must match enum in SkPath.h
		// must match enum in SkPath.h
		private void detectSimplePath(float left, float top, float right, float bottom, android.graphics.Path.Direction
			? dir)
		{
			if (mDetectSimplePaths)
			{
				if (mLastDirection == null)
				{
					mLastDirection = dir;
				}
				if (mLastDirection != dir)
				{
					isSimplePath = false;
				}
				else
				{
					if (rects == null)
					{
						rects = new android.graphics.Region();
					}
					rects.op((int)left, (int)top, (int)right, (int)bottom, android.graphics.Region.Op
						.UNION);
				}
			}
		}