Package java.awt

Examples of java.awt.Graphics2D.fill()


      {
        context.setPaint(
          state.getFillColorSpace().getPaint(state.getFillColor())
          );
        pathObject.setWindingRule(fillMode.toAwt());
        context.fill(pathObject);
      }
      if(stroked)
      {
        context.setPaint(
          state.getStrokeColorSpace().getPaint(state.getStrokeColor())
View Full Code Here


      if(stroked)
      {
        context.setPaint(
          state.getStrokeColorSpace().getPaint(state.getStrokeColor())
          );
        context.fill(new Path2D.Double(getStroke(state).createStrokedShape(pathObject)));
      }
    }
  }
  // </public>
  // </interface>
View Full Code Here

    }
   
    Graphics2D g2D = (Graphics2D)g;
    g2D.setFont(this.defaultFont);
    g2D.setColor(Color.WHITE);
    g2D.fill(new Rectangle2D.Double(0, 0, pageFormat.getWidth(), pageFormat.getHeight()));
    int pageExists = NO_SUCH_PAGE;
    HomePrint homePrint = this.home.getPrint();
   
    // Prepare header and footer
    float imageableY = (float)pageFormat.getImageableY();
View Full Code Here

        } else {
          // Clear image
          g2D = (Graphics2D)updatedImage.getGraphics();
          Composite oldComposite = g2D.getComposite();
          g2D.setComposite(AlphaComposite.getInstance(AlphaComposite.CLEAR, 0));
          g2D.fill(new Rectangle2D.Double(0, 0, imageSize.width, imageSize.height));
          g2D.setComposite(oldComposite);
        }
        this.navigationPanel.paintAll(g2D);
        g2D.dispose();
        // Navigation panel image ready to be displayed
View Full Code Here

       
        // Draw a dot at origin
        g2D.translate(this.controller.getXOrigin(), this.controller.getYOrigin());
       
        float originRadius = 4 / scale;
        g2D.fill(new Ellipse2D.Float(-originRadius, -originRadius,
            originRadius * 2, originRadius * 2));
       
        // Draw a cross
        g2D.setStroke(new BasicStroke(1 / scale,
            BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL));       
View Full Code Here

            Camera camera = cameraPath.get(i);
            AffineTransform previousTransform = g2D.getTransform();
            g2D.translate(camera.getX(), camera.getY());
            g2D.rotate(camera.getYaw());
            // Paint camera location
            g2D.fill(ellipse);
            // Paint field of sight angle
            double sin = (float)Math.sin(camera.getFieldOfView() / 2);
            double cos = (float)Math.cos(camera.getFieldOfView() / 2);
            float xStartAngle = (float)(1.2f * cameraCircleRadius * sin);
            float yStartAngle = (float)(1.2f * cameraCircleRadius * cos);
 
View Full Code Here

        graphics.setColor( drawer.getNonStrokingColor() );
        drawer.getLinePath().setWindingRule( GeneralPath.WIND_EVEN_ODD );
        graphics.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF );
        //else
        //{
            graphics.fill( drawer.getLinePath() );
        //}
            drawer.getLinePath().reset();
    }
}
View Full Code Here

        graphics.setColor( drawer.getNonStrokingColor() );
        drawer.getLinePath().setWindingRule( GeneralPath.WIND_NON_ZERO );
        graphics.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF );
        //else
        //{
            graphics.fill( drawer.getLinePath() );
        //}
        drawer.getLinePath().reset();
    }
}
View Full Code Here

            g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                    RenderingHints.VALUE_ANTIALIAS_ON);
            g2d.translate(knobBounds.x, knobBounds.y);

            g2d.setColor(Color.CYAN);
            g2d.fill(thumbShape);

            g2d.setColor(Color.BLUE);
            g2d.draw(thumbShape);

            // Dispose graphics.
View Full Code Here

            g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                    RenderingHints.VALUE_ANTIALIAS_ON);
            g2d.translate(knobBounds.x, knobBounds.y);

            g2d.setColor(Color.PINK);
            g2d.fill(thumbShape);

            g2d.setColor(Color.RED);
            g2d.draw(thumbShape);

            // Dispose graphics.
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.