search for: green_pen

Displaying 3 results from an estimated 3 matches for "green_pen".

2008 Jan 19
5
No joy from Wx::App.dispatch, Wx::App.yield...
...w(self, timer_id) evt_timer(timer_id) do animate(window, buffer) #No effect. #self.dispatch #No effect. #self.dispatch while self.pending #No effect. #self.yield end t.start(33) end def animate(window, buffer) green_pen = Wx::Pen.new(Wx::Colour.new(128, 255, 128), 3) black_pen = Wx::Pen.new(Wx::Colour.new(0, 0, 0), 0) buffer.draw do |surface| #Clear screen. surface.pen = black_pen surface.brush = Wx::BLACK_BRUSH surface.draw_rectangle(0, 0, 300, 300) #Draw lines....
2007 Dec 30
4
Drawing thread not getting enough time from scheduler?
Need some assistance with animation again... When I run the drawing code in a separate thread, it''s slow as heck. I think it may be because the drawing thread isn''t getting enough time from the thread scheduler. I was able to reproduce the problem in my little sample program simply by increasing the number of lines it draws per update. I''m lucky to get one frame
2006 Dec 03
0
[776] trunk/wxruby2: Added Bitmap#draw method, updated sample
...StaticBitmap.new( panel, -1, icon, Point.new(10, 10) ) </span><span class="cx"> </span><span class="cx"> bitmap = Bitmap.new( 100, 100 ) </span><del>- dc = MemoryDC.new - dc.select_object( bitmap ) - dc.set_pen(GREEN_PEN) - dc.clear() - dc.draw_ellipse(5, 5, 90, 90) - dc.draw_text("Bitmap", 30, 40) - dc.select_object( NULL_BITMAP ) </del><ins>+ bitmap.draw do | dc | + dc.clear() + dc.set_pen(GREEN_PEN) + dc.draw_ellipse(5, 5, 90, 90...