com.cete.dynamicpdf.pageelements
Class Circle


Example: The following example will place two circles on the page with different size, shape and colors.

 import com.cete.dynamicpdf.*;
 import com.cete.dynamicpdf.pageelements.*;
 
 public class MyClass{
       public static void main(String args[]){
           
           // Create a PDF Document
           Document document = new Document();
           
           // Create a Page and add it to the document
           Page page = new Page();
           document.getPages().add(page);
 
           // Create two circles
           Circle circle1 = new Circle(100, 100, 50, 100, Grayscale.getBlack(), RgbColor.getOrangeRed(), 
           2, LineStyle.getSolid());
 
           Circle circle2 = new Circle(150, 75, 50, 50, Grayscale.getBlack(), RgbColor.getLime(), 
           2, LineStyle.getSolid());
 
           // Add the circles to the page
           page.getElements().add(circle1);    
           page.getElements().add(circle2);
 
           // Save the PDF
           document.draw("[PhysicalPath]/MyDocument.pdf");
       }
 }