
Hmm, if you see a 1-pixel wide black line by drawing an image that is as large as the window, then that is indeed a bug in the Windows port that I need to check. But it is neither a feature nor a bug that a rectangle drawn from 0, 0 to 800, 600 covers the screen exactly. In contrast, a rectangle from (0, 0) to (0, 100) is even invisible. One way to view it is that the lower right pixels aren't included. One explanation that I like more is that Gosu's coordinates aren't the pixels, but the infinitely small points between them, so that 0, 0 is to the top left of the first physical pixel and 800, 600 would be to the low right of the last physical pixel. draw_line probably destroys the latter imagination. But I hope clears up why a quad to 799, 599 would leave a black line.
Anyway, this example program should cover the screen exactly, show one 10x10 px square and nothing more, does this not work on Windows? (Can't start VM right now, exam time until this weekend)
require 'rubygems'
require 'gosu'
include Gosu
class MyWindow < Window
def initialize
super 400, 300, false
end
def draw_rect x, y, w, h, color = 0x40ff0000
draw_quad x, y, color, x + w, y, color,
x, y + h, color, x + w, y + h, color
end
def draw
# square
draw_rect 5, 5, 10, 10
# nothing
draw_rect 5, 50, 100, 0
# covers window
draw_rect 0, 0, 400, 300
end
end
MyWindow.new.showHope that helps! :)