title: Android - Extend a Bitmap to use as MapMarker
body: <p>I want to use downloaded images as markers on a MapView. I images are all squares but I would like the bottom to also extend to form a triangle marking the exact point.</p>
  
  <p>My approach was to create a canvas which is slightly larger than the image. Then, draw the bitmap on to the canvas and then somehow pick the color from the bottom of the bitmap and draw a triangular shape from the horizontal center of the image to the bottom of the canvas. Something like this...</p>
  
  <p><img src="https://i.stack.imgur.com/Pld9d.png" alt=""></p>
  
  <p>As you might guess I'm stuck with the last part. So far I have....</p>
  
  <pre><code>Bitmap canvasBitmap = Bitmap.createBitmap(markerBitmap.getWidth(), markerBitmap.getHeight()+10, Bitmap.Config.ARGB_8888);
  // The 10 pixels will be the so called "pin"
  Canvas canvas = new Canvas(canvasBitmap);
  canvas.drawBitmap(markerBitmap, 0.0f, 0.0f, null);
  // Can figure out how to draw the 10 px bottom using the color from markerBitmap
  </code></pre>
  
  <p>Help !!</p>