Package java.awt

Examples of java.awt.Graphics.fillPolygon()


    } else {
      depress = 0;
      int[] xp = new int[] { x, x + w - DEPTH, x + w, x + w, x + DEPTH, x };
      int[] yp = new int[] { y, y, y + DEPTH, y + h, y + h, y + h - DEPTH };
      g.setColor(color.darker());
      g.fillPolygon(xp, yp, xp.length);
      g.setColor(color);
      g.fillRect(x, y, w - DEPTH, h - DEPTH);
      g.setColor(Color.BLACK);
      g.drawRect(x, y, w - DEPTH, h - DEPTH);
      g.drawLine(x + w - DEPTH, y + h - DEPTH, x + w, y + h);
View Full Code Here


        x = (int) Math.round(zoom * x);
        y = (int) Math.round(zoom * y);
        int[] xs = { x - offs, x, x + offs, x };
        int[] ys = { y, y - offs, y, y + offs };
        gCopy.setColor(Color.WHITE);
        gCopy.fillPolygon(xs, ys, 4);
        gCopy.setColor(Color.BLACK);
        gCopy.drawPolygon(xs, ys, 4);
      }
    }
   
View Full Code Here

        if (tempGraphics != null) {
            if ((tempPolygon.getHoles() != null) && (tempPolygon.getHoles().length >0)){
                drawShapeWithHoles(inRecord, tempGraphics, inConverter, inShader);
            }
            else{
                tempGraphics.fillPolygon(myXs, myYs, tempXs.length);
            }
        }
       
        // call the graphics routine to draw the posative shape.'
        tempGraphics = inShader.getLineGraphics(inGraphics, inRecord.getAttributes(), inRecord.getAttributeNames());
View Full Code Here

      final int y6 = y2 + thickness;
      final int x7 = x3 + thickness;
      final int y7 = y3 - thickness;
      final int x8 = x4 - thickness;
      final int y8 = y4 - thickness;
      g.fillPolygon(new int[] { x1, x2, x6, x5 }, new int[] { y1, y2, y6, y5 }, 4);
      g.fillPolygon(new int[] { x7, x8, x4, x3 }, new int[] { y7, y8, y4, y3 }, 4);
      g.fillPolygon(new int[] { x1, x5, x7, x3 }, new int[] { y1, y5, y7, y3 }, 4);
      g.fillPolygon(new int[] { x2, x4, x8, x6 }, new int[] { y2, y4, y8, y6 }, 4);
    }
  }
View Full Code Here

      final int x7 = x3 + thickness;
      final int y7 = y3 - thickness;
      final int x8 = x4 - thickness;
      final int y8 = y4 - thickness;
      g.fillPolygon(new int[] { x1, x2, x6, x5 }, new int[] { y1, y2, y6, y5 }, 4);
      g.fillPolygon(new int[] { x7, x8, x4, x3 }, new int[] { y7, y8, y4, y3 }, 4);
      g.fillPolygon(new int[] { x1, x5, x7, x3 }, new int[] { y1, y5, y7, y3 }, 4);
      g.fillPolygon(new int[] { x2, x4, x8, x6 }, new int[] { y2, y4, y8, y6 }, 4);
    }
  }
View Full Code Here

      final int y7 = y3 - thickness;
      final int x8 = x4 - thickness;
      final int y8 = y4 - thickness;
      g.fillPolygon(new int[] { x1, x2, x6, x5 }, new int[] { y1, y2, y6, y5 }, 4);
      g.fillPolygon(new int[] { x7, x8, x4, x3 }, new int[] { y7, y8, y4, y3 }, 4);
      g.fillPolygon(new int[] { x1, x5, x7, x3 }, new int[] { y1, y5, y7, y3 }, 4);
      g.fillPolygon(new int[] { x2, x4, x8, x6 }, new int[] { y2, y4, y8, y6 }, 4);
    }
  }

  @Override
View Full Code Here

      final int x8 = x4 - thickness;
      final int y8 = y4 - thickness;
      g.fillPolygon(new int[] { x1, x2, x6, x5 }, new int[] { y1, y2, y6, y5 }, 4);
      g.fillPolygon(new int[] { x7, x8, x4, x3 }, new int[] { y7, y8, y4, y3 }, 4);
      g.fillPolygon(new int[] { x1, x5, x7, x3 }, new int[] { y1, y5, y7, y3 }, 4);
      g.fillPolygon(new int[] { x2, x4, x8, x6 }, new int[] { y2, y4, y8, y6 }, 4);
    }
  }

  @Override
  public void initDefaultParams(WFImage pImg) {
View Full Code Here

        g.setColor(MAGNIFYING_INTERIOR);
      }
      g.fillOval(cx - 5, cy - 5, 10, 10);
      g.setColor(Color.BLACK);
      g.drawOval(cx - 5, cy - 5, 10, 10);
      g.fillPolygon(xp, yp, xp.length);
    }
  }
 
  @Override
  public void mousePressed(InstanceState state, MouseEvent e) {
View Full Code Here

      toolIcon.paintIcon(c.getDestination(), g, x + 2, y + 2);
    } else {
      int[] xp = { x+ 5, x+ 5, x+ 9, x+12, x+14, x+11, x+16 };
      int[] yp = { y   , y+17, y+12, y+18, y+18, y+12, y+12 };
      g.setColor(java.awt.Color.black);
      g.fillPolygon(xp, yp, xp.length);
    }
  }

  @Override
  public Cursor getCursor() {
View Full Code Here

            gFill.setColor( this.getForeground() );
            cross(gFill);
            break;
        case Constants.PS_DIAMOND:
            gFill.setColor( this.getForeground() );
            gFill.fillPolygon(
                    new int[] {getWidth() / 2, getWidth(), getWidth() / 2, 0}, // X points
                    new int[] {0, getHeight() / 2, getHeight(), getHeight() / 2}, // Y points
                    4);
            break;
        case Constants.PS_PIXEL:
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.