rubydraw 0.3.1.6 → 0.3.1.8

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/text.rb +4 -4
  2. metadata +2 -2
@@ -3,11 +3,11 @@ module Rubydraw
3
3
  # with the text to display. They can be drawn at a position on the
4
4
  # screen.
5
5
  class Text < Surface
6
- attr_reader(:contents, :font, :color, :size)
6
+ attr_reader(:contents, :font, :color, :font_size)
7
7
 
8
8
  # Create a new drawable Text object with the given font and contents.
9
- def initialize(contents, color, font_name="Times New Roman", size = 25)
10
- @font, @contents, @size, @color = font_name, contents, size, color
9
+ def initialize(contents, color, font_name="Times New Roman", font_size = 25)
10
+ @font, @contents, @font_size, @color = font_name, contents, font_size, color
11
11
  if File.exist?(font_name)
12
12
  font_path = font_name
13
13
  else
@@ -18,7 +18,7 @@ module Rubydraw
18
18
  unless File.exists?(font_path)
19
19
  raise "Font file '#{font_name}' does not exist; attemped to load from '#{font_path}'"
20
20
  end
21
- sdl_text = SDL::TTF.OpenFont(font_path, size)
21
+ sdl_text = SDL::TTF.OpenFont(font_path, font_size)
22
22
  raise(SDLError, "Failed to initialize font: #{SDL.GetError}") if sdl_text.pointer.null?
23
23
 
24
24
  sdl_color = @color.to_sdl
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.6
5
+ version: 0.3.1.8
6
6
  platform: ruby
7
7
  authors:
8
8
  - J. Wostenberg
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-12-20 00:00:00 -07:00
13
+ date: 2011-12-23 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency