rubydraw 0.3.1.3 → 0.3.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/rubydraw/surface.rb +2 -1
  2. metadata +1 -1
@@ -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
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rubydraw
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.1.3
5
+ version: 0.3.1.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - J. Wostenberg