Example #1
0
 @Override
 protected void onDraw(Canvas canvas) {
   super.onDraw(canvas);
   // Log.d("DRAWING CELL", "DRAWING CELL " + getText());
   canvas.drawLine(getWidth() - 1, 0, getWidth() - 1, getHeight() - 1, paints[right]);
   canvas.drawLine(0, 0, getWidth() - 1, 0, paints[up]);
   canvas.drawLine(0, 0, 0, getHeight() - 1, paints[left]);
   canvas.drawLine(0, getHeight() - 1, getWidth() - 1, getHeight() - 1, paints[down]);
 }
Example #2
0
  @Override
  protected void onDraw(Canvas canvas) {
    // TODO Auto-generated method stub
    super.onDraw(canvas);
    Paint paint = new Paint();
    paint.setColor(R.color.purple_dark);
    paint.setAntiAlias(true);

    int bar_height = getHeight();
    int bar_width = getWidth();
    canvas.drawLine(
        0, (float) (bar_height - lineHeight), bar_width, (float) (bar_height - lineHeight), paint);
  }
Example #3
0
	@Override
	protected void onDraw(Canvas canvas) {

		mIsDrawing = true;
		super.onDraw(canvas);

		if(mReadyToDraw){

			//long time = System.currentTimeMillis();

			// Draw grid
			if(mGridType == GridType.FULL || mGridType == GridType.VERTICAL)
				drawVerticalGrid(canvas);
			if(mGridType == GridType.FULL || mGridType == GridType.HORIZONTAL)
				drawHorizontalGrid(canvas);

			// Draw Axis Y
			verController.draw(canvas);

			// Draw threshold
			if (mHasThresholdValue)
				drawThreshold(canvas,
						getInnerChartLeft(),
						mThresholdStartValue,
						getInnerChartRight(),
						mThresholdEndValue);
			if (mHasThresholdLabel)
				drawThreshold(canvas,
						data.get(0).getEntry(mThresholdStartLabel).getX(),
						getInnerChartTop(),
						data.get(0).getEntry(mThresholdEndLabel).getX(),
						getInnerChartBottom());

			// Draw data
			if(!data.isEmpty())
				onDrawChart(canvas, data);

			// Draw axis X
			horController.draw(canvas);

			//System.out.println("Time drawing "+(System.currentTimeMillis() - time));
		}

		mIsDrawing = false;
	}
  @Override
  protected void onDraw(Canvas canvas) {
    super.onDraw(canvas);

    if (!isReady) return;

    if (bitmap == null || canvas == null) {
      if (bitmap != null) bitmap.recycle();

      bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
      this.canvas = new Canvas(bitmap);
    }

    /** Draw mask */
    this.canvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR);
    this.canvas.drawColor(maskColor);

    /** Clear focus area */
    circleShape.draw(this.canvas, eraser, padding);

    canvas.drawBitmap(bitmap, 0, 0, null);
  }
Example #5
0
 /** 绘制拖动时的图片 */
 @Override
 protected void onDraw(Canvas canvas) {
   super.onDraw(canvas);
   invalidateDragImg(canvas);
 }
 @Override
 protected void onDraw(Canvas canvas) {
   super.onDraw(canvas);
 }