Package java.awt

Examples of java.awt.Graphics2D.drawLine()


        g.setBackground(OMColor.clear);
        g.setPaint(OMColor.clear);
        g.fillRect(0, 0, width, height);
        g.setPaint(Color.black);
        g.setStroke(stroke);
        g.drawLine(0, middleY, width, middleY);

        int upTip = (int) ((float) height * .25);
        int downTip = (int) ((float) height * .75);
        Polygon poly = null;
        if (arrowHeadType == OMArrowHead.ARROWHEAD_DIRECTION_FORWARD
View Full Code Here


        g.setPaint(OMColor.clear);
        g.fillRect(0, 0, width, height);
        g.setPaint(Color.black);
        g.setStroke(stroke);
        if (horizontalOrientation) {
            g.drawLine(0, height / 2, width, height / 2);
        } else {
            g.drawLine(width / 2, 0, width / 2, height);
        }

        return new ImageIcon(bigImage);
View Full Code Here

        g.setPaint(Color.black);
        g.setStroke(stroke);
        if (horizontalOrientation) {
            g.drawLine(0, height / 2, width, height / 2);
        } else {
            g.drawLine(width / 2, 0, width / 2, height);
        }

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

        g.setPaint(OMColor.clear);
        g.fillRect(0, 0, width, height);
        g.setPaint(Color.black);
        g.setStroke(stroke);
        if (horizontalOrientation) {
            g.drawLine(0, height / 2, width, height / 2);
        } else {
            g.drawLine(width / 2, 0, width / 2, height);
        }

        return new ImageIcon(bigImage);
View Full Code Here

        g.setPaint(Color.black);
        g.setStroke(stroke);
        if (horizontalOrientation) {
            g.drawLine(0, height / 2, width, height / 2);
        } else {
            g.drawLine(width / 2, 0, width / 2, height);
        }

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

      g.fillRect(0, 0, width, height);
      if (matting != null) {
        BasicStroke mattedStroke=new BasicStroke(((BasicStroke) stroke).getLineWidth() + 2f);
        g.setStroke(mattedStroke);
        g.setPaint(matting);
        g.drawLine(0,height/2,width,height/2);
      }
        g.setPaint(color);
        g.setStroke(stroke);
        if (horizontalOrientation) {
            g.drawLine(0, height / 2, width, height / 2);
View Full Code Here

        g.drawLine(0,height/2,width,height/2);
      }
        g.setPaint(color);
        g.setStroke(stroke);
        if (horizontalOrientation) {
            g.drawLine(0, height / 2, width, height / 2);
        } else {
            g.drawLine(width / 2, 0, width / 2, height);
        }
        return new ImageIcon(bigImage);
    }
View Full Code Here

        g.setPaint(color);
        g.setStroke(stroke);
        if (horizontalOrientation) {
            g.drawLine(0, height / 2, width, height / 2);
        } else {
            g.drawLine(width / 2, 0, width / 2, height);
        }
        return new ImageIcon(bigImage);
    }

    public void setStrokeWidth(float w) {
View Full Code Here

        if (attributes.matted) {
            BasicStroke mattedStroke = new BasicStroke(((BasicStroke) attributes.stroke).getLineWidth() + 2f);
            g.setStroke(mattedStroke);
            g.setPaint(attributes.mattingPaint);
            g.drawLine(0, height / 2, width, height / 2);
        }

        g.setPaint(attributes.linePaint);
        g.setStroke(attributes.stroke);
        if (horizontalOrientation) {
View Full Code Here

        }

        g.setPaint(attributes.linePaint);
        g.setStroke(attributes.stroke);
        if (horizontalOrientation) {
            g.drawLine(0 + 3, height / 2, width - 3, height / 2);
        } else {
            g.drawLine(width / 2, 0 + 3, width / 2, height - 3);
        }

        return new ImageIcon(bigImage);
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.