Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/dxruby_sdl/image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def box_fill(x1, y1, x2, y2, color)
end

def draw(x, y, image, x1 = 0, y1 = 0, width = image.width, height = image.height)
SDL.blitSurface(image, x1, y1, width, height, self, x, y)
SDL.blitSurface(image._surface, x1, y1, width, height, self._surface, x, y)
end

def draw_font(x, y, string, font, color = [255, 255, 255])
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/dxruby_sdl/image_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
end

describe SDL do
it { expect(SDL).to have_received(:blitSurface).with( dest_image, 0, 0, dest_image.width, dest_image.height, source_image, 0, 0).once }
it { expect(SDL).to have_received(:blitSurface).with( dest_image._surface, 0, 0, dest_image.width, dest_image.height, source_image._surface, 0, 0).once }
end
end

Expand All @@ -228,7 +228,7 @@
end

describe SDL do
it { expect(SDL).to have_received(:blitSurface).with(dest_image, 100, 200, 300, 400, source_image, 0, 0).once }
it { expect(SDL).to have_received(:blitSurface).with(dest_image._surface, 100, 200, 300, 400, source_image._surface, 0, 0).once }
end
end
end
Expand Down