rubydraw 0.3.1.3 → 0.3.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/rubydraw/surface.rb +2 -1
- metadata +1 -1
data/lib/rubydraw/surface.rb
CHANGED
@@ -14,7 +14,7 @@ module Rubydraw
|
|
14
14
|
end
|
15
15
|
|
16
16
|
# Create a new, blank surface with the given dimensions.
|
17
|
-
def initialize(dimensions)
|
17
|
+
def initialize(dimensions, color=Rubydraw::Color::Black)
|
18
18
|
@dimensions = dimensions
|
19
19
|
pixel_format = SDL.GetVideoInfo.vfmt
|
20
20
|
rmsk, gmsk, bmsk, amsk = 0xff0000, 0x00ff00, 0x0000ff, 0x000000
|
@@ -23,6 +23,7 @@ module Rubydraw
|
|
23
23
|
if @sdl_surface.pointer.null?
|
24
24
|
raise SDLError, "Failed to create Rubydraw surface: #{SDL.GetError}"
|
25
25
|
end
|
26
|
+
fill(color)
|
26
27
|
self
|
27
28
|
end
|
28
29
|
|