コード例 #1
0
ファイル: LineColor.java プロジェクト: tmyroadctfig/jcgm
 @Override
 public void paint(CGMDisplay d) {
   if (this.color != null) {
     d.setLineColor(this.color);
   } else {
     d.setLineColorIndex(this.colorIndex);
   }
 }
コード例 #2
0
ファイル: PolyMarker.java プロジェクト: tmyroadctfig/jcgm
  @Override
  public void paint(CGMDisplay d) {
    Graphics2D g2d = d.getGraphics2D();
    g2d.setColor(d.getMarkerColor());

    Type markerType = d.getMarkerType();
    double size = d.getMarkerSize();

    // save the current stroke and use a default one for markers
    Stroke savedStroke = g2d.getStroke();
    // TODO: what is the best stroke to use for markers?
    g2d.setStroke(new BasicStroke());

    if (MarkerType.Type.ASTERISK.equals(markerType)) {
      for (Point2D.Double point : this.points) {
        drawAsterisk(g2d, point, size);
      }
    } else if (MarkerType.Type.CIRCLE.equals(markerType)) {
      for (Point2D.Double point : this.points) {
        drawCircle(g2d, point, size, false);
      }
    } else if (MarkerType.Type.CROSS.equals(markerType)) {
      for (Point2D.Double point : this.points) {
        drawCross(g2d, point, size);
      }
    } else if (MarkerType.Type.DOT.equals(markerType)) {
      for (Point2D.Double point : this.points) {
        drawCircle(g2d, point, size, true);
      }
    } else if (MarkerType.Type.PLUS.equals(markerType)) {
      for (Point2D.Double point : this.points) {
        drawPlus(g2d, point, size);
      }
    }

    g2d.setStroke(savedStroke);
  }
コード例 #3
0
 public void paint(CGMDisplay d) {
   d.setFillColor(C);
 }
コード例 #4
0
 @Override
 public void paint(CGMDisplay d) {
   d.addLineType(this.lineType, this.dashElements, this.dashCycleRepeatLength);
 }
コード例 #5
0
ファイル: EdgeVisibility.java プロジェクト: kalej/JWis
 @Override
 public void paint(CGMDisplay d) {
   d.setEdge(this.isVisible);
 }
コード例 #6
0
ファイル: HatchIndex.java プロジェクト: kalej/JWis
 @Override
 public void paint(CGMDisplay d) {
   d.setHatchStyle(this.type);
 }