Beispiel #1
0
  public void ClearAll() {
    int size = pListWordSection.size();
    for (int i = 0x0; i < size; i++) {

      HandDraw.WordSection word = (HandDraw.WordSection) pListWordSection.get(i);
      Rect rc =
          new Rect(
              word.GetX(),
              (word.GetY() * (nItemHeight + nHeightSpace)),
              (word.GetX() + word.GetWidth()),
              ((word.GetY() + 0x1) * (nItemHeight + nHeightSpace)));
      Paint paint = new Paint();
      paint.setColor(0xffffffff);
      canvasDst.drawRect(rc, paint);
    }
    if (bitmapDst != null) {
      bitmapDst.recycle();
      bitmapDst = null;
      bitmapDst =
          Bitmap.createBitmap(
              GlobalVariables.screenWidth, GlobalVariables.canvasHeigh, Bitmap.Config.ARGB_4444);

      canvasDst = new Canvas(bitmapDst);
      bitmapDst.eraseColor(0x0);
      drawdst();
    }
    for (int i = pListWordSection.size() - 1; i >= 0; i--) {
      pListWordSection.remove(i);
    }

    for (int i = pListMaskRect.size() - 1; i >= 0; i--) {
      pListMaskRect.remove(i);
    }

    nLineCount = 0x0;
    nstartx = 0x5;
    nstarty = ((((nItemHeight + nHeightSpace)) * nLineCount) + nHeightSpace);
    Log.d("size", Integer.toString(pListWordSection.size()));
  }
Beispiel #2
0
 public void UnDo() {
   int nPos = pListWordSection.size();
   nPos = nPos - 0x1;
   if (nPos < 0) {
     return;
   }
   HandDraw.WordSection word = (HandDraw.WordSection) pListWordSection.get(nPos);
   Rect rc =
       new Rect(
           (word.GetX() - 0x2),
           (word.GetY() * ((nItemHeight + nHeightSpace))),
           (word.GetX() + word.GetWidth()),
           ((word.GetY() + 0x1) * ((nItemHeight + nHeightSpace))));
   Paint paint = new Paint();
   paint.setColor(-0x1);
   canvasDst.drawRect(rc, paint);
   if (canvasBuffer != null) canvasBuffer.drawRect(rc, paint);
   nstartx = word.GetX();
   nLineCount = word.GetY();
   nstarty = ((((nItemHeight + nHeightSpace)) * nLineCount) + nHeightSpace);
   pListWordSection.remove(nPos);
   bitmapSrc.eraseColor(0x0);
   drawdst();
 }