[wx-dev] #9715: wxGraphicsContext DrawRectangle off by one, performance and transparency

wxTrac noreply at wxsite.net
Fri Jul 11 02:57:32 PDT 2008


Ticket URL: <http://trac.wxwidgets.org/ticket/9715>

#9715: wxGraphicsContext DrawRectangle off by one, performance and transparency
-------------------------------+--------------------------------------------
 Reporter:  BuschnicK          |       Owner:         
     Type:  defect             |      Status:  new    
 Priority:  high               |   Milestone:         
Component:  wxMSW              |     Version:  2.8-svn
 Keywords:  wxGraphicsContext  |   Blockedby:         
    Patch:  0                  |    Blocking:         
-------------------------------+--------------------------------------------
 I have written a small test program to test wxGraphicsContext against
 wxDC. I'm using Visual Studio 2008 on WindowsXP and a recent SubVersion
 checkout of wxWidgets. The tests are all for DrawRectangle.

 Three main points:
 1) DrawRectangle for wxGraphicsContext has an off-by-one bug and draws the
 rectangle one pixel to wide in each direction.
 2) DrawRectangle(wxGraphicsContext) with transparency set exhibits
 unusuable behaviour in that several parts of the rectangle are drawn
 multiple times thus changing the color.
 3) DrawRectangle(wxGraphicsContext) is agonizingly slow compared to the
 normal rect drawing. This seems to be because it's always using the most
 general DrawPath graphics pipeline instead of a more optimized one for
 rectangles only.

 Test output and test program is attached. The only additional dependancy
 is the boost library.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/9715>


More information about the wx-dev mailing list