Package org.apache.openmeetings.utils.geom

Examples of org.apache.openmeetings.utils.geom.GeomPoint.normalize()


    double halfWidth = (arrowStyle.headWidth != -1) ? arrowStyle.headWidth/2 : arrowStyle.headLength/2;
   
    //Figure out the line start/end points
    GeomPoint startNorm = new GeomPoint();
    startNorm.setLocation(fullVect.getY(),-fullVect.getX());
    startNorm.normalize(arrowStyle.shaftThickness/2);
    GeomPoint start1 = start.add(startNorm);
    GeomPoint start2 = start.subtract(startNorm);
    GeomPoint end1 = end.add(startNorm);
    GeomPoint end2 = end.subtract(startNorm);
       
View Full Code Here


    //figure out where the arrow head starts
    GeomPoint headPnt = fullVect.clone();
    //log.debug("headPnt 1: "+headPnt.toString());
    //log.debug("headPnt.length 1: "+headPnt.length());
    //log.debug("arrowStyle.headLength 1: "+arrowStyle.headLength);
    headPnt.normalize(headPnt.length()-arrowStyle.headLength);
    //log.debug("headPnt 2: "+headPnt.toString());
    headPnt = headPnt.add(start);
    //log.debug("headPnt 3: "+headPnt.toString());
   
    //calculate the arrowhead corners
View Full Code Here

   
    //calculate the arrowhead corners
    GeomPoint headPntNorm = startNorm.clone();
    //log.debug("headPntNorm ^^: "+headPntNorm.toString());
    //log.debug("halfWidth ^^: "+halfWidth);
    headPntNorm.normalize(halfWidth);
    //log.debug("headPntNorm: "+headPntNorm.toString());
    GeomPoint edge1 = headPnt.add(headPntNorm);
    GeomPoint edge2 = headPnt.subtract(headPntNorm);
   
    //log.debug("edge1: "+edge1.toString());
View Full Code Here

        //log.debug("inter2: "+inter2.toString());
   
    //Figure out the control points
    GeomPoint edgeCenter = GeomPoint.interpolate(end,headPnt,(float) arrowStyle.edgeControlPosition);
    GeomPoint edgeNorm = startNorm.clone();
    edgeNorm.normalize(halfWidth*arrowStyle.edgeControlSize);
    //log.debug("halfWidth*arrowStyle.edgeControlSize: "+(halfWidth*arrowStyle.edgeControlSize));
    //log.debug("edgeNorm: "+edgeNorm.toString());
    GeomPoint edgeCntrl1 = edgeCenter.add(edgeNorm);
    GeomPoint edgeCntrl2 = edgeCenter.subtract(edgeNorm);
   
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.