Package java.awt

Examples of java.awt.Graphics2D.draw()


    g2.fill(eastborder);

    if (isBorderPainted())
    {
      g2.setPaint(Color.gray);
      g2.draw(printingArea);
    }

    g2.setPaint(Color.white);
    g2.fill(pageArea);
View Full Code Here


                BasicStroke.CAP_BUTT,
                BasicStroke.JOIN_MITER,
                1.0f,
                new float[] { 1.0f },
                0.0f));
            g2.draw(
              new Rectangle2D.Double(
                xpos + (xcell - icon.getIconWidth()) / 2 - 1,
                ypos + center - 2,
                icon.getIconWidth() + 2,
                iconHeight + 2));
View Full Code Here

  private void drawTextDecoration(final FontDecorationSpec decorationSpec)
  {
    final Graphics2D graphics = (Graphics2D) this.graphics.create();
    graphics.setColor(decorationSpec.getTextColor());
    graphics.setStroke(new BasicStroke((float) decorationSpec.getLineWidth()));
    graphics.draw(new Line2D.Double(decorationSpec.getStart(), decorationSpec.getVerticalPosition(),
        decorationSpec.getEnd(), decorationSpec.getVerticalPosition()));
    graphics.dispose();
  }

  protected void processParagraphChilds(final ParagraphRenderBox box)
View Full Code Here

                        .createGlyphVector(context, string);
                Shape outline = glyphVector.getOutline();
                g2.translate(x, y);
                g2.setStroke(getTextMatteStroke());
                g2.setColor(getTextMatteColor());
                g2.draw(outline);
                g2.translate(-x, -y);

                g2.setColor(getLineColor());
            }
        }
View Full Code Here

                || arrowHeadType == OMArrowHead.ARROWHEAD_DIRECTION_BOTH) {
            int rightWingX = (int) ((float) width * .75);
            poly = new Polygon(new int[] { width, rightWingX, rightWingX }, new int[] {
                    middleY, upTip, downTip }, 3);
            g.fill(poly);
            g.draw(poly); // Seems to help with rendering problem.
        }

        if (arrowHeadType == OMArrowHead.ARROWHEAD_DIRECTION_BACKWARD
                || arrowHeadType == OMArrowHead.ARROWHEAD_DIRECTION_BOTH) {
            int leftWingX = (int) ((float) width * .25);
 
View Full Code Here

                || arrowHeadType == OMArrowHead.ARROWHEAD_DIRECTION_BOTH) {
            int leftWingX = (int) ((float) width * .25);
            poly = new Polygon(new int[] { 0, leftWingX, leftWingX }, new int[] {
                    middleY, upTip, downTip }, 3);
            g.fill(poly);
            g.draw(poly); // Seems to help with rendering problem.
        }

        return new ImageIcon(bigImage);
    }
}
View Full Code Here

            big.setColor(new Color(0, true)); // clear
            big.fillRect(0, 0, 8, 8);
            big.setPaint(fillPaint);

            if (fillPatternString.equalsIgnoreCase(LPC_HORIZONTAL_PATTERN)) {
                big.draw(new Line2D.Double(0, 0, 7, 0));
                big.draw(new Line2D.Double(0, 4, 7, 4));
            } else if (fillPatternString.equalsIgnoreCase(LPC_VERTICAL_PATTERN)) {
                big.draw(new Line2D.Double(0, 0, 0, 7));
                big.draw(new Line2D.Double(4, 0, 4, 7));
            } else if (fillPatternString.equalsIgnoreCase(LPC_CROSS_PATTERN)) {
View Full Code Here

            big.fillRect(0, 0, 8, 8);
            big.setPaint(fillPaint);

            if (fillPatternString.equalsIgnoreCase(LPC_HORIZONTAL_PATTERN)) {
                big.draw(new Line2D.Double(0, 0, 7, 0));
                big.draw(new Line2D.Double(0, 4, 7, 4));
            } else if (fillPatternString.equalsIgnoreCase(LPC_VERTICAL_PATTERN)) {
                big.draw(new Line2D.Double(0, 0, 0, 7));
                big.draw(new Line2D.Double(4, 0, 4, 7));
            } else if (fillPatternString.equalsIgnoreCase(LPC_CROSS_PATTERN)) {
                big.draw(new Line2D.Double(0, 0, 7, 0));
View Full Code Here

            if (fillPatternString.equalsIgnoreCase(LPC_HORIZONTAL_PATTERN)) {
                big.draw(new Line2D.Double(0, 0, 7, 0));
                big.draw(new Line2D.Double(0, 4, 7, 4));
            } else if (fillPatternString.equalsIgnoreCase(LPC_VERTICAL_PATTERN)) {
                big.draw(new Line2D.Double(0, 0, 0, 7));
                big.draw(new Line2D.Double(4, 0, 4, 7));
            } else if (fillPatternString.equalsIgnoreCase(LPC_CROSS_PATTERN)) {
                big.draw(new Line2D.Double(0, 0, 7, 0));
                big.draw(new Line2D.Double(0, 4, 7, 4));
                big.draw(new Line2D.Double(0, 0, 0, 7));
View Full Code Here

            if (fillPatternString.equalsIgnoreCase(LPC_HORIZONTAL_PATTERN)) {
                big.draw(new Line2D.Double(0, 0, 7, 0));
                big.draw(new Line2D.Double(0, 4, 7, 4));
            } else if (fillPatternString.equalsIgnoreCase(LPC_VERTICAL_PATTERN)) {
                big.draw(new Line2D.Double(0, 0, 0, 7));
                big.draw(new Line2D.Double(4, 0, 4, 7));
            } else if (fillPatternString.equalsIgnoreCase(LPC_CROSS_PATTERN)) {
                big.draw(new Line2D.Double(0, 0, 7, 0));
                big.draw(new Line2D.Double(0, 4, 7, 4));
                big.draw(new Line2D.Double(0, 0, 0, 7));
                big.draw(new Line2D.Double(4, 0, 4, 7));
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.