Beispiel #1
0
    public void draw(Canvas canvas) {
      if (matrix != null) {
        canvas.concat(matrix);
      }

      graphics = AndroidGraphics.fromGraphics(canvas, this, graphics);

      final iPlatformComponentPainter cp = componentPainter;

      if (cp == null) {
        super.draw(canvas);
      } else {
        cp.paint(
            graphics,
            getScrollX(),
            getScrollY(),
            getWidth(),
            getHeight(),
            iPlatformPainter.UNKNOWN,
            false);
        super.draw(canvas);
        cp.paint(
            graphics,
            getScrollX(),
            getScrollY(),
            getWidth(),
            getHeight(),
            iPlatformPainter.UNKNOWN,
            true);
      }

      graphics.clear();
    }
Beispiel #2
0
    protected void onDraw(Canvas canvas) {
      if (isBack) {
        graphics = AndroidGraphics.fromGraphics(canvas, this, graphics);

        if (rect == null) {
          rect = new UIRectangle();
        }

        rect.width = getWidth();
        rect.height = getHeight();
        paintButton(graphics, rect, isPressed);
      }

      super.onDraw(canvas);
    }