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

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


        }
        Transform t = getTransform();

        if (null != t)
        {
            Point2D a = new Point2D(x, y);

            Point2D b = new Point2D(x + width, y + height);

            Transform inv = t.getInverse();

            inv.transform(a, a);

            inv.transform(b, b);

            x = a.getX();

            y = a.getY();

            width = b.getX() - x;

            height = b.getY() - y;
        }
        viewLocalArea(x, y, width, height);
    }
View Full Code Here


     *
     * @return Point2D
     */
    public Point2D getLocation()
    {
        return new Point2D(getX(), getY());
    }
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

        }
        if ((m_maxScale > 0) && (newScale > m_maxScale))
        {
            scaleDelta = m_maxScale / currentScale;
        }
        Point2D p = new Point2D(event.getX(), event.getY());

        transform.getInverse().transform(p, p);

        transform = transform.copy();

        transform.scaleAboutPoint(scaleDelta, p.getX(), p.getY());

        setTransform(transform);

        redraw();
    }
View Full Code Here

    }

    @Override
    public PathPartArray M(double x, double y)
    {
        return M(new Point2D(x, y));
    }
View Full Code Here

        {
            final int leng = points.size();

            for (int i = 0; i < leng; i++)
            {
                Point2D point = points.get(i);

                if (null != point)
                {
                    list.push(point);
                }
View Full Code Here

        {
            final int leng = points.length;

            for (int i = 0; i < leng; i++)
            {
                Point2D point = points[i];

                if (null != point)
                {
                    list.push(point);
                }
View Full Code Here

        {
            final int leng = points.getLength();

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

                if (null != point)
                {
                    list.push(point);
                }
View Full Code Here

    }

    @Override
    public PathPartArray q(double cx, double cy, double ex, double ey)
    {
        return q(new Point2D(cx, cy), new Point2D(ex, ey));
    }
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.