texplay 0.3.3pre2-i386-mswin32 → 0.3.5-i386-mswin32
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/CHANGELOG +6 -0
 - data/lib/texplay/alone.rb +1 -1
 - data/lib/texplay/live.rb +84 -0
 - data/lib/texplay/version.rb +1 -1
 - metadata +34 -66
 
    
        data/CHANGELOG
    CHANGED
    
    | 
         @@ -1,3 +1,9 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            *22/2/11 version 0.3.5
         
     | 
| 
      
 2 
     | 
    
         
            +
            * added :source, :dest, :source_with_alpha, :dest_with_alpha options to
         
     | 
| 
      
 3 
     | 
    
         
            +
            	:alpha_blend
         
     | 
| 
      
 4 
     | 
    
         
            +
            * added live.rb (repl image editor)
         
     | 
| 
      
 5 
     | 
    
         
            +
            * added alone.rb (run texplay image manip independent from gosu)
         
     | 
| 
      
 6 
     | 
    
         
            +
            	
         
     | 
| 
       1 
7 
     | 
    
         
             
            *1/11/10 version 0.3.0
         
     | 
| 
       2 
8 
     | 
    
         
             
            * pushed gems
         
     | 
| 
       3 
9 
     | 
    
         
             
            * tested
         
     | 
    
        data/lib/texplay/alone.rb
    CHANGED
    
    
    
        data/lib/texplay/live.rb
    ADDED
    
    | 
         @@ -0,0 +1,84 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            direc = File.dirname(__FILE__)
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            require "#{direc}/../texplay"
         
     | 
| 
      
 4 
     | 
    
         
            +
            require 'pry'
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            WIDTH = 640
         
     | 
| 
      
 7 
     | 
    
         
            +
            HEIGHT = 480
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            class Gosu::Image
         
     | 
| 
      
 10 
     | 
    
         
            +
              attr_accessor :x, :y
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
              alias_method :orig_init, :initialize
         
     | 
| 
      
 13 
     | 
    
         
            +
              def initialize(*args)
         
     | 
| 
      
 14 
     | 
    
         
            +
                @x = WIDTH / 2
         
     | 
| 
      
 15 
     | 
    
         
            +
                @y = HEIGHT / 2
         
     | 
| 
      
 16 
     | 
    
         
            +
                orig_init(*args)
         
     | 
| 
      
 17 
     | 
    
         
            +
              end
         
     | 
| 
      
 18 
     | 
    
         
            +
            end
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
            class WinClass < Gosu::Window
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
              class View
         
     | 
| 
      
 23 
     | 
    
         
            +
                attr_accessor :zoom, :rotate
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
                def initialize
         
     | 
| 
      
 26 
     | 
    
         
            +
                  @zoom = 1
         
     | 
| 
      
 27 
     | 
    
         
            +
                  @rotate = 0
         
     | 
| 
      
 28 
     | 
    
         
            +
                end
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
                def reset
         
     | 
| 
      
 31 
     | 
    
         
            +
                  @zoom = 1
         
     | 
| 
      
 32 
     | 
    
         
            +
                  @rotate = 0
         
     | 
| 
      
 33 
     | 
    
         
            +
                end
         
     | 
| 
      
 34 
     | 
    
         
            +
              end
         
     | 
| 
      
 35 
     | 
    
         
            +
              
         
     | 
| 
      
 36 
     | 
    
         
            +
              attr_reader :images, :view
         
     | 
| 
      
 37 
     | 
    
         
            +
              
         
     | 
| 
      
 38 
     | 
    
         
            +
              def initialize
         
     | 
| 
      
 39 
     | 
    
         
            +
                super(WIDTH, HEIGHT, false)
         
     | 
| 
      
 40 
     | 
    
         
            +
                Gosu.enable_undocumented_retrofication
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
                @images = []
         
     | 
| 
      
 43 
     | 
    
         
            +
                @view = View.new
         
     | 
| 
      
 44 
     | 
    
         
            +
                @pry_instance = Pry.new :prompt => [Proc.new { "(live)> " }, Proc.new { "(live)* " }]
         
     | 
| 
      
 45 
     | 
    
         
            +
                
         
     | 
| 
      
 46 
     | 
    
         
            +
                @img = TexPlay.create_image(self, 200, 200)
         
     | 
| 
      
 47 
     | 
    
         
            +
                @img.rect 0, 0, @img.width - 1, @img.height - 1
         
     | 
| 
      
 48 
     | 
    
         
            +
                
         
     | 
| 
      
 49 
     | 
    
         
            +
                images << @img
         
     | 
| 
      
 50 
     | 
    
         
            +
                @binding = binding
         
     | 
| 
      
 51 
     | 
    
         
            +
              end
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
              def create_image(width, height, options={})
         
     | 
| 
      
 54 
     | 
    
         
            +
                TexPlay.create_image(self, width, height, options)
         
     | 
| 
      
 55 
     | 
    
         
            +
              end
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
              def load_image(file)
         
     | 
| 
      
 58 
     | 
    
         
            +
                Gosu::Image.new(self, file)
         
     | 
| 
      
 59 
     | 
    
         
            +
              end
         
     | 
| 
      
 60 
     | 
    
         
            +
             
     | 
| 
      
 61 
     | 
    
         
            +
              def show_image(image)
         
     | 
| 
      
 62 
     | 
    
         
            +
                images << image
         
     | 
| 
      
 63 
     | 
    
         
            +
              end
         
     | 
| 
      
 64 
     | 
    
         
            +
             
     | 
| 
      
 65 
     | 
    
         
            +
              def hide_image(image)
         
     | 
| 
      
 66 
     | 
    
         
            +
                images.delete(image)
         
     | 
| 
      
 67 
     | 
    
         
            +
              end
         
     | 
| 
      
 68 
     | 
    
         
            +
              
         
     | 
| 
      
 69 
     | 
    
         
            +
              def draw
         
     | 
| 
      
 70 
     | 
    
         
            +
                images.uniq!
         
     | 
| 
      
 71 
     | 
    
         
            +
                images.each do |v|
         
     | 
| 
      
 72 
     | 
    
         
            +
                  v.draw_rot(v.x, v.y, 1, view.rotate, 0.5, 0.5, view.zoom, view.zoom)
         
     | 
| 
      
 73 
     | 
    
         
            +
                end
         
     | 
| 
      
 74 
     | 
    
         
            +
              end
         
     | 
| 
      
 75 
     | 
    
         
            +
             
     | 
| 
      
 76 
     | 
    
         
            +
              def update
         
     | 
| 
      
 77 
     | 
    
         
            +
                @pry_instance.rep(@binding)
         
     | 
| 
      
 78 
     | 
    
         
            +
              end
         
     | 
| 
      
 79 
     | 
    
         
            +
            end
         
     | 
| 
      
 80 
     | 
    
         
            +
             
     | 
| 
      
 81 
     | 
    
         
            +
            w = WinClass.new
         
     | 
| 
      
 82 
     | 
    
         
            +
             
     | 
| 
      
 83 
     | 
    
         
            +
            w.show
         
     | 
| 
      
 84 
     | 
    
         
            +
             
     | 
    
        data/lib/texplay/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,71 +1,51 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            --- !ruby/object:Gem::Specification 
     | 
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: texplay
         
     | 
| 
       3 
     | 
    
         
            -
            version: !ruby/object:Gem::Version 
     | 
| 
       4 
     | 
    
         
            -
               
     | 
| 
       5 
     | 
    
         
            -
              prerelease:  
     | 
| 
       6 
     | 
    
         
            -
              segments: 
         
     | 
| 
       7 
     | 
    
         
            -
              - 0
         
     | 
| 
       8 
     | 
    
         
            -
              - 3
         
     | 
| 
       9 
     | 
    
         
            -
              - 3
         
     | 
| 
       10 
     | 
    
         
            -
              - pre
         
     | 
| 
       11 
     | 
    
         
            -
              - 2
         
     | 
| 
       12 
     | 
    
         
            -
              version: 0.3.3pre2
         
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version
         
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.3.5
         
     | 
| 
      
 5 
     | 
    
         
            +
              prerelease: 
         
     | 
| 
       13 
6 
     | 
    
         
             
            platform: i386-mswin32
         
     | 
| 
       14 
     | 
    
         
            -
            authors: 
     | 
| 
      
 7 
     | 
    
         
            +
            authors:
         
     | 
| 
       15 
8 
     | 
    
         
             
            - John Mair (banisterfiend)
         
     | 
| 
       16 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       17 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       18 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
            date: 2011-02-22 00:00:00 +13:00
         
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2011-02-22 00:00:00.000000000 +13:00
         
     | 
| 
       21 
13 
     | 
    
         
             
            default_executable: 
         
     | 
| 
       22 
     | 
    
         
            -
            dependencies: 
     | 
| 
       23 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency 
     | 
| 
      
 14 
     | 
    
         
            +
            dependencies:
         
     | 
| 
      
 15 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
       24 
16 
     | 
    
         
             
              name: gosu
         
     | 
| 
       25 
     | 
    
         
            -
               
     | 
| 
       26 
     | 
    
         
            -
              requirement: &id001 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 17 
     | 
    
         
            +
              requirement: &16971024 !ruby/object:Gem::Requirement
         
     | 
| 
       27 
18 
     | 
    
         
             
                none: false
         
     | 
| 
       28 
     | 
    
         
            -
                requirements: 
     | 
| 
       29 
     | 
    
         
            -
                - -  
     | 
| 
       30 
     | 
    
         
            -
                  - !ruby/object:Gem::Version 
     | 
| 
       31 
     | 
    
         
            -
                    hash: 49
         
     | 
| 
       32 
     | 
    
         
            -
                    segments: 
         
     | 
| 
       33 
     | 
    
         
            -
                    - 0
         
     | 
| 
       34 
     | 
    
         
            -
                    - 7
         
     | 
| 
       35 
     | 
    
         
            -
                    - 25
         
     | 
| 
      
 19 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 20 
     | 
    
         
            +
                - - ! '>='
         
     | 
| 
      
 21 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
       36 
22 
     | 
    
         
             
                    version: 0.7.25
         
     | 
| 
       37 
23 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       38 
     | 
    
         
            -
              version_requirements: *id001
         
     | 
| 
       39 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       40 
     | 
    
         
            -
              name: bacon
         
     | 
| 
       41 
24 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       42 
     | 
    
         
            -
               
     | 
| 
      
 25 
     | 
    
         
            +
              version_requirements: *16971024
         
     | 
| 
      
 26 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 27 
     | 
    
         
            +
              name: bacon
         
     | 
| 
      
 28 
     | 
    
         
            +
              requirement: &16970724 !ruby/object:Gem::Requirement
         
     | 
| 
       43 
29 
     | 
    
         
             
                none: false
         
     | 
| 
       44 
     | 
    
         
            -
                requirements: 
     | 
| 
       45 
     | 
    
         
            -
                - -  
     | 
| 
       46 
     | 
    
         
            -
                  - !ruby/object:Gem::Version 
     | 
| 
       47 
     | 
    
         
            -
                    hash: 19
         
     | 
| 
       48 
     | 
    
         
            -
                    segments: 
         
     | 
| 
       49 
     | 
    
         
            -
                    - 1
         
     | 
| 
       50 
     | 
    
         
            -
                    - 1
         
     | 
| 
       51 
     | 
    
         
            -
                    - 0
         
     | 
| 
      
 30 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 31 
     | 
    
         
            +
                - - ! '>='
         
     | 
| 
      
 32 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
       52 
33 
     | 
    
         
             
                    version: 1.1.0
         
     | 
| 
       53 
34 
     | 
    
         
             
              type: :development
         
     | 
| 
       54 
     | 
    
         
            -
               
     | 
| 
      
 35 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 36 
     | 
    
         
            +
              version_requirements: *16970724
         
     | 
| 
       55 
37 
     | 
    
         
             
            description: TexPlay is a light-weight image manipulation framework for Ruby and Gosu
         
     | 
| 
       56 
38 
     | 
    
         
             
            email: jrmair@gmail.com
         
     | 
| 
       57 
39 
     | 
    
         
             
            executables: []
         
     | 
| 
       58 
     | 
    
         
            -
             
     | 
| 
       59 
40 
     | 
    
         
             
            extensions: []
         
     | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
       61 
41 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
       62 
     | 
    
         
            -
             
     | 
| 
       63 
     | 
    
         
            -
            files: 
         
     | 
| 
      
 42 
     | 
    
         
            +
            files:
         
     | 
| 
       64 
43 
     | 
    
         
             
            - Rakefile
         
     | 
| 
       65 
44 
     | 
    
         
             
            - README.markdown
         
     | 
| 
       66 
45 
     | 
    
         
             
            - CHANGELOG
         
     | 
| 
       67 
46 
     | 
    
         
             
            - lib/texplay/alone.rb
         
     | 
| 
       68 
47 
     | 
    
         
             
            - lib/texplay/c_function_docs.rb
         
     | 
| 
      
 48 
     | 
    
         
            +
            - lib/texplay/live.rb
         
     | 
| 
       69 
49 
     | 
    
         
             
            - lib/texplay/version.rb
         
     | 
| 
       70 
50 
     | 
    
         
             
            - lib/texplay-contrib.rb
         
     | 
| 
       71 
51 
     | 
    
         
             
            - lib/texplay.rb
         
     | 
| 
         @@ -150,38 +130,26 @@ files: 
     | 
|
| 
       150 
130 
     | 
    
         
             
            has_rdoc: true
         
     | 
| 
       151 
131 
     | 
    
         
             
            homepage: http://banisterfiend.wordpress.com/2008/08/23/texplay-an-image-manipulation-tool-for-ruby-and-gosu/
         
     | 
| 
       152 
132 
     | 
    
         
             
            licenses: []
         
     | 
| 
       153 
     | 
    
         
            -
             
     | 
| 
       154 
133 
     | 
    
         
             
            post_install_message: 
         
     | 
| 
       155 
134 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       156 
     | 
    
         
            -
             
     | 
| 
       157 
     | 
    
         
            -
            require_paths: 
         
     | 
| 
      
 135 
     | 
    
         
            +
            require_paths:
         
     | 
| 
       158 
136 
     | 
    
         
             
            - lib
         
     | 
| 
       159 
     | 
    
         
            -
            required_ruby_version: !ruby/object:Gem::Requirement 
     | 
| 
      
 137 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         
     | 
| 
       160 
138 
     | 
    
         
             
              none: false
         
     | 
| 
       161 
     | 
    
         
            -
              requirements: 
     | 
| 
       162 
     | 
    
         
            -
              - -  
     | 
| 
       163 
     | 
    
         
            -
                - !ruby/object:Gem::Version 
     | 
| 
       164 
     | 
    
         
            -
                   
     | 
| 
       165 
     | 
    
         
            -
             
     | 
| 
       166 
     | 
    
         
            -
                  - 0
         
     | 
| 
       167 
     | 
    
         
            -
                  version: "0"
         
     | 
| 
       168 
     | 
    
         
            -
            required_rubygems_version: !ruby/object:Gem::Requirement 
         
     | 
| 
      
 139 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 140 
     | 
    
         
            +
              - - ! '>='
         
     | 
| 
      
 141 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 142 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
      
 143 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       169 
144 
     | 
    
         
             
              none: false
         
     | 
| 
       170 
     | 
    
         
            -
              requirements: 
     | 
| 
       171 
     | 
    
         
            -
              - -  
     | 
| 
       172 
     | 
    
         
            -
                - !ruby/object:Gem::Version 
     | 
| 
       173 
     | 
    
         
            -
                   
     | 
| 
       174 
     | 
    
         
            -
                  segments: 
         
     | 
| 
       175 
     | 
    
         
            -
                  - 1
         
     | 
| 
       176 
     | 
    
         
            -
                  - 3
         
     | 
| 
       177 
     | 
    
         
            -
                  - 1
         
     | 
| 
       178 
     | 
    
         
            -
                  version: 1.3.1
         
     | 
| 
      
 145 
     | 
    
         
            +
              requirements:
         
     | 
| 
      
 146 
     | 
    
         
            +
              - - ! '>='
         
     | 
| 
      
 147 
     | 
    
         
            +
                - !ruby/object:Gem::Version
         
     | 
| 
      
 148 
     | 
    
         
            +
                  version: '0'
         
     | 
| 
       179 
149 
     | 
    
         
             
            requirements: []
         
     | 
| 
       180 
     | 
    
         
            -
             
     | 
| 
       181 
150 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       182 
151 
     | 
    
         
             
            rubygems_version: 1.5.2
         
     | 
| 
       183 
152 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       184 
153 
     | 
    
         
             
            specification_version: 3
         
     | 
| 
       185 
154 
     | 
    
         
             
            summary: TexPlay is a light-weight image manipulation framework for Ruby and Gosu
         
     | 
| 
       186 
155 
     | 
    
         
             
            test_files: []
         
     | 
| 
       187 
     | 
    
         
            -
             
     |