コード例 #1
0
 protected void drawAreaLegend(
     VPFSymbolAttributes attr, Graphics2D g2, int width, int height, int margin) {
   // Interior if any
   if (attr.isDrawInterior()) {
     g2.setPaint(this.getFillPaint(attr, width, height));
     g2.fillRect(margin, margin, width - margin * 2, height - margin * 2);
   }
   // Outline if any
   if (attr.isDrawOutline()) {
     g2.setStroke(this.getStroke(attr));
     g2.setPaint(attr.getOutlineMaterial().getDiffuse());
     g2.drawRect(margin, margin, width - margin * 2, height - margin * 2);
   }
 }
コード例 #2
0
 protected void drawLineLegend(
     VPFSymbolAttributes attr, Graphics2D g2, int width, int height, int margin) {
   g2.setStroke(this.getStroke(attr));
   g2.setPaint(attr.getOutlineMaterial().getDiffuse());
   g2.drawLine(margin, height / 2, width - margin, height / 2);
 }