gosu_enhanced 0.4.0 → 0.4.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c4a6e89af5f71916d83458e666a86556fccdc505
4
- data.tar.gz: 141b89e794b09c16dc91be1c07d8f2ad84dcdc58
3
+ metadata.gz: 86a01316020552b01f0150a2bb8959dbdbdeaa21
4
+ data.tar.gz: 275b3afa6758e7a4c5183ebb39ecfe66714dfab3
5
5
  SHA512:
6
- metadata.gz: bc4c445e86b7fb00f88f00887cd0a4f4c2c8fb31a508d166719194386ab0aae2b4fac2d908947fa6c17f71521152f25fd887e93ca073d74275a37abafac7abd2
7
- data.tar.gz: 2ab6d7d7ba444696c8a02ce2ba5c6b6fe275d1810f9344cfe53154704575e4f882e4086a1a29d12450750fb8d65f0829299ed0d852e57b5896e92a4c30fad91c
6
+ metadata.gz: 6f4abcb1c2bcaffac031df9bdd7fc1f167de6b0d96204d7657eb558c79221c8ca470d79eb3d542a7371e8f188a3cd45bf2877eac468cbc049fa42bbeba95e469
7
+ data.tar.gz: 5bff949502d28ffe791207ed7b363efdfe98b7d8c75f5a25646d7b4d8a641434bdbe3829d4483502c05f79ae86633d032ec0aa369a556edf505cc5d31cbc3b2c
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # gosu_enhanced V0.3.4
1
+ # gosu_enhanced V0.4.0
2
2
 
3
- Some added classes for using Gosu. Updated to use Gosu 0.9.x.
3
+ Some added classes for using Gosu. Updated to use Gosu 0.10.x.
4
4
 
5
5
  ## Point
6
6
 
@@ -20,12 +20,15 @@ constituents.
20
20
  ## Gosu::Window
21
21
 
22
22
  Added #draw_rectangle which draws a simple rectangle specified with a Point
23
- and Size in one colour.
23
+ and Size in one colour and #draw_simple_line which draws a line in a single
24
+ colour.
25
+
26
+ ### N.B. There are serious warnings against using #draw_line for anything other than debugging purposes
24
27
 
25
28
  ## Gosu::Font
26
29
 
27
- Added #measure and #centred_in which measure a piece of text and centre it in
28
- a given Size respectively.
30
+ Added #measure and #centred_in / #centered_in which measure a piece of text
31
+ and centre it in a given Size respectively.
29
32
 
30
33
  ## Installation
31
34
 
@@ -6,10 +6,10 @@ module Gosu
6
6
  class Window
7
7
  # Simplify drawing a rectangle in a single colour.
8
8
  #
9
- # +point+ [Point] Top left corner
10
- # +size+ [Size] Width and Height
11
- # +z_index+ [Fixnum] Z-order
12
- # +colour+ [Gosu::Color] Colour of rectangle
9
+ # * +point+ [Point] Top left corner
10
+ # * +size+ [Size] Width and Height
11
+ # * +z_index+ [Fixnum] Z-order
12
+ # * +colour+ [Gosu::Color] Colour of rectangle
13
13
 
14
14
  def draw_rectangle(point, size, z_index, colour)
15
15
  left = point.x
@@ -30,10 +30,10 @@ module Gosu
30
30
  # There are dire warnings in the Gosu documentation for draw_line() which
31
31
  # suggest that line drawing should only be done for debugging purposes.
32
32
  #
33
- # +p1+ [Point] Beginning point
34
- # +p2+ [Point] Endpoint
35
- # +z_index+ [Fixnum] Z-order
36
- # +colour+ [Gosu::Color] Colour of line
33
+ # * +p1+ [Point] Beginning point
34
+ # * +p2+ [Point] Endpoint
35
+ # * +z_index+ [Fixnum] Z-order
36
+ # * +colour+ [Gosu::Color] Colour of line
37
37
 
38
38
  def draw_simple_line(p1, p2, z_index, colour)
39
39
  draw_line(p1.x, p1.y, colour, p2.x, p2.y, colour, z_index)
@@ -47,9 +47,9 @@ module Gosu
47
47
 
48
48
  # Return the width and height of a given string
49
49
  #
50
- # +text+ String to measure
50
+ # * +text+ String to measure
51
51
  #
52
- # return [Size] The height and width of the string.
52
+ # return:: [Size] The height and width of the string.
53
53
 
54
54
  def measure(text)
55
55
  Size.new(text_width(text, 1), height)
@@ -58,11 +58,11 @@ module Gosu
58
58
  # Return the co-ordnates needed to place a given string in the centre of an
59
59
  # area, both vertically and horizontally.
60
60
  #
61
- # return [Point] The point to write the string, expressed as an offset
61
+ # return:: [Point] The point to write the string, expressed as an offset
62
62
  # from the top-left corner of the rectangle.
63
63
  #
64
- # +text+ [String] String to centre
65
- # +rect+ [Size] Rectangular area size
64
+ # * +text+ [String] String to centre
65
+ # * +rect+ [Size] Rectangular area size
66
66
 
67
67
  def centred_in(text, rect)
68
68
  size = measure(text)
@@ -75,8 +75,8 @@ module Gosu
75
75
 
76
76
  # Synonym for centred_in, allowing for centre to be spelled center.
77
77
  #
78
- # +text+ [String] String to centre
79
- # +rect+ [Size] Rectangular area size
78
+ # * +text+ [String] String to centre
79
+ # * +rect+ [Size] Rectangular area size
80
80
 
81
81
  alias_method :centered_in, :centred_in
82
82
  end
@@ -53,8 +53,8 @@ module GosuEnhanced
53
53
 
54
54
  # Utility function to construct a Point
55
55
  #
56
- # +x+ x co-ordinate
57
- # +y+ y co-ordinate
56
+ # * +x+ x co-ordinate
57
+ # * +y+ y co-ordinate
58
58
 
59
59
  def Point(x, y)
60
60
  Point.new(x, y)
@@ -10,8 +10,8 @@ module GosuEnhanced
10
10
  # The values are checked on inflation / deflation.
11
11
 
12
12
  # Initialise a size
13
- # +wid+ Width
14
- # +ht+ Height
13
+ # * +wid+ Width
14
+ # * +ht+ Height
15
15
 
16
16
  def initialize(wid, ht)
17
17
  @width = wid
@@ -103,8 +103,8 @@ module GosuEnhanced
103
103
 
104
104
  # Utility function to construct a size
105
105
  #
106
- # +x+ Width
107
- # +y+ Height
106
+ # * +x+ Width
107
+ # * +y+ Height
108
108
 
109
109
  def Size(x, y)
110
110
  Size.new(x, y)
@@ -1,5 +1,5 @@
1
1
  # Version of the gosu_enhanced gem.
2
2
  module GosuEnhanced
3
3
  # gosu_enhanced gem version
4
- VERSION = '0.4.0'
4
+ VERSION = '0.4.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gosu_enhanced
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Nicholls