Displaying 3 results from an estimated 3 matches for "cap_round".
2007 Dec 30
4
Drawing thread not getting enough time from scheduler?
...gle(0, 0, 300, 300)
end
#Draw lines.
30.times do |j|
x = i + j
buffer.draw do |surface|
surface.pen = Wx::Pen.new(
Wx::Colour.new(128, 255, 128),
3
)
surface.pen.cap = Wx::CAP_ROUND
surface.draw_line(x, 0, x+100, 100)
end
end
#Update screen.
update_window(window, buffer)
end
end
end
def update_window(window, buffer)
window.paint do |dc|
#Copy the buffer to the viewable window....
2008 Jan 19
5
No joy from Wx::App.dispatch, Wx::App.yield...
...n = 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.
surface.pen = green_pen
surface.pen.cap = Wx::CAP_ROUND
30000.times do |j|
x = @i + j
surface.draw_line(x, 0, x+100, 100)
end
end
#Update screen.
update_window(window, buffer)
@i += 1
@i = 0 if @i > 300
end
def update_window(window, buffer)
window.paint do |dc|
#...
2007 Dec 01
5
Tearing in my buffered animation test script...
...::Colour.new(0, 0, 0), 0)
surface.brush = Wx::BLACK_BRUSH
surface.draw_rectangle(0, 0, 300, 300)
end
#Draw line.
buffer.draw do |surface|
surface.pen = Wx::Pen.new(
Wx::Colour.new(128, 255, 128),
3
)
surface.pen.cap = Wx::CAP_ROUND
surface.draw_line(i, 0, i+100, 100)
end
#Update screen.
window.refresh
window.update
sleep 0.1
end
end
end
app = MyApp.new
app.main_loop