Package com.jgraph.gaeawt.java.awt

Examples of com.jgraph.gaeawt.java.awt.BasicStroke


    @Override
    public void draw(Graphics2D g2, float x, float y) {
        AffineTransform at = AffineTransform.getTranslateInstance(x, y);
        if (fStroke == STROKE){
            Stroke oldStroke = g2.getStroke();
            g2.setStroke(new BasicStroke());
            g2.draw(at.createTransformedShape(fShape));
            g2.setStroke(oldStroke);
        } else {
            g2.fill(at.createTransformedShape(fShape));
        }
View Full Code Here


         */
        private void getStrokes(BasicMetrics metrics) {
            if (!haveStrokes) {
                if (strikeThrough) {
                    strikeThroughStroke =
                            new BasicStroke(
                                    metrics.strikethroughThickness,
                                    BasicStroke.CAP_BUTT,
                                    BasicStroke.JOIN_MITER,
                                    10
                            );
                }

                if (ulOn) {
                    ulStroke =
                            new BasicStroke(
                                    metrics.underlineThickness,
                                    BasicStroke.CAP_BUTT,
                                    BasicStroke.JOIN_MITER,
                                    10
                            );
View Full Code Here

  {
    if (stroke instanceof BasicStroke
        && ((BasicStroke) stroke).getLineWidth() <= 1)
    {
      //TODO: Think about drawing the shape in one fillMultiRectArea call
      BasicStroke bstroke = (BasicStroke) stroke;
      JavaLineRasterizer.LineDasher ld = (bstroke.getDashArray() == null) ? null
          : new JavaLineRasterizer.LineDasher(bstroke.getDashArray(),
              bstroke.getDashPhase());
      PathIterator pi = s.getPathIterator(transform, 0.5);
      float[] points = new float[6];
      int x1 = Integer.MIN_VALUE;
      int y1 = Integer.MIN_VALUE;
      int cx1 = Integer.MIN_VALUE;
View Full Code Here

    }

    if (stroke instanceof BasicStroke
        && ((BasicStroke) stroke).getLineWidth() <= 1)
    {
      BasicStroke bstroke = (BasicStroke) stroke;
      Point p1 = new Point(x1, y1);
      Point p2 = new Point(x2, y2);
      transform.transform(p1, p1);
      transform.transform(p2, p2);
      JavaLineRasterizer.LineDasher ld = (bstroke.getDashArray() == null) ? null
          : new JavaLineRasterizer.LineDasher(bstroke.getDashArray(),
              bstroke.getDashPhase());
      MultiRectArea mra = JavaLineRasterizer.rasterize(p1.x, p1.y, p2.x,
          p2.y, null, ld, false);
      fillMultiRectArea(mra);
      return;
    }
View Full Code Here

TOP

Related Classes of com.jgraph.gaeawt.java.awt.BasicStroke

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.