Examples of fillArc()


Examples of java.awt.Graphics2D.fillArc()

        }

        // fill the rest
        g.setColor(fillRest.getColor());
        //FIXME: better method to avoid gaps on rounding-differences?
        g.fillArc(circ_x, circ_y, circ_w, circ_w, curr_angle, 360 - curr_angle);
        drawLegendLine(g, 5, height - 5 - 15 * i, fillRest.getPieceName()+" ("+fillRest.getFractionPercent()+" %)", fillRest.getColor());

        //draw border around the circle
        g.setColor(Color.decode("0x"+COL_BORDER));
        g.drawArc(circ_x, circ_y, circ_w, circ_w, 0, 360);
View Full Code Here

Examples of java.awt.Graphics2D.fillArc()

            for (int x = even; x < max + spacing; x += spacing)
            {
              g2.drawLine(x, (int) y, x, (int) y + (spacing / 2));
              g2.drawLine(x, (int) y + (spacing / 2), x - (spacing / 2), (int) (y + (spacing * 5d) / 6d));
              g2.drawLine(x, (int) y + (spacing / 2), x + (spacing / 2), (int) (y + (spacing * 5d) / 6d));
              g2.fillArc(x - 1, (int) y - 1, 2, 2, 0, 360);
            }

            even = Math.abs(even - (spacing / 2));
          }
        }
View Full Code Here

Examples of javafx.scene.canvas.GraphicsContext.fillArc()

            for (double angle = STOPS[i].getOffset() * 360; Double.compare(angle,STOPS[i + 1].getOffset() * 360) <= 0; angle += 0.1) {
                CTX.beginPath();
                CTX.moveTo(CENTER.getX() - RADIUS, CENTER.getY() - RADIUS);
                CTX.setFill(COLOR_LOOKUP.getColorAt(angle / 360));
                if (RADIUS > 0) {
                    CTX.fillArc(CENTER.getX() - RADIUS, CENTER.getY() - RADIUS, 2 * RADIUS, 2 * RADIUS, angle, ANGLE_STEP, ArcType.ROUND);
                } else {
                    CTX.moveTo(CENTER.getX() - RADIUS, CENTER.getY() - RADIUS);
                }
                CTX.fill();
            }
View Full Code Here

Examples of org.eclipse.swt.graphics.GC.fillArc()

    Image image = new Image(display,width,height);
    GC gcImage = new GC(image);
    gcImage.setForeground(Colors.blue);
    int angle = (percent * 360) / 100;
    gcImage.setBackground(Colors.blues[Colors.BLUES_MIDDARK]);
    gcImage.fillArc(0,0,width,height,90-angle,angle);
    gcImage.drawOval(0 , 0 , width-1, height-1);
    gcImage.dispose();
    return image;
  }
 
View Full Code Here

Examples of org.eclipse.swt.graphics.GC.fillArc()

    GC gc = new GC(im);
    Color bgColor = getBackground();
    gc.setBackground(bgColor);
    gc.fillRectangle(0, 0, 1000, 1000);
    gc.setBackground(parentComposite.getDisplay().getSystemColor(color));
    gc.fillArc(0, 0, 6, 6, 0, 360);
    gc.dispose();
    return im;
  }

  /**
 
View Full Code Here

Examples of org.eclipse.swt.graphics.GC.fillArc()

                int arcAngle = (int) ((double) slice.getValue() * 360 / total + 0.5d);
                if (slice == slices.get(slices.size() - 1))
                    arcAngle = 360 - startAngle;

                gc.setBackground(slice.getColor());
                gc.fillArc(centerX - radius, centerY - radius, diameter, diameter, startAngle, arcAngle);

                startAngle += arcAngle;
            }

            // circle
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.