0.0
No release in over 3 years
Low commit activity in last 3 years
Point, Size, and Region classes to hold pixel co-ordinates and rectangle sizes respectively. An updated window class to draw rectangles and lines in a single colour more easily. Updated font class to measure text and return co-ordinates to centre a piece of text in a rectangle size.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
~> 5.8
~> 10.0

Runtime

~> 0.14.5
 Project Readme

gosu_enhanced V0.4.5

Some added classes for using Gosu. Updated to use Gosu 0.14.x.

Point

Holds a set of (x, y) co-ordinates. Allows for offsetting and moving by another Point, a Size, or a pair of co-ordinates.

Size

Holds a (width, height) size. Allows for inflation / deflation with another Size or a pair of dimensions.

Region

Holds a position and size. Delegates movement and size change to its constituents.

Gosu::Window

Added #draw_rectangle which draws a simple rectangle specified with a Point and Size in one colour and #draw_simple_line which draws a line in a single colour.

N.B. There are serious warnings against using #draw_line for anything other than debugging purposes

Gosu::Font

Added #measure and #centred_in / #centered_in which measure a piece of text and centre it in a given Size respectively.

Installation

Add this line to your application's Gemfile:

gem 'gosu_enhanced'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install gosu_enhanced

Usage

Contributing

  1. Fork it ( https://github.com/JulianNicholls/gosu_enhanced/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

DISCLAIMER

I am not affiliated in any way to the authors of the Gosu Gem or libgosu.

Gosu and all documentation © 2001-2019 Julian Raschke, Jan Lücker, and other contributors. Gosu is released under the MIT license.