title: Paint event: How to draw image in separate library then draw with Graphics object
body: <p>I have an application that draws engineering diagrams on a portion of the screen. Right now the logic for drawing the diagram is in the Paint event. I would like to separate that out into another project. </p>
  
  <p>Is the best way to pass the dimensions of the bitmap I need (along with diagram info) and get an image returned and then use the Graphics context to paint the bitmap? </p>
  
  <p>If so, how do I get the dimensions of the draw area to pass to the drawing code that will generate the bitmap at the appropriate size?</p>
  
  <p>Thanks!</p>