Package java.awt

Examples of java.awt.Graphics2D.drawPolyline()


        x = x2;
        y = y2;
        i++;
      }
      if(points > 1) {
        g2.drawPolyline(pointsx, pointsy, points);
      }
    }

    if(pointFill != null || pointOutline != null || pointIcon != null) {
      int oldx = 0;
View Full Code Here


        for (int i = 0, x = 0; i < data.size(); i++, x += step) {
            final int v = data.get(i);
            xs[i] = x;
            ys[i] = imageHeight - 3 - (int) ((v - limits.lower()) / d);
        }
        g.drawPolyline(xs, ys, data.size());

        if (hasMin) {
            final int i = data.indexOf(Collections.min(data));
            g.setColor(minColor);
            g.fillRect(xs[i] - step / 2, ys[i] - step / 2, step, step);
View Full Code Here

      // add terminal point
      xValues[xValues.length - 1] = xValues[xValues.length - 2];
      yValues[yValues.length - 1] = size.height - 1;

      // draw the peak shape
      g2.drawPolyline(xValues, yValues, xValues.length);

    }

  }
View Full Code Here

    g.fillRect(area.x, area.y, area.width, area.height);

    g.setColor(Color.BLACK);
//    Stroke thin = g.getStroke();
//    g.setStroke(new BasicStroke(1.5f));
    g.drawPolyline(leftPoints, yPoints, yPoints.length);
    g.drawPolyline(rightPoints, yPoints, yPoints.length);
//    g.setStroke(thin);

    g.drawLine(boxLeft, minPx, boxRight, minPx);
    g.drawLine(boxLeft, maxPx, boxRight, maxPx);
View Full Code Here

    g.setColor(Color.BLACK);
//    Stroke thin = g.getStroke();
//    g.setStroke(new BasicStroke(1.5f));
    g.drawPolyline(leftPoints, yPoints, yPoints.length);
    g.drawPolyline(rightPoints, yPoints, yPoints.length);
//    g.setStroke(thin);

    g.drawLine(boxLeft, minPx, boxRight, minPx);
    g.drawLine(boxLeft, maxPx, boxRight, maxPx);
View Full Code Here

        for (int i = 0, x = 0, y = 0; i < data.size(); i++, x += step) {
            int v = data.get(i);
            xs[i] = x;
            ys[i] = imageHeight - 3 - (int)((v - limits.lower()) / d);
        }
        g.drawPolyline(xs, ys, data.size());

        if (hasMin) {
            int i = data.indexOf(Collections.min(data));
            g.setColor(minColor);
            g.fillRect(xs[i] - step / 2, ys[i] - step / 2, step, step);
View Full Code Here

            y      = (int) (pntVector[ k ] * sy);
            polyY[ j++ ] = y;
            polyY[ j++ ] = y;
          }
       
          g2.drawPolyline( polyX, polyY, polySize << 1 );
       
        } else {
          for( int i = 0, k = ch; i < polySize; i++, k += numChannels ) {
            y      = (int) (pntVector[ k ] * sy);
            polyY[ i ]   = y;
View Full Code Here

          for( int i = 0, k = ch; i < polySize; i++, k += numChannels ) {
            y      = (int) (pntVector[ k ] * sy);
            polyY[ i ]   = y;
          }
       
          g2.drawPolyline( polyX, polyY, polySize );
        }
       
        g2.setTransform( atOrig );
        g2.setStroke( strkOrig );
      }
View Full Code Here

                }

                g.drawLine(prev.x, prev.y, cur.x, cur.y);
            }
        } else {
            g.drawPolyline(xPoints, yPoints, pointCount);
        }

        /*for(int i=0; i<xPoints.length; i++) {
        int x = xPoints[i];
        int y = yPoints[i];
View Full Code Here

      Color clr = new Color(0, 255, 0);

      gra.setStroke(new BasicStroke(4));
      gra.setColor(clr);
      gra.drawPolyline(xPoints, yPoints, ptListP.size());

      Calendar lCDateTime = Calendar.getInstance();
      String fileName = _maquina + "_" + lCDateTime.getTimeInMillis() + "." + mapType;

      // Save as PNG
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.