示例#1
0
文件: VncCanvas.java 项目: mzhou/bVNC
 /** Invalidates (to redraw) the location of the remote pointer. */
 public void invalidateMousePosition() {
   if (bitmapData != null) {
     bitmapData.moveCursorRect(pointer.mouseX, pointer.mouseY);
     Rect r = bitmapData.getCursorRect();
     reDraw(r.left, r.top, r.width(), r.height());
   }
 }
示例#2
0
文件: VncCanvas.java 项目: mzhou/bVNC
  /**
   * Moves soft cursor into a particular location.
   *
   * @param x
   * @param y
   */
  synchronized void softCursorMove(int x, int y) {
    if (bitmapData.isNotInitSoftCursor()) {
      initializeSoftCursor();
    }

    if (!inScrolling) {
      pointer.mouseX = x;
      pointer.mouseY = y;
      Rect pCRect = new Rect(bitmapData.getCursorRect());
      // Move the cursor.
      bitmapData.moveCursorRect(x, y);
      // Show the cursor.
      Rect r = bitmapData.getCursorRect();
      reDraw(r.left, r.top, r.width(), r.height());
      reDraw(pCRect.left, pCRect.top, pCRect.width(), pCRect.height());
    }
  }