Examples of fillArc()


Examples of java.awt.Graphics2D.fillArc()

    {
      g.setPaint(highColor);
    }

    final int counterClockWise = this.counterClockWise ? 1 : -1;
    g.fillArc(0, 0, radius, radius, -startAngle + 90, counterClockWise * endArc);

    g.dispose();
  }

  public Color getColor()
View Full Code Here

Examples of java.awt.Graphics2D.fillArc()

           
            if (m_lPeriod > 0L) { // pintamos la marca del periodo...
                // dibujo un arco con el periodo seleccionado...
                int iArc = (int) (m_lPeriod / 120000L);
                g2.setColor(new Color(255, 255, 255, 100));
                g2.fillArc(-1000, -1000, 2000, 2000, 90 - iArc, iArc);
                g2.setColor(Color.DARK_GRAY);
                g2.drawArc(-1000, -1000, 2000, 2000, 90 - iArc, iArc);
            } else {
                // la aguja de las horas
                g2.setColor(Color.WHITE);
View Full Code Here

Examples of java.awt.Graphics2D.fillArc()

                TimeWindowedCustomer timeWindowedCustomer = (TimeWindowedCustomer) customer;
                g.setColor(TangoColorFactory.ALUMINIUM_3);
                int circleX = x - (TIME_WINDOW_DIAMETER / 2);
                int circleY = y + 5;
                g.drawOval(circleX, circleY, TIME_WINDOW_DIAMETER, TIME_WINDOW_DIAMETER);
                g.fillArc(circleX, circleY, TIME_WINDOW_DIAMETER, TIME_WINDOW_DIAMETER,
                        90 - calculateTimeWindowDegree(maximumTimeWindowTime, timeWindowedCustomer.getReadyTime()),
                        calculateTimeWindowDegree(maximumTimeWindowTime, timeWindowedCustomer.getReadyTime())
                                - calculateTimeWindowDegree(maximumTimeWindowTime, timeWindowedCustomer.getDueTime()));
                if (timeWindowedCustomer.getArrivalTime() != null) {
                    if (timeWindowedCustomer.isArrivalAfterDueTime()) {
View Full Code Here

Examples of java.awt.Graphics2D.fillArc()

      g2.drawString(location.toString(), x(11 * i) + 10, y(0) + 20);
      if (agent != null) {
        Action action = lastActions.get(agent);
        g2.setColor(Color.RED);
        if (action == null || !((DynamicAction) action).getAttribute("name").equals("Suck"))
          g2.fillArc(x(11 * i + 2), y(2), scale(6), scale(6),
              200, 320);
        else
          g2.fillOval(x(11 * i + 2), y(2), scale(6), scale(6));
      }
    }
View Full Code Here

Examples of java.awt.Graphics2D.fillArc()

                Rectangle2D r1 = g.getFontMetrics().getStringBounds(getSlot().getShortName(), g);
                g.drawString(getSlot().getShortName(), (int) (this.getBounds().width - r1.getWidth()) / 2, (int) (this.getBounds().height + r1.getHeight()) / 2);
            } else {

                if (slot instanceof OutputSlot) {
                    g.fillArc(w / 4, -h / 4 - 1, w / 2, h / 2, 180, 180);
                } else {
                    g.fillArc(w / 4, 3 * h / 4, w / 2, h / 2, 0, 180);
                }
            }
        }
View Full Code Here

Examples of java.awt.Graphics2D.fillArc()

            } else {

                if (slot instanceof OutputSlot) {
                    g.fillArc(w / 4, -h / 4 - 1, w / 2, h / 2, 180, 180);
                } else {
                    g.fillArc(w / 4, 3 * h / 4, w / 2, h / 2, 0, 180);
                }
            }
        }
    }

View Full Code Here

Examples of java.awt.Graphics2D.fillArc()

            for (int h = 0; h < 360; h++) {
                float hue = h / 360f;
                float sat = s / (float) SIZE;
                Color c = Color.getHSBColor(hue, sat, 1F);
                gr.setColor(c);
                gr.fillArc(SIZE / 2 - arcw / 2, SIZE / 2 - arch / 2, arcw, arch, h, 1);
            }
        }
        gr.dispose();

        // simple palette checks
View Full Code Here

Examples of java.awt.Graphics2D.fillArc()

                float hue = h / 360f;
                float sat = s / (float) SIZE;
                Color c = Color.getHSBColor(hue, sat, 1F);
                c = new Color(c.getRed(), c.getGreen(), c.getBlue(), s * 255 / SIZE);
                gr.setColor(c);
                gr.fillArc(SIZE / 2 - arcw / 2, SIZE / 2 - arch / 2, arcw, arch, h, 1);
            }
        }
        gr.dispose();

        // simple palette checks
View Full Code Here

Examples of java.awt.Graphics2D.fillArc()

        pointerLength = Math.max(pointerLength, radius);
        imageGraphic = image.createGraphics();
        imageGraphic.setColor(circleColor);
        imageGraphic.fillOval(circleCenterX - radius, circleCenterY - radius, radius * 2, radius * 2);
        imageGraphic.setColor(wedgeColor);
        imageGraphic.fillArc(circleCenterX - radius,
        circleCenterY - radius,
        radius * 2,
        radius * 2,
        calculateWedgeAngle(pointerDirection, wedgeWidth),
        wedgeWidth * 2);
 
View Full Code Here

Examples of java.awt.Graphics2D.fillArc()

        int i;
        for (i=0; i<pieces.length; i++) {
            // draw the piece
            g.setColor(pieces[i].getColor());
            g.fillArc(circ_x, circ_y, circ_w, circ_w, curr_angle, pieces[i].getAngle());
            curr_angle += pieces[i].getAngle();

            // draw it's legend line
            drawLegendLine(g, 5, height - 5 - 15 * i, pieces[i].getPieceName()+" ("+pieces[i].getFractionPercent()+" %)", pieces[i].getColor());
        }
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.