Inheritance: java.lang.Object
Exemplo n.º 1
0
		public PathFillTypes (Context context)
			: base (context)
		{
			mPath = new Path ();
			mPath.addCircle (40, 40, 45, Path.Direction.CCW);
			mPath.addCircle (80, 80, 45, Path.Direction.CCW);
		}
Exemplo n.º 2
0
		protected void OnKeyPressEvent (KeyPressEventArgs e)
		{
			if (e.KeyChar == 'f') {
				mPath = makeFollowPath ();
				invalidate ();
			}
		}
Exemplo n.º 3
0
		void showPath (Canvas canvas, int x, int y, Path.FillType ft, Paint paint)
		{
			canvas.save ();
			canvas.translate (x, y);
			canvas.clipRect (0, 0, 120, 120);
			canvas.drawColor (Color.WHITE);
			mPath.setFillType (ft);
			canvas.drawPath (mPath, paint);
			canvas.restore ();
		}
Exemplo n.º 4
0
		static Path makeFollowPath ()
		{
			Path p = new Path ();
			p.moveTo (0, 0);
			Random random = new Random ();
			for (int i = 1; i <= 15; i++) {
				p.lineTo (i * 20, (float)random.NextDouble () * 35);
			}
			return p;
		}
Exemplo n.º 5
0
		public Clipping (Context context)
			: base (context)
		{
			mPaint = new Paint ();
			mPaint.setAntiAlias (true);
			mPaint.setStrokeWidth (6);
			mPaint.setTextSize (16);
			mPaint.setTextAlign (Paint.Align.RIGHT);

			mPath = new Path ();
		}
Exemplo n.º 6
0
		public PathEffects (Context context)
			: base (context)
		{
			mPaint = new Paint (Paint.ANTI_ALIAS_FLAG);
			mPaint.setStyle (Paint.Style.STROKE);
			mPaint.setStrokeWidth (6);

			mPath = makeFollowPath ();

			mEffects = new PathEffect[6];

			mColors = new int[] {
				Color.BLACK, Color.RED, Color.BLUE,
				Color.GREEN, Color.MAGENTA, Color.BLACK
			};
		}
Exemplo n.º 7
0
		static Path makePathDash ()
		{
			Path p = new Path ();
			p.moveTo (4, 0);
			p.lineTo (0, -4);
			p.lineTo (8, -4);
			p.lineTo (12, 0);
			p.lineTo (8, 4);
			p.lineTo (0, 4);
			return p;
		}