Examples of addRect()


Examples of cli.MonoTouch.CoreGraphics.CGPath.AddRect()

        RectangleF bounds = get_Bounds();
        CAShapeLayer maskLayer = new CAShapeLayer();
        // draw four rectangles surrounding the area we want to hide, and create a mask out of it.
        CGPath path = new CGPath();
        // top
        path.AddRect(new RectangleF(0, 0, bounds.get_Width(), _hidden.get_Top()));
        // bottom
        path.AddRect(new RectangleF(0, _hidden.get_Bottom(), bounds.get_Width(),
            bounds.get_Bottom() - _hidden.get_Bottom()));
        // left
        path.AddRect(new RectangleF(0, _hidden.get_Top(), _hidden.get_Left(), _hidden.get_Height()));
View Full Code Here

Examples of cli.MonoTouch.CoreGraphics.CGPath.AddRect()

        // draw four rectangles surrounding the area we want to hide, and create a mask out of it.
        CGPath path = new CGPath();
        // top
        path.AddRect(new RectangleF(0, 0, bounds.get_Width(), _hidden.get_Top()));
        // bottom
        path.AddRect(new RectangleF(0, _hidden.get_Bottom(), bounds.get_Width(),
            bounds.get_Bottom() - _hidden.get_Bottom()));
        // left
        path.AddRect(new RectangleF(0, _hidden.get_Top(), _hidden.get_Left(), _hidden.get_Height()));
        // right
        path.AddRect(new RectangleF(_hidden.get_Right(), _hidden.get_Top(), bounds.get_Right()
View Full Code Here

Examples of cli.MonoTouch.CoreGraphics.CGPath.AddRect()

        path.AddRect(new RectangleF(0, 0, bounds.get_Width(), _hidden.get_Top()));
        // bottom
        path.AddRect(new RectangleF(0, _hidden.get_Bottom(), bounds.get_Width(),
            bounds.get_Bottom() - _hidden.get_Bottom()));
        // left
        path.AddRect(new RectangleF(0, _hidden.get_Top(), _hidden.get_Left(), _hidden.get_Height()));
        // right
        path.AddRect(new RectangleF(_hidden.get_Right(), _hidden.get_Top(), bounds.get_Right()
            - _hidden.get_Right(), _hidden.get_Height()));
        maskLayer.set_Path(path);
        get_Layer().set_Mask(maskLayer);
View Full Code Here

Examples of cli.MonoTouch.CoreGraphics.CGPath.AddRect()

        path.AddRect(new RectangleF(0, _hidden.get_Bottom(), bounds.get_Width(),
            bounds.get_Bottom() - _hidden.get_Bottom()));
        // left
        path.AddRect(new RectangleF(0, _hidden.get_Top(), _hidden.get_Left(), _hidden.get_Height()));
        // right
        path.AddRect(new RectangleF(_hidden.get_Right(), _hidden.get_Top(), bounds.get_Right()
            - _hidden.get_Right(), _hidden.get_Height()));
        maskLayer.set_Path(path);
        get_Layer().set_Mask(maskLayer);
    }
View Full Code Here

Examples of com.cloudinary.Coordinates.addRect()

    public void testFaceCoordinates() throws Exception {
      //should allow sending face coordinates
      Coordinates coordinates = new Coordinates();
      Rectangle rect1 = new Rectangle(121,31,110,151);
      Rectangle rect2 = new Rectangle(120,30,109,150);
      coordinates.addRect(rect1);
      coordinates.addRect(rect2);
      Map result = cloudinary.uploader().upload("src/test/resources/logo.png", Cloudinary.asMap("face_coordinates", coordinates, "faces", true));
      org.json.simple.JSONArray resultFaces = (org.json.simple.JSONArray) result.get("faces");
      assertEquals(2, resultFaces.size());
     
View Full Code Here

Examples of com.cloudinary.Coordinates.addRect()

      //should allow sending face coordinates
      Coordinates coordinates = new Coordinates();
      Rectangle rect1 = new Rectangle(121,31,110,151);
      Rectangle rect2 = new Rectangle(120,30,109,150);
      coordinates.addRect(rect1);
      coordinates.addRect(rect2);
      Map result = cloudinary.uploader().upload("src/test/resources/logo.png", Cloudinary.asMap("face_coordinates", coordinates, "faces", true));
      org.json.simple.JSONArray resultFaces = (org.json.simple.JSONArray) result.get("faces");
      assertEquals(2, resultFaces.size());
     
      Object[] resultCoordinates = ((org.json.simple.JSONArray) resultFaces.get(0)).toArray();
View Full Code Here

Examples of com.cloudinary.Coordinates.addRect()

      assertEquals((long)rect2.width, resultCoordinates[2]);
      assertEquals((long)rect2.height, resultCoordinates[3]);
     
      Coordinates differentCoordinates = new Coordinates();
      Rectangle rect3 = new Rectangle(122,32,111,152);
      differentCoordinates.addRect(rect3);
      cloudinary.uploader().explicit((String) result.get("public_id"), Cloudinary.asMap("face_coordinates", differentCoordinates, "faces", true, "type", "upload"));
      Map info = cloudinary.api().resource((String) result.get("public_id"), Cloudinary.asMap("faces", true));
     
      resultFaces = (org.json.simple.JSONArray) info.get("faces");
      assertEquals(1, resultFaces.size());
View Full Code Here

Examples of org.apache.harmony.awt.gl.MultiRectArea.addRect()

    public static MultiRectArea getObscuredRegion(long hwnd, Rectangle part) {
        int rects[] = getObscuredRegionImpl(hwnd, part.x, part.y,
                                            part.width, part.height);
        MultiRectArea mra = new MultiRectArea();
        for (int i=0; i<rects.length; i+=4) {
            mra.addRect(rects[i], rects[i+1], rects[i+2]-1, rects[i+3]-1);
        }
        return mra;
    }
    private static native int[] getObscuredRegionImpl(long hwnd,
            int x, int y, int w, int h);
View Full Code Here

Examples of org.apache.harmony.awt.gl.MultiRectArea.addRect()

    public static MultiRectArea getObscuredRegion(long hwnd, Rectangle part) {
        int rects[] = getObscuredRegionImpl(hwnd, part.x, part.y,
                                            part.width, part.height);
        MultiRectArea mra = new MultiRectArea();
        for (int i=0; i<rects.length; i+=4) {
            mra.addRect(rects[i], rects[i+1], rects[i+2]-1, rects[i+3]-1);
        }
        return mra;
    }
    private static native int[] getObscuredRegionImpl(long hwnd,
            int x, int y, int w, int h);
View Full Code Here

Examples of org.apache.harmony.awt.gl.MultiRectArea.addRect()

        mra = new MultiRectArea(1, 2, 4, 6);
        checkPathIteratorDouble(
                mra.getPathIterator(null),
                new double[]{1, 2, 4, 2, 4, 6, 1, 6});

        mra.addRect(4, 1, 6, 4);
        checkPathIteratorDouble(
                mra.getPathIterator(null),
                new double[]{
                        1, 2, 4, 2, 4, 6, 1, 6,
                        4, 1, 6, 1, 6, 4, 4, 4});
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.