## Examples of Point2D

### Examples of Makelangelo.Point2D

 `390391392393394395396397398399` ```    numPoints=0;     for(y=0;y
View Full Code Here

### Examples of ae.java.awt.geom.Point2D

 `390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428` ```    {         boolean linear =             (paint.getColorSpace() == ColorSpaceType.LINEAR_RGB);         Color[] colors = paint.getColors();         int numStops = colors.length;         Point2D pt1 = paint.getStartPoint();         Point2D pt2 = paint.getEndPoint();         AffineTransform at = paint.getTransform();         at.preConcatenate(sg2d.transform);         if (!linear && numStops == 2 &&             paint.getCycleMethod() != CycleMethod.REPEAT)         {             // delegate to the optimized two-color gradient codepath             boolean isCyclic =                 (paint.getCycleMethod() != CycleMethod.NO_CYCLE);             setGradientPaint(rq, at,                              colors[0], colors[1],                              pt1, pt2,                              isCyclic, useMask);             return;         }         int cycleMethod = paint.getCycleMethod().ordinal();         float[] fractions = paint.getFractions();         int[] pixels = convertToIntArgbPrePixels(colors, linear);         // calculate plane equation constants         double x = pt1.getX();         double y = pt1.getY();         at.translate(x, y);         // now gradient point 1 is at the origin         x = pt2.getX() - x;         y = pt2.getY() - y;         double len = Math.sqrt(x * x + y * y);         at.rotate(x, y);         // now gradient point 2 is on the positive x-axis         at.scale(len, 1);         // now gradient point 1 is at (0.0, 0), point 2 is at (1.0, 0) ```
View Full Code Here

### Examples of aima.core.util.datastructure.Point2D

 `111112113114115116117` ```  /**    * Defines the position of a location as with respect to an orthogonal    * coordinate system.    */   public void setPosition(String loc, double x, double y) {     locationPositions.put(loc, new Point2D(x, y));   } ```
View Full Code Here

 `91011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768` ```import co.ideago.AdvancedPoint.TooFewPointsException; public class Test {   public static void main(String[] args) {     // Are two points equal?     Point2D p1 = new Point2D(2.0, 2.0);     Point2D p2 = new Point2D(2.0, 2.0);         System.out.println(p1 + " is equal to " + p2 + "? " + p1.equals(p2));         // Create an ArrayList of awt Points     ArrayList awtPoints = new ArrayList();     awtPoints.add(new java.awt.Point(4,4));     awtPoints.add(new java.awt.Point(2,4));     awtPoints.add(new java.awt.Point(3,5));     awtPoints.add(new java.awt.Point(5,6));     awtPoints.add(new java.awt.Point(5,5));     awtPoints.add(new java.awt.Point(4,5));         ArrayList points = null;     try {       points = PointUtil.pointConverter(awtPoints);             for (Point2D p : points) {         System.out.println(p.getX() + " " + p.getY());       }     } catch (InstantiationException e) {       // TODO Auto-generated catch block       e.printStackTrace();     } catch (IllegalAccessException e) {       // TODO Auto-generated catch block       e.printStackTrace();     }         System.out.println("----------- Testing Convex Hull ----------");         List convexHull = null;     try {       convexHull = ConvexHull.giftWrap2D(points);       for (Point2D p : convexHull) {         System.out.println(p.getX() + " " + p.getY());       }           } catch (TooFewPointsException e) {       // TODO Auto-generated catch block       e.printStackTrace();     }             System.out.println("--------- Test Outliers --------");     List outliers = new ArrayList();     outliers.add(new Point2D(-1.0, 1.0));     outliers.add(new Point2D(10.0, 1.0));     outliers.add(new Point2D(9.0, 4.0));     outliers.add(new Point2D(4.0, 5.0));         List result = ConvexHull.outliers(outliers, convexHull);     for (Point2D p : result) {       System.out.println(p);     } ```
View Full Code Here

### Examples of com.cedarsoftware.ncube.proximity.Point2D

 `476477478479480481482483484485486487488` ```            LatLon l = (LatLon)o;             builder.append(String.format("\"%f,%f\"", l.getLat(), l.getLon()));         }         else if (o instanceof Point2D)         {             Point2D l = (Point2D)o;             String twoDoubleFormat = "\"%f,%f\"";             builder.append(String.format(twoDoubleFormat, l.getX(), l.getY()));         }         else if (o instanceof Point3D)         {             Point3D p = (Point3D)o;             builder.append(String.format("\"%f,%f,%f\"", p.getX(), p.getY(), p.getZ())); ```
View Full Code Here

### Examples of com.eagerlogic.cubee.client.utils.Point2D

 `636637638639640641642643644645646647648649650651652` ```        int bx = (int) (0 - ((bw - mw) * tcx));         int by = (int) (0 - ((bh - mh) * tcy));         double rot = rotate.get();         if (rot != 0.0) {             rot = rot * 360;             Point2D tr = rotatePoint(bw, 0, rot);             Point2D br = rotatePoint(bw, bh, rot);             Point2D bl = rotatePoint(0, bh, rot);             int minX = Math.min(Math.min(0, tr.getX()), Math.min(br.getX(), bl.getX()));             int minY = Math.min(Math.min(0, tr.getY()), Math.min(br.getY(), bl.getY()));             int maxX = Math.max(Math.max(0, tr.getX()), Math.max(br.getX(), bl.getX()));             int maxY = Math.max(Math.max(0, tr.getY()), Math.max(br.getY(), bl.getY()));             bw = maxX - minX;             bh = maxY - minY;             bx = minX;             by = minY;         } ```
View Full Code Here

### Examples of com.emitrom.lienzo.client.core.types.Point2D

 `55565758596061` ```     */     public Line(double x1, double y1, double x2, double y2)     {         super(ShapeType.LINE);         setPoints(new Point2DArray(new Point2D(x1, y1), new Point2D(x2, y2)));     } ```
View Full Code Here

### Examples of com.esri.core.geometry.Point2D

 `878889909192939495969798` ```    }   }   void fillMultiPath(SimpleRasterizer rasterizer, Transformation2D trans, MultiPathImpl polygon, boolean isWinding) {     SegmentIteratorImpl segIter = polygon.querySegmentIterator();     Point2D p1 = new Point2D();     Point2D p2 = new Point2D();     while (segIter.nextPath()) {       while (segIter.hasNextSegment()) {         Segment seg = segIter.nextSegment();         if (seg.getType() != Geometry.Type.Line)           throw GeometryException.GeometryInternalError(); // TODO: ```
View Full Code Here

 `427428429430431432433434435436437438439440441442443444445446` ```        return dst;     }     public void transform(Point2D[] src, int srcOff, Point2D[] dst, int dstOff, int length) {         while (--length >= 0) {             Point2D srcPoint = src[srcOff++];             double x = srcPoint.getX();             double y = srcPoint.getY();             Point2D dstPoint = dst[dstOff];             if (dstPoint == null) {                 if (srcPoint instanceof Point2D.Double) {                     dstPoint = new Point2D.Double();                 } else {                     dstPoint = new Point2D.Float();                 }             }             dstPoint.setLocation(x * m00 + y * m01 + m02, x * m10 + y * m11 + m12);             dst[dstOff++] = dstPoint;         }     } ```
 `340341342343344345346347348349350351352353354355356357358359360` ```        if ((glyphIndex > vector.length) || (glyphIndex < 0)) {             // awt.43=glyphIndex is out of vector's limits             throw new IndexOutOfBoundsException(Messages.getString("awt.43")); //\$NON-NLS-1\$         }         int index = glyphIndex << 1;         Point2D pos = new Point2D.Float(visualPositions[index], visualPositions[index+1]);         // For last position we don't have to transform !!         if(glyphIndex==vector.length){             return pos;         }         AffineTransform at = getGlyphTransform(glyphIndex);         if ((at == null) || (at.isIdentity())){             return pos;         }         pos.setLocation(pos.getX() + at.getTranslateX(), pos.getY() + at.getTranslateY());         return pos;     } ```