コード例 #1
0
ファイル: WBoard.java プロジェクト: yhcting/writer
 void drawSheet(int left, int top, int right, int bottom) {
   getInvalidateArea(_tmpR, left, top, right, bottom, WConstants.LIMIT_THICK);
   _sheet.draw(
       _pixels,
       _sw,
       _sh,
       _ar.l,
       _ar.t,
       _ar.l + _c2s(_tmpR.l),
       _ar.t + _c2s(_tmpR.t),
       _ar.l + _c2s(_tmpR.r),
       _ar.t + _c2s(_tmpR.b),
       _zf());
 }
コード例 #2
0
ファイル: WBoard.java プロジェクト: yhcting/writer
  void moveActiveRegionTo(Object trigger_owner, int left, int top) {
    int dx = left - _ar.l;
    int dy = top - _ar.t;

    // we just re-calculate all!!!
    Rect tmpR = _rectA;
    // till now, we only consider "l, t" value.
    D2d.fill(_pixels, _sw, _sh, _bgcolor, 0, 0, _sw, _sh); // erase all.
    tmpR.set(left, top, _ar.r + dx, _ar.b + dy);
    _compensateThickness(tmpR, WConstants.LIMIT_THICK);
    _sheet.draw(_pixels, _sw, _sh, left, top, tmpR.l, tmpR.t, tmpR.r, tmpR.b, _zf());

    _ar.offset(dx, dy);
    _rar.offset(dx, dy);
    _platboard.invalidatePlatBoard();
    if (null != _activie_region_moved_listener)
      _activie_region_moved_listener.onMoved(
          trigger_owner,
          _ar.l / (float) _sheet.width(),
          _ar.t / (float) _sheet.height(),
          _ar.r / (float) _sheet.width(),
          _ar.b / (float) _sheet.height());
  }
コード例 #3
0
ファイル: WBoard.java プロジェクト: yhcting/writer
 // Draw active rectangle fully.
 void drawSheet() {
   _sheet.draw(_pixels, _sw, _sh, _ar.l, _ar.t, _ar.l, _ar.t, _ar.r, _ar.b, _zf());
 }