Package org.eclipse.swt.graphics

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


    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

                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.