title: How to convert wx.GetMousePosition co-ordinates to fit in a DC
body: <p>I'm creating a photo viewer which the user can use to tag images like in facebook. Once the image is clicked on to be tagged, I use wx.GetMousePosition to find the position where the mouse was clicked on the image.I then create a wx.MemoryDC of the image which the user has tagged so that I can draw the tags on the image using dc.DrawRectangle.</p>
  
  <p>Below is the code for drawing onto the image:
  I'm using wxPython by the way</p>
  
  <pre><code>        W=495 #Position of mouse (y)
          H=205 #Position of mouse (x)
          dc = wx.MemoryDC()
          dc.SelectObject(bitImg)#name of bitmap image
          dc.SetPen(wx.Pen('#FF0000'))
  
          #dc.SetBrush(wx.Brush('#aaffff'))
          dc.SetBrush(wx.TRANSPARENT_BRUSH)
          dc.DrawRectangle(W, H, 20, 20)# Drawing the rectangle using the W and H 
                                        # for the position
          dc.SelectObject(wx.NullBitmap)
  </code></pre>
  
  <p>The first two lines are the X and Y co-ordinates which I receive from wx.GetMousePosition. This is the position of a tag on one of the images. These points W and H however do not show on the image when I draw the rectangle as they are too big and don't show on the screen. If I set W and H both to 90 it will draw a small square on the image.</p>
  
  <p>So how can I convert these wx.GetMousePosition co-ordinates so that they fit in the 'dc'? or any other suggestions on getting the mouse co-ordinates?</p>