Examples of endPos()


Examples of org.movsim.roadmappings.RoadMapping.endPos()

            // draw the road segment sink, if there is one
            final TrafficSink sink = roadSegment.sink();
            if (sink != null) {
                g.setColor(sinkColor);
                posTheta = roadMapping.endPos();
                g.fillOval((int) posTheta.x - radius / 2, (int) posTheta.y - radius / 2, radius, radius);
                String outflowString = "outflow: " + (int) (Units.INVS_TO_INVH * sink.measuredOutflow()) + " veh/h";
                g.drawString(outflowString, (int) (posTheta.x) + radius / 2, (int) (posTheta.y) + radius / 2);
            }
        }
View Full Code Here

Examples of org.movsim.roadmappings.RoadMappingBezier.endPos()

                // edge lines)
                final RoadMappingBezier bezier = (RoadMappingBezier) roadMapping;
                final GeneralPath path = new GeneralPath();
                posTheta = bezier.startPos(lateralOffset);
                path.moveTo(posTheta.x, posTheta.y);
                posTheta = bezier.endPos(lateralOffset);
                final double cx = bezier.controlX(lateralOffset);
                final double cy = bezier.controlY(lateralOffset);
                path.quadTo(cx, cy, posTheta.x, posTheta.y);
                g.draw(path);
                return;
View Full Code Here

Examples of org.movsim.roadmappings.RoadMappingBezier.endPos()

                final int radiusC = 6;
                if (drawBezierPoints) {
                    g.fillOval((int) posTheta.x - radius / 2, (int) posTheta.y - radius / 2, radius, radius);
                }
                path.moveTo(posTheta.x, posTheta.y);
                posTheta = bezier.endPos(lateralOffset);
                path.quadTo(bezier.controlX(lateralOffset), bezier.controlY(lateralOffset), posTheta.x, posTheta.y);
                if (drawBezierPoints) {
                    g.fillOval((int) posTheta.x - radius / 2, (int) posTheta.y - radius / 2, radius, radius);
                    g.fillOval((int) bezier.controlX(lateralOffset) - radiusC / 2, (int) bezier.controlY(lateralOffset)
                            - radiusC / 2, radiusC, radiusC);
View Full Code Here

Examples of org.movsim.roadmappings.RoadMappingBezier.endPos()

                    g.fillOval((int) bezier.controlX(lateralOffset) - radiusC / 2, (int) bezier.controlY(lateralOffset)
                            - radiusC / 2, radiusC, radiusC);
                }
                while (iterator.hasNext()) {
                    bezier = iterator.next();
                    posTheta = bezier.endPos(lateralOffset);
                    path.quadTo(bezier.controlX(lateralOffset), bezier.controlY(lateralOffset), posTheta.x, posTheta.y);
                    if (drawBezierPoints) {
                        g.fillOval((int) posTheta.x - radius / 2, (int) posTheta.y - radius / 2, radius, radius);
                        g.fillOval((int) bezier.controlX(lateralOffset) - radiusC / 2,
                                (int) bezier.controlY(lateralOffset) - radiusC / 2, radiusC, radiusC);
View Full Code Here

Examples of org.movsim.roadmappings.RoadMappingLine.endPos()

                    return;
                final GeneralPath path = new GeneralPath();
                RoadMappingLine line1 = iterator.next();
                posTheta = line1.startPos(lateralOffset);
                path.moveTo(posTheta.x, posTheta.y);
                posTheta = line1.endPos(lateralOffset);
                path.lineTo(posTheta.x, posTheta.y);
                while (iterator.hasNext()) {
                    line1 = iterator.next();
                    posTheta = line1.endPos(lateralOffset);
                    path.lineTo(posTheta.x, posTheta.y);
View Full Code Here

Examples of org.movsim.roadmappings.RoadMappingLine.endPos()

                path.moveTo(posTheta.x, posTheta.y);
                posTheta = line1.endPos(lateralOffset);
                path.lineTo(posTheta.x, posTheta.y);
                while (iterator.hasNext()) {
                    line1 = iterator.next();
                    posTheta = line1.endPos(lateralOffset);
                    path.lineTo(posTheta.x, posTheta.y);
                }
                g.draw(path);
                return;
            }
View Full Code Here

Examples of org.nlogo.api.CompilerException.endPos()

  public void setError(Exception compilerError, int offset) {
    super.setError(compilerError, offset);

    if (compilerError instanceof CompilerException) {
      CompilerException compilerEx = (CompilerException) compilerError;
      editorArea.select(compilerEx.startPos() - offset, compilerEx.endPos() - offset);
      editorArea.setSelection(false);
      editorArea.requestFocus();
    } else {
      editorArea.setSelection(true);
    }
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.