internal Translator(CompatibilityInfo _enclosing) { this._enclosing = _enclosing; mContentInsetsBuffer = null; mVisibleInsetsBuffer = null; mTouchableAreaBuffer = null; }
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); }
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)); }
public override bool gatherTransparentRegion(android.graphics.Region region) { bool opaque = base.gatherTransparentRegion(region); if (region != null && mForeground != null) { applyDrawableToTransparentRegion(mForeground, region); } return(opaque); }
internal Translator(CompatibilityInfo _enclosing, float applicationScale, float applicationInvertedScale ) { this._enclosing = _enclosing; mContentInsetsBuffer = null; mVisibleInsetsBuffer = null; mTouchableAreaBuffer = null; this.applicationScale = applicationScale; this.applicationInvertedScale = applicationInvertedScale; }
/// <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); }
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))); } }
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))); } }
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)); } }
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))); } }
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)); } }
/// <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); }
/// <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); }
/// <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)); }
public virtual void setTransparentRegionHint(android.graphics.Region region) { throw new System.NotImplementedException(); }
public abstract void setInsets(android.view.IWindow arg1, int arg2, android.graphics.Rect arg3, android.graphics.Rect arg4, android.graphics.Region arg5);
/// <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)); }
/// <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); }
/// <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)); }
public virtual void setTransparentRegion(android.view.IWindow window, android.graphics.Region region) { throw new System.NotImplementedException(); }
/// <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); }
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(); }
/// <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); }
/// <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)); }
public override bool clipRegion(android.graphics.Region region, android.graphics.Region .Op op) { throw new System.NotImplementedException(); }
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); }
public abstract void setTransparentRegion(android.view.IWindow arg1, android.graphics.Region arg2);
/// <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)); }
// 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); } } }