setStrokeWidth() 공개 메소드

public setStrokeWidth ( float arg0 ) : void
arg0 float
리턴 void
예제 #1
0
		protected override void onDraw (Canvas canvas)
		{
			Paint paint = new Paint ();

			canvas.translate (10, 10);

			canvas.drawColor (Color.WHITE);

			paint.setColor (Color.RED);
			paint.setStrokeWidth (0);
			canvas.drawLines (mPts, paint);

			paint.setColor (Color.BLUE);
			paint.setStrokeWidth (3);
			canvas.drawPoints (mPts, paint);
		}
예제 #2
0
파일: Spiral.cs 프로젝트: hakeemsm/XobotOS
		protected override void onDraw (Canvas canvas)
		{
			canvas.drawColor (unchecked((int)0xFFDDDDDD));

			Paint paint = new Paint ();
			paint.setAntiAlias (true);
			paint.setStyle (Paint.Style.STROKE);
			paint.setStrokeWidth (3);
			paint.setStyle (Paint.Style.FILL);

			RectF r = new RectF ();
			float t, x, y;

			t = GetAnimScalar (25, 500);

			canvas.translate (320, 240);

			for (int i = 0; i < 35; i++) {
				paint.setColor (unchecked((int)0xFFF00FF0 - i * 0x04000000));
				double step = Math.PI / (55 - i);
				double angle = t * step;
				x = (20 + i * 5) * (float)Math.Sin (angle);
				y = (20 + i * 5) * (float)Math.Cos (angle);
				r.set (x, y, x + 10, y + 10);
				canvas.drawRect (r, paint);
			}
		}
예제 #3
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 ();
		}
예제 #4
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
			};
		}
예제 #5
0
파일: Box.cs 프로젝트: hakeemsm/XobotOS
		protected override void onDraw (Canvas canvas)
		{
			canvas.drawColor (unchecked((int)0xFFDDDDDD));

			Paint paint = new Paint ();
			paint.setAntiAlias (true);
			paint.setStyle (Paint.Style.STROKE);
			paint.setStrokeWidth (3);
			paint.setStyle (Paint.Style.FILL);

			RectF r = new RectF (10, 10, 110, 110);

			for (int i = 0; i < 256; ++i) {
				canvas.translate (1, 1);
				paint.setColor ((int)(0xFF000000 + i * 0x00010000));
				canvas.drawRect (r, paint);
			}
		}
예제 #6
0
파일: Arcs.cs 프로젝트: hakeemsm/XobotOS
		public Arcs (Context context)
			: base (context)
		{
			mPaints = new Paint[4];
			mUseCenters = new bool[4];
			mOvals = new RectF[4];

			mPaints [0] = new Paint ();
			mPaints [0].setAntiAlias (true);
			mPaints [0].setStyle (Paint.Style.FILL);
			mPaints [0].setColor (unchecked((int)0x88FF0000));
			mUseCenters [0] = false;

			mPaints [1] = new Paint (mPaints [0]);
			mPaints [1].setColor (unchecked((int)0x8800FF00));
			mUseCenters [1] = true;

			mPaints [2] = new Paint (mPaints [0]);
			mPaints [2].setStyle (Paint.Style.STROKE);
			mPaints [2].setStrokeWidth (4);
			mPaints [2].setColor (unchecked((int)0x880000FF));
			mUseCenters [2] = false;

			mPaints [3] = new Paint (mPaints [2]);
			mPaints [3].setColor (unchecked((int)0x88888888));
			mUseCenters [3] = true;

			mBigOval = new RectF (40, 10, 280, 250);

			mOvals [0] = new RectF (10, 270, 70, 330);
			mOvals [1] = new RectF (90, 270, 150, 330);
			mOvals [2] = new RectF (170, 270, 230, 330);
			mOvals [3] = new RectF (250, 270, 310, 330);

			mFramePaint = new Paint ();
			mFramePaint.setAntiAlias (true);
			mFramePaint.setStyle (Paint.Style.STROKE);
			mFramePaint.setStrokeWidth (0);

			// AddTimer (50);
		}
예제 #7
0
		protected override void onDraw(Canvas canvas)
		{
			canvas.drawColor(Color.YELLOW);
			int width = canvas.getWidth();
			int height = canvas.getHeight();

			Paint paint = new Paint();
			paint.setColor(Color.RED);
			paint.setStyle(Paint.Style.STROKE);
			paint.setStrokeWidth(10);
			canvas.drawCircle(width / 2, height / 2, height / 3, paint);

			Paint inner = new Paint();
			paint.setColor(Color.GREEN);
			paint.setStyle(Paint.Style.FILL);
			canvas.drawCircle(width / 2, height / 2, height / 3 - 10, inner);

			Paint text = new Paint();
			text.setTextSize(20);
			canvas.drawText("I am a Xobot Monkey!", width / 8, height / 8, text);
		}
예제 #8
0
파일: Emboss.cs 프로젝트: skaslev/XobotOS
		protected override void onDraw (Canvas canvas)
		{
			canvas.drawColor (unchecked((int)0xFFDDDDDD));

			Paint paint = new Paint ();
			paint.setAntiAlias (true);
			paint.setStyle (Paint.Style.STROKE);
			paint.setStrokeWidth (10);

			EmbossMaskFilter mf = new EmbossMaskFilter (new float[] { 1, 1, 1 }, 128, 16 * 2, 4);
			paint.setMaskFilter (mf);
			mf.Dispose ();

			// paint.setMaskFilter(new SkEmbossMaskFilter(fLight, SkIntToScalar(4)))->unref();
			// paint.setShader(new SkColorShader(SK_ColorBLUE))->unref();

			paint.setDither (true);

			canvas.drawCircle (50, 50, 30, paint);

			paint.Dispose ();
		}
    ///**
    // * Instantiates a new circular seek bar.
    // * 
    // * @param context
    // *            the context
    // * @param attrs
    // *            the attrs
    // * @param defStyle
    // *            the def style
    // */
    //public CircularSeekBar(Context context, AttributeSet attrs, int defStyle) {
    //    //super(context, attrs, defStyle);
    //    mContext = context;
    //    //initDrawable();
    //}

    ///**
    // * Instantiates a new circular seek bar.
    // * 
    // * @param context
    // *            the context
    // * @param attrs
    // *            the attrs
    // */
    //public CircularSeekBar(Context context, AttributeSet attrs) {
    //    //super(context, attrs);
    //    mContext = context;
    //    //initDrawable();
    //}

	/**
	 * Instantiates a new circular seek bar.
	 * 
	 * @param context
	 *            the context
	 */
	public CircularSeekBar(Context context) {
		//super(context);
		mContext = context;

        circleColor = new Paint();
        innerColor = new Paint();
        circleRing = new Paint();

        circleColor.setColor(Color.parseColor("#ff33b5e5")); // Set default
        // progress
        // color to holo
        // blue.
        innerColor.setColor(Color.BLACK); // Set default background color to
        // black
        circleRing.setColor(Color.GRAY);// Set default background color to Gray

        circleColor.setAntiAlias(true);
        innerColor.setAntiAlias(true);
        circleRing.setAntiAlias(true);

        circleColor.setStrokeWidth(5);
        innerColor.setStrokeWidth(5);
        circleRing.setStrokeWidth(5);

        circleColor.setStyle(Paint.Style.FILL);

        //initDrawable();

	}