Package android.graphics

Examples of android.graphics.Rect


                    ApplyMaskRgb am = new ApplyMaskRgb();
                    RgbImage rgb = am.Push((RgbImage)rs.Front(), imMask);
                    g.drawARGB(0, 0, 255, 0); // green
                    g.drawBitmap(
                            RgbImageAndroid.toBitmap(rgb),
                            new Rect(0, 0, rgb.getWidth(), rgb.getHeight()),
                            new Rect(
                                (g.getBitmapWidth() - rgb.getWidth())/2,
                                (g.getBitmapHeight() - rgb.getHeight())/2,
                                rgb.getWidth(),
                                rgb.getHeight()),
                            new Paint());
                } else {
                    RgbImage rgb = (RgbImage) rs.Front();
                    g.drawARGB(0, 255, 0, 0); // red
                    g.drawBitmap(
                            RgbImageAndroid.toBitmap(rgb),
                            new Rect(0, 0, rgb.getWidth(), rgb.getHeight()),
                            new Rect(
                                (g.getBitmapWidth() - rgb.getWidth())/2,
                                (g.getBitmapHeight() - rgb.getHeight())/2,
                                rgb.getWidth(),
                                rgb.getHeight()),
                            new Paint());
View Full Code Here


      p.setColor(Color.YELLOW);
      p.setStyle(Style.STROKE);
      canvas.drawRect(this.rectCurrent, p);     
    }
    for (Enumeration<Rect> e = this.vR.elements();e.hasMoreElements();) {
      Rect r = e.nextElement();
      Paint p = new Paint();
      p.setColor(Color.GREEN);
      p.setStyle(Style.STROKE);
      canvas.drawRect(r, p);
    }
View Full Code Here

                      jjil.core.Rect r = e.nextElement();
                      int nTop = (r.getTop() * mFaceView.getHeight()) / mRgbCurrent.getHeight();
                      int nBottom = (r.getBottom() * mFaceView.getHeight()) / mRgbCurrent.getHeight();
                      int nLeft = (r.getLeft() * mFaceView.getWidth()) / mRgbCurrent.getWidth();
                      int nRight = (r.getRight() * mFaceView.getWidth()) / mRgbCurrent.getWidth();
                      final Rect rDisplay = new Rect(
                              nLeft,
                              nTop,
                              nRight,
                              nBottom);
                      runOnUiThread(new Runnable() {
View Full Code Here

            // start and end coordinates for a single line
            float sx, sy, ex, ey;

            public boolean onTouch(View aView, MotionEvent aME) {

                Rect lRect = new Rect();
                Window lWindow = getWindow();
                lWindow.getDecorView().getWindowVisibleDisplayFrame(lRect);
                int lStatusBarHeight = lRect.top;
                int lContentViewTop =
                        lWindow.findViewById(Window.ID_ANDROID_CONTENT).getTop();
View Full Code Here

TOP

Related Classes of android.graphics.Rect

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.