title: java get color of pixel for transparent, gradient overlay
body: <p>In my application I have an image (world map) as background picture. Over this background picture, there is a polygon with a <em>color gradient</em> and <em>transparent</em> filling effect. </p>
  
  <p>Here you find a code snippet of the overlay:</p>
  
  <pre><code>public void paint(Graphics g) {
  
        //draw a polygon with a gradient filling effect
        Graphics2D g2 = (Graphics2D)g;
        GradientPaint gp = new GradientPaint(x1, y1, color1, x2, y2, color2, false);
        g2.setPaint(gp);
        g2.fill(polygon);
  
  }
  </code></pre>
  
  <p>Does somebody know a method to get the color of one pixel <em>of the overlay</em>? I don't need the color, which can be seen on the screen including the background picture - just the color of the overlay.</p>
  
  <p>Best regards,</p>
  
  <p>Michael</p>