Ejemplo n.º 1
0
 /// <summary>
 /// Create a PathMeasure object associated with the specified path object
 /// (already created and specified).
 /// </summary>
 /// <remarks>
 /// Create a PathMeasure object associated with the specified path object
 /// (already created and specified). The meansure object can now return the
 /// path's length, and the position and tangent of any position along the
 /// path.
 /// Note that once a path is associated with the measure object, it is
 /// undefined if the path is subsequently modified and the the measure object
 /// is used. If the path is modified, you must call setPath with the path.
 /// </remarks>
 /// <param name="path">The path that will be measured by this object</param>
 /// <param name="forceClosed">
 /// If true, then the path will be considered as "closed"
 /// even if its contour was not explicitly closed.
 /// </param>
 public PathMeasure(android.graphics.Path path, bool forceClosed)
 {
     // note: the native side makes a copy of path, so we don't need a java
     // reference to it here, since it's fine if it gets GC'd
     native_instance = native_create(path != null ? path.nativeInstance : null, forceClosed
                                     );
 }
Ejemplo n.º 2
0
 /// <summary>Assign a new path, or null to have none.</summary>
 /// <remarks>Assign a new path, or null to have none.</remarks>
 public virtual void setPath(android.graphics.Path path, bool forceClosed)
 {
     // note: the native side makes a copy of path, so we don't need a java
     // reference to it here, since it's fine if it gets GC'd
     native_setPath(native_instance, path != null ? path.nativeInstance : null, forceClosed
                    );
 }
Ejemplo n.º 3
0
		/// <summary>PathShape constructor.</summary>
		/// <remarks>PathShape constructor.</remarks>
		/// <param name="path">a Path that defines the geometric paths for this shape</param>
		/// <param name="stdWidth">
		/// the standard width for the shape. Any changes to the
		/// width with resize() will result in a width scaled based
		/// on the new width divided by this width.
		/// </param>
		/// <param name="stdHeight">
		/// the standard height for the shape. Any changes to the
		/// height with resize() will result in a height scaled based
		/// on the new height divided by this height.
		/// </param>
		public PathShape(android.graphics.Path path, float stdWidth, float stdHeight)
		{
			// cached from onResize
			// cached from onResize
			mPath = path;
			mStdWidth = stdWidth;
			mStdHeight = stdHeight;
		}
Ejemplo n.º 4
0
 /// <summary>PathShape constructor.</summary>
 /// <remarks>PathShape constructor.</remarks>
 /// <param name="path">a Path that defines the geometric paths for this shape</param>
 /// <param name="stdWidth">
 /// the standard width for the shape. Any changes to the
 /// width with resize() will result in a width scaled based
 /// on the new width divided by this width.
 /// </param>
 /// <param name="stdHeight">
 /// the standard height for the shape. Any changes to the
 /// height with resize() will result in a height scaled based
 /// on the new height divided by this height.
 /// </param>
 public PathShape(android.graphics.Path path, float stdWidth, float stdHeight)
 {
     // cached from onResize
     // cached from onResize
     mPath      = path;
     mStdWidth  = stdWidth;
     mStdHeight = stdHeight;
 }
Ejemplo n.º 5
0
 /// <summary>Dash the drawn path by stamping it with the specified shape.</summary>
 /// <remarks>
 /// Dash the drawn path by stamping it with the specified shape. This only
 /// applies to drawings when the paint's style is STROKE or STROKE_AND_FILL.
 /// If the paint's style is FILL, then this effect is ignored. The paint's
 /// strokeWidth does not affect the results.
 /// </remarks>
 /// <param name="shape">The path to stamp along</param>
 /// <param name="advance">spacing between each stamp of shape</param>
 /// <param name="phase">amount to offset before the first shape is stamped</param>
 /// <param name="style">how to transform the shape at each position as it is stamped</param>
 public PathDashPathEffect(android.graphics.Path shape, float advance, float phase
                           , android.graphics.PathDashPathEffect.Style style)
 {
     //!< translate the shape to each position
     //!< rotate the shape about its center
     //!< transform each point, and turn lines into curves
     native_instance = nativeCreate(shape.nativeInstance, advance, phase, (int)style);
 }
Ejemplo n.º 6
0
 public override void draw(android.graphics.Canvas c, android.graphics.Path highlight
                           , android.graphics.Paint highlightpaint, int cursorOffset)
 {
     if (mDirect != null && highlight == null)
     {
         c.drawText(mDirect, 0, mBottom - mDesc, mPaint);
     }
     else
     {
         base.draw(c, highlight, highlightpaint, cursorOffset);
     }
 }
Ejemplo n.º 7
0
 public virtual void addPath(android.graphics.Path arg0, float arg1, float arg2)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         @__env.CallVoidMethod(this.JvmHandle, global::android.graphics.Path._addPath3581, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2));
     }
     else
     {
         @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.graphics.Path.staticClass, global::android.graphics.Path._addPath3581, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2));
     }
 }
Ejemplo n.º 8
0
 public virtual global::android.graphics.Path toPath(android.graphics.Path arg0)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         return(global::MonoJavaBridge.JavaBridge.WrapJavaObject(@__env.CallObjectMethod(this.JvmHandle, global::android.gesture.Gesture._toPath2946, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0))) as android.graphics.Path);
     }
     else
     {
         return(global::MonoJavaBridge.JavaBridge.WrapJavaObject(@__env.CallNonVirtualObjectMethod(this.JvmHandle, global::android.gesture.Gesture.staticClass, global::android.gesture.Gesture._toPath2946, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0))) as android.graphics.Path);
     }
 }
Ejemplo n.º 9
0
 public virtual bool getSegment(float arg0, float arg1, android.graphics.Path arg2, bool arg3)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         return(@__env.CallBooleanMethod(this.JvmHandle, global::android.graphics.PathMeasure._getSegment3599, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg3)));
     }
     else
     {
         return(@__env.CallNonVirtualBooleanMethod(this.JvmHandle, global::android.graphics.PathMeasure.staticClass, global::android.graphics.PathMeasure._getSegment3599, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg3)));
     }
 }
Ejemplo n.º 10
0
 public virtual bool getBoundaryPath(android.graphics.Path arg0)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         return(@__env.CallBooleanMethod(this.JvmHandle, global::android.graphics.Region._getBoundaryPath3783, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)));
     }
     else
     {
         return(@__env.CallNonVirtualBooleanMethod(this.JvmHandle, global::android.graphics.Region.staticClass, global::android.graphics.Region._getBoundaryPath3783, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)));
     }
 }
Ejemplo n.º 11
0
 public override void draw(android.graphics.Canvas arg0, android.graphics.Path arg1, android.graphics.Paint arg2, int arg3)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         @__env.CallVoidMethod(this.JvmHandle, global::android.text.BoringLayout._draw7611, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg3));
     }
     else
     {
         @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.text.BoringLayout.staticClass, global::android.text.BoringLayout._draw7611, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg3));
     }
 }
Ejemplo n.º 12
0
 public virtual void set(android.graphics.Path arg0)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         @__env.CallVoidMethod(this.JvmHandle, global::android.graphics.Path._set3552, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
     }
     else
     {
         @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.graphics.Path.staticClass, global::android.graphics.Path._set3552, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
     }
 }
Ejemplo n.º 13
0
 public virtual void transform(android.graphics.Matrix arg0, android.graphics.Path arg1)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         @__env.CallVoidMethod(this.JvmHandle, global::android.graphics.Path._transform3549, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1));
     }
     else
     {
         @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.graphics.Path.staticClass, global::android.graphics.Path._transform3549, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1));
     }
 }
Ejemplo n.º 14
0
 /// <summary>RoundRectShape constructor.</summary>
 /// <remarks>
 /// RoundRectShape constructor.
 /// Specifies an outer (round)rect and an optional inner (round)rect.
 /// </remarks>
 /// <param name="outerRadii">
 /// An array of 8 radius values, for the outer roundrect.
 /// The first two floats are for the
 /// top-left corner (remaining pairs correspond clockwise).
 /// For no rounded corners on the outer rectangle,
 /// pass null.
 /// </param>
 /// <param name="inset">
 /// A RectF that specifies the distance from the inner
 /// rect to each side of the outer rect.
 /// For no inner, pass null.
 /// </param>
 /// <param name="innerRadii">
 /// An array of 8 radius values, for the inner roundrect.
 /// The first two floats are for the
 /// top-left corner (remaining pairs correspond clockwise).
 /// For no rounded corners on the inner rectangle,
 /// pass null.
 /// If inset parameter is null, this parameter is ignored.
 /// </param>
 public RoundRectShape(float[] outerRadii, android.graphics.RectF inset, float[] innerRadii
                       )
 {
     // this is what we actually draw
     if (outerRadii != null && outerRadii.Length < 8)
     {
         throw new System.IndexOutOfRangeException("outer radii must have >= 8 values");
     }
     if (innerRadii != null && innerRadii.Length < 8)
     {
         throw new System.IndexOutOfRangeException("inner radii must have >= 8 values");
     }
     mOuterRadii = outerRadii;
     mInset      = inset;
     mInnerRadii = innerRadii;
     if (inset != null)
     {
         mInnerRect = new android.graphics.RectF();
     }
     mPath = new android.graphics.Path();
 }
Ejemplo n.º 15
0
		/// <summary>RoundRectShape constructor.</summary>
		/// <remarks>
		/// RoundRectShape constructor.
		/// Specifies an outer (round)rect and an optional inner (round)rect.
		/// </remarks>
		/// <param name="outerRadii">
		/// An array of 8 radius values, for the outer roundrect.
		/// The first two floats are for the
		/// top-left corner (remaining pairs correspond clockwise).
		/// For no rounded corners on the outer rectangle,
		/// pass null.
		/// </param>
		/// <param name="inset">
		/// A RectF that specifies the distance from the inner
		/// rect to each side of the outer rect.
		/// For no inner, pass null.
		/// </param>
		/// <param name="innerRadii">
		/// An array of 8 radius values, for the inner roundrect.
		/// The first two floats are for the
		/// top-left corner (remaining pairs correspond clockwise).
		/// For no rounded corners on the inner rectangle,
		/// pass null.
		/// If inset parameter is null, this parameter is ignored.
		/// </param>
		public RoundRectShape(float[] outerRadii, android.graphics.RectF inset, float[] innerRadii
			)
		{
			// this is what we actually draw
			if (outerRadii != null && outerRadii.Length < 8)
			{
				throw new System.IndexOutOfRangeException("outer radii must have >= 8 values");
			}
			if (innerRadii != null && innerRadii.Length < 8)
			{
				throw new System.IndexOutOfRangeException("inner radii must have >= 8 values");
			}
			mOuterRadii = outerRadii;
			mInset = inset;
			mInnerRadii = innerRadii;
			if (inset != null)
			{
				mInnerRect = new android.graphics.RectF();
			}
			mPath = new android.graphics.Path();
		}
Ejemplo n.º 16
0
 public PathMeasure(android.graphics.Path arg0, bool arg1)  : base(global::MonoJavaBridge.JNIEnv.ThreadEnv)
 {
     global::MonoJavaBridge.JNIEnv         @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     global::MonoJavaBridge.JniLocalHandle handle = @__env.NewObject(android.graphics.PathMeasure.staticClass, global::android.graphics.PathMeasure._PathMeasure3602, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1));
     Init(@__env, handle);
 }
Ejemplo n.º 17
0
		internal android.graphics.Path buildRing(android.graphics.drawable.GradientDrawable
			.GradientState st)
		{
			if (mRingPath != null && (!st.mUseLevelForShape || !mPathIsDirty))
			{
				return mRingPath;
			}
			mPathIsDirty = false;
			float sweep = st.mUseLevelForShape ? (360.0f * getLevel() / 10000.0f) : 360f;
			android.graphics.RectF bounds = new android.graphics.RectF(mRect);
			float x = bounds.width() / 2.0f;
			float y = bounds.height() / 2.0f;
			float thickness = st.mThickness != -1 ? st.mThickness : bounds.width() / st.mThicknessRatio;
			// inner radius
			float radius = st.mInnerRadius != -1 ? st.mInnerRadius : bounds.width() / st.mInnerRadiusRatio;
			android.graphics.RectF innerBounds = new android.graphics.RectF(bounds);
			innerBounds.inset(x - radius, y - radius);
			bounds = new android.graphics.RectF(innerBounds);
			bounds.inset(-thickness, -thickness);
			if (mRingPath == null)
			{
				mRingPath = new android.graphics.Path();
			}
			else
			{
				mRingPath.reset();
			}
			android.graphics.Path ringPath = mRingPath;
			// arcTo treats the sweep angle mod 360, so check for that, since we
			// think 360 means draw the entire oval
			if (sweep < 360 && sweep > -360)
			{
				ringPath.setFillType(android.graphics.Path.FillType.EVEN_ODD);
				// inner top
				ringPath.moveTo(x + radius, y);
				// outer top
				ringPath.lineTo(x + radius + thickness, y);
				// outer arc
				ringPath.arcTo(bounds, 0.0f, sweep, false);
				// inner arc
				ringPath.arcTo(innerBounds, sweep, -sweep, false);
				ringPath.close();
			}
			else
			{
				// add the entire ovals
				ringPath.addOval(bounds, android.graphics.Path.Direction.CW);
				ringPath.addOval(innerBounds, android.graphics.Path.Direction.CCW);
			}
			return ringPath;
		}
Ejemplo n.º 18
0
 public PathShape(android.graphics.Path arg0, float arg1, float arg2)  : base(global::MonoJavaBridge.JNIEnv.ThreadEnv)
 {
     global::MonoJavaBridge.JNIEnv         @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     global::MonoJavaBridge.JniLocalHandle handle = @__env.NewObject(android.graphics.drawable.shapes.PathShape.staticClass, global::android.graphics.drawable.shapes.PathShape._PathShape4234, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2));
     Init(@__env, handle);
 }
Ejemplo n.º 19
0
 public override void drawPath(android.graphics.Path path, android.graphics.Paint
                               paint)
 {
     throw new System.NotImplementedException();
 }
Ejemplo n.º 20
0
 /// <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));
 }
Ejemplo n.º 21
0
		/// <summary>Return the boundary of the region as a new Path.</summary>
		/// <remarks>
		/// Return the boundary of the region as a new Path. If the region is empty,
		/// the path will also be empty.
		/// </remarks>
		public virtual android.graphics.Path getBoundaryPath()
		{
			android.graphics.Path path = new android.graphics.Path();
			nativeGetBoundaryPath(mNativeRegion, path.nativeInstance);
			return path;
		}
Ejemplo n.º 22
0
 /// <summary>Set the path to the boundary of the region.</summary>
 /// <remarks>
 /// Set the path to the boundary of the region. If the region is empty, the
 /// path will also be empty.
 /// </remarks>
 public virtual bool getBoundaryPath(android.graphics.Path path)
 {
     return(nativeGetBoundaryPath(mNativeRegion, path.nativeInstance));
 }
Ejemplo n.º 23
0
 /// <summary>Return the boundary of the region as a new Path.</summary>
 /// <remarks>
 /// Return the boundary of the region as a new Path. If the region is empty,
 /// the path will also be empty.
 /// </remarks>
 public virtual android.graphics.Path getBoundaryPath()
 {
     android.graphics.Path path = new android.graphics.Path();
     nativeGetBoundaryPath(mNativeRegion, path.nativeInstance);
     return(path);
 }
Ejemplo n.º 24
0
 public override void drawTextOnPath(char[] text, int index, int count, android.graphics.Path
                                     path, float hOffset, float vOffset, android.graphics.Paint paint)
 {
     throw new System.NotImplementedException();
 }
Ejemplo n.º 25
0
 public override void drawTextOnPath(string text, android.graphics.Path path, float
                                     hOffset, float vOffset, android.graphics.Paint paint)
 {
     throw new System.NotImplementedException();
 }
Ejemplo n.º 26
0
 public Path(android.graphics.Path arg0)  : base(global::MonoJavaBridge.JNIEnv.ThreadEnv)
 {
     global::MonoJavaBridge.JNIEnv         @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     global::MonoJavaBridge.JniLocalHandle handle = @__env.NewObject(android.graphics.Path.staticClass, global::android.graphics.Path._Path3584, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
     Init(@__env, handle);
 }
Ejemplo n.º 27
0
 public override bool clipPath(android.graphics.Path path, android.graphics.Region
                               .Op op)
 {
     throw new System.NotImplementedException();
 }
Ejemplo n.º 28
0
 public PathDashPathEffect(android.graphics.Path arg0, float arg1, float arg2, android.graphics.PathDashPathEffect.Style arg3)  : base(global::MonoJavaBridge.JNIEnv.ThreadEnv)
 {
     global::MonoJavaBridge.JNIEnv         @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     global::MonoJavaBridge.JniLocalHandle handle = @__env.NewObject(android.graphics.PathDashPathEffect.staticClass, global::android.graphics.PathDashPathEffect._PathDashPathEffect3590, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg3));
     Init(@__env, handle);
 }
Ejemplo n.º 29
0
 /// <summary>
 /// Given a start and stop distance, return in dst the intervening
 /// segment(s).
 /// </summary>
 /// <remarks>
 /// Given a start and stop distance, return in dst the intervening
 /// segment(s). If the segment is zero-length, return false, else return
 /// true. startD and stopD are pinned to legal values (0..getLength()).
 /// If startD &lt;= stopD then return false (and leave dst untouched).
 /// Begin the segment with a moveTo if startWithMoveTo is true
 /// </remarks>
 public virtual bool getSegment(float startD, float stopD, android.graphics.Path dst
                                , bool startWithMoveTo)
 {
     return(native_getSegment(native_instance, startD, stopD, dst.nativeInstance, startWithMoveTo
                              ));
 }
Ejemplo n.º 30
0
		public virtual void setShape(int shape)
		{
			mRingPath = null;
			mPathIsDirty = true;
			mGradientState.setShape(shape);
			invalidateSelf();
		}
Ejemplo n.º 31
0
 public override bool quickReject(android.graphics.Path path, android.graphics.Canvas
                                  .EdgeType type)
 {
     throw new System.NotImplementedException();
 }
Ejemplo n.º 32
0
		protected internal override void onBoundsChange(android.graphics.Rect r)
		{
			base.onBoundsChange(r);
			mRingPath = null;
			mPathIsDirty = true;
			mRectIsDirty = true;
		}