Displaying 1 result from an estimated 1 matches for "red_brush".
2007 Apr 29
0
[990] branches/wxruby2/wxwidgets_282/samples/bigdemo/wxCursor.rbw: Use paint block instead of ClientDC; load icon file safely
...ot;cx">
</span><span class="cx"> def on_draw_dot(evt)
</span><span class="cx"> # Draw a dot so the user can see where the hotspot is
</span><del>- dc = Wx::ClientDC.new(@win)
- dc.set_pen(Wx::RED_PEN)
- dc.set_brush(Wx::RED_BRUSH)
- pos = evt.get_position
- dc.draw_circle(pos.x, pos.y, 4)
</del><ins>+ @win.paint do | dc |
+ dc.set_pen(Wx::RED_PEN)
+ dc.set_brush(Wx::RED_BRUSH)
+ pos = evt.get_position
+ dc.draw_circle(pos.x, pos.y, 4)
+ end
</ins><span class="cx"...