Package com.emitrom.lienzo.client.core.types

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


        return alpha;
    }

    public final void setOffset(double xy)
    {
        setOffset(new Point2D(xy, xy));
    }
View Full Code Here


        if (null != offset)
        {
            Point2DJSO pjso = offset.cast();

            return new Point2D(pjso);
        }
        return null;
    }
View Full Code Here

    {
        Point2DArray list = getPoints();

        if ((null != list) && (list.getLength() > 2))
        {
            Point2D point0 = list.getPoint(0);

            Point2D point1 = list.getPoint(1);

            Point2D point2 = list.getPoint(2);

            context.beginPath();

            context.moveTo(point0.getX(), point0.getY());

            context.lineTo(point1.getX(), point1.getY());

            context.lineTo(point2.getX(), point2.getY());

            context.closePath();

            return true;
        }
View Full Code Here

     *
     * @return Point2D
     */
    public Point2D getLocation()
    {
        return new Point2D(getX(), getY());
    }
View Full Code Here

     */
    public QuadraticCurve(double x, double y, double controlX, double controlY, double endX, double endY)
    {
        super(ShapeType.QUADRATIC_CURVE);

        setControlPoints(new Point2DArray(new Point2D(x, y), new Point2D(controlX, controlY), new Point2D(endX, endY)));
    }
View Full Code Here

        if ((points != null) && (points.getLength() == 3))
        {
            context.beginPath();

            Point2D p0 = points.getPoint(0);

            Point2D p1 = points.getPoint(1);

            Point2D p2 = points.getPoint(2);

            context.moveTo(p0.getX(), p0.getY());

            context.quadraticCurveTo(p1.getX(), p1.getY(), p2.getX(), p2.getY());

            return true;
        }
        return false;
    }
View Full Code Here

        PathPoint[] points = new PathPoint[leng];

        for (int i = 0; i < leng; i++)
        {
            Point2D point = array.getPoint(i);

            double x = point.getX();

            double y = point.getY();

            if (size > 0)
            {
                if (((points[size - 1].x == x) && (points[size - 1].y == y)))
                {
View Full Code Here

        m_globalToLocal = m_localToGlobal.getInverse();

        // Convert one point from global to local coordinates
        // We need it when calculating (dx,dy) in local coordinates
       
        m_globalToLocal.transform(new Point2D(0, 0), m_p1);

        // Initialize the DragConstraintsEnforcer
       
        m_dragConstraints = node.getDragConstraints();
       
View Full Code Here

       
        m_dx = m_eventX - m_dragStartX;
       
        m_dy = m_eventY - m_dragStartY;

        Point2D p2 = new Point2D(0, 0);
       
        m_globalToLocal.transform(new Point2D(m_dx, m_dy), p2);

        m_localAdjusted.setX(p2.getX() - m_p1.getX());
       
        m_localAdjusted.setY(p2.getY() - m_p1.getY());

        // Let the constraints adjust the location if necessary
       
        if (m_dragConstraints != null) m_dragConstraints.adjust(m_localAdjusted);
       
View Full Code Here

     *
     * @return Point2D
     */
    public Point2D getLocation()
    {
        return new Point2D(getX(), getY());
    }
View Full Code Here

TOP

Related Classes of com.emitrom.lienzo.client.core.types.Point2D

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.