Examples of fillPolygon()


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

Examples of java.awt.Graphics.fillPolygon()

        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

Examples of java.awt.Graphics.fillPolygon()

        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

Examples of java.awt.Graphics.fillPolygon()

      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

Examples of java.awt.Graphics.fillPolygon()

      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

Examples of java.awt.Graphics.fillPolygon()

      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

Examples of java.awt.Graphics.fillPolygon()

      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

Examples of java.awt.Graphics.fillPolygon()

        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

Examples of java.awt.Graphics2D.fillPolygon()

    int limit = width + (int) rectangle.getHeight();
    int increment = lineGap + lineWidth;
    int reverseOffset = (width - 4 * lineWidth / 3) % increment;
    for (int x = 0; x <= limit; x += increment)
    {
      graphics.fillPolygon(
          new int[]{x, x + lineWidth, 0, 0},
          new int[]{0, 0, x + lineWidth, x},
          4);

      graphics.fillPolygon(
View Full Code Here

Examples of java.awt.Graphics2D.fillPolygon()

      graphics.fillPolygon(
          new int[]{x, x + lineWidth, 0, 0},
          new int[]{0, 0, x + lineWidth, x},
          4);

      graphics.fillPolygon(
          new int[]{width - x - reverseOffset, width - x - lineWidth - reverseOffset, width, width},
          new int[]{0, 0, x + lineWidth, x},
          4);
    }
  }
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.