pixelflow_canvas 0.6.0 → 0.7.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
  SHA256:
3
- metadata.gz: b9d986c038fa69c140029fb55018d3417eddc28c56ae7a52e07ea026f3a5baae
4
- data.tar.gz: 7ba95e9cae2debb5e558792c71cb50928d04f0224c2f619d855f640a4865cf47
3
+ metadata.gz: c090cdc8db292f899c236139eec7643f7511a3ef0d578a5175fd4ca3a6e77edc
4
+ data.tar.gz: 0ec735b7b0c0f63b8174e712d82364b01fc7a1c730d74d49be5f8cd2b9701884
5
5
  SHA512:
6
- metadata.gz: 12f44c4d681080c1d484a2608bfff247c3b9359d786c197b14c5eaead40fb4211fb037abf11cb5e2325e6566858f997a706730e4cf57fe78cf2f1a67e526bd46
7
- data.tar.gz: 724177d21f3a1fc53600e9b1728c8f472eee08821c0ead60f83ab5805943d8d7c215e9e79934ee028f7f148b2db3a50d929d570bca1c86ce39eff80699d8afaf
6
+ metadata.gz: dc6baa7cb65f20eb65966c99e248854e0550a16749d77a5544e5219a9a305b8f5a6e1d6fe026ff98995e14550f54b9b85a40f1d443e171bcd40550d080314e79
7
+ data.tar.gz: f52a914851f557ee3d5b2cf99726dd70f2c33e439c141ca039bc671f945316dfdf57e14c906ed358a8c8131eb959d4ddd48acf76f5f99d5a823a985ff6e432d6
data/README.md CHANGED
@@ -1,39 +1,45 @@
1
- # PixelflowCanvas
1
+ # Pixelflow Canvas Ruby Driver
2
2
 
3
- TODO: Delete this and the text below, and describe your gem
3
+ This is a Ruby driver for the Pixelflow Canvas API.
4
4
 
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/pixelflow_canvas`. To experiment with that code, run `bin/console` for an interactive prompt.
5
+ ## Prerequisites
6
6
 
7
- ## Installation
7
+ This driver requires the Pixelflow Canvas extension for Visual Studio Code. You can install it from the [Visual Studio Code Marketplace](https://marketplace.visualstudio.com/items?itemName=gymnasiumsteglitz.pixelflow-canvas).
8
8
 
9
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
9
+ ## Installation
10
10
 
11
- Install the gem and add to the application's Gemfile by executing:
11
+ Add this line to your application's Gemfile:
12
12
 
13
- ```bash
14
- bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
13
+ ```ruby
14
+ gem 'pixelflow_canvas'
15
15
  ```
16
16
 
17
- If bundler is not being used to manage dependencies, install the gem by executing:
17
+ And then execute:
18
18
 
19
- ```bash
20
- gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
19
+ ```
20
+ $ bundle install
21
21
  ```
22
22
 
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
23
+ Or install it yourself as:
26
24
 
27
- ## Development
25
+ ```
26
+ $ gem install pixelflow_canvas
27
+ ```
28
28
 
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
29
+ ## Usage
30
30
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
31
+ Open the Pixelflow Canvas in VS Code via `Ctrl+Shift+P` or `F1` and `Show Pixelflow Canvas`.
32
32
 
33
- ## Contributing
33
+ Then you can use the following Ruby code to draw on the canvas:
34
34
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/pixelflow_canvas.
35
+ ```ruby
36
+ require 'pixelflow_canvas'
36
37
 
37
- ## License
38
+ canvas = Pixelflow::Canvas.new(16, 16, :palette)
39
+ (0...16).each do |y|
40
+ (0...16).each do |x|
41
+ canvas.set_pixel(x, y, x + y * 16)
42
+ end
43
+ end
44
+ ```
38
45
 
39
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).