pixelpro_sdk 0.1.2 → 0.1.3

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: 40a3b61f14bae97508cf77d15238e64eff2d6e90
4
- data.tar.gz: 82c2c14adb794bbda2c92c923c5f5a746995749c
3
+ metadata.gz: 9e8a751216c777ea163bf25ba9c18e2964b88b62
4
+ data.tar.gz: 598b1d2dc46a056b9eac88e2b44da9ce4f535efe
5
5
  SHA512:
6
- metadata.gz: c6f19e4223f8e9c7fe562ee1e6743a60bc2b7f6dac2fbb747260d94b811266dfaf2364f90f0d891fde5b4411b16ba315df571e7c4bb9aa81fb8276ea82781921
7
- data.tar.gz: 147ddbc81f245d61588391df0a6833fb11feb6aeea66dce352d066967eb632a3cee6be82cb1692909afe6436be87d182192720159e887d9a591cb652bdf2d2f4
6
+ metadata.gz: 81228112061967ca9287afe3fd6cc240db0f7fdb2555acc01a7a91eaf2a19311458556ee91834a0ef8704e764bd1e831e1d445f3ca778ffc604454b64bd09d07
7
+ data.tar.gz: 4f702d647e2776bd90af83230a0fb6db2161a7f8dc6b986d8e425864ddad0e3d1f6fd99c3a7d1cc9f74321fa8e812cbb8668a99478b54e8b9ac01883778daaaf
data/README.md CHANGED
@@ -21,8 +21,9 @@ Or install it yourself as:
21
21
  $ gem install pixelpro_sdk
22
22
 
23
23
  ## Usage
24
+ execute 'pixelpro_init' to generate pixelpro_sdk files:
24
25
 
25
- TODO: Write usage instructions here
26
+ $ bundle exec pixelpro_init
26
27
 
27
28
  ## Development
28
29
 
@@ -8,18 +8,23 @@ module PixelproSdk
8
8
  @ddl_str = String.new
9
9
  @frame_num = 1
10
10
 
11
- def init
11
+ #init the ddl generate instance
12
+ def initialize
12
13
  @ddl_str = "0160"
13
14
  end
14
-
15
+ #set the frame number of the ddl
15
16
  def set_frame num
16
-
17
+ @frame_num = num
17
18
  end
18
19
 
19
- def add_image str,x,y,mask
20
+ #add image to the ddl file
21
+ #Usage:add_image image ddl, x location, y location, frame mask
22
+ def add_image str,x,y,mask=1
20
23
 
21
24
  end
22
25
 
26
+ #add text to the ddl file
27
+ #Usage:add_text text info, x location, y location, frame mask
23
28
  def add_text str,x,y,mask=1
24
29
  raise "param type error.Usage:add_text(String,Fixnum,Fixnum,Fixnum)" unless ((str.class == String)&&(x.class == Fixnum)&&(y.class == Fixnum)&&(mask.class == Fixnum))
25
30
  offset = x
@@ -45,7 +50,6 @@ module PixelproSdk
45
50
  end
46
51
  else
47
52
  str.each_byte do |letter,index|
48
- #byebug
49
53
  if letter>=65
50
54
  if letter>=97
51
55
  ddl_temp += "14#{offset.to_s(16).rjust(2, '0')}#{y.to_s(16).rjust(2, '0')}14"+((letter-97).to_s(16)).rjust(2, '0')
@@ -68,6 +72,7 @@ module PixelproSdk
68
72
  return 1
69
73
  end
70
74
 
75
+ #return the ddl
71
76
  def show_ddl
72
77
  return (@ddl_str.length / 2).to_s(16).rjust(2, '0')+@ddl_str
73
78
  end
@@ -1,12 +1,15 @@
1
1
  class String
2
+ #if the string is all numbers
2
3
  def is_all_num?
3
4
  return self.to_i.to_s == self
4
5
  end
5
6
 
7
+ #if the string is all upcase letter
6
8
  def is_all_up?
7
9
  return self.upcase == self
8
10
  end
9
11
 
12
+ #if the string is all lowercase letter
10
13
  def is_all_low?
11
14
  return self.downcase == self
12
15
  end
@@ -1,4 +1,4 @@
1
1
  module PixelproSdk
2
2
  #show version
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pixelpro_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - zhaolin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-15 00:00:00.000000000 Z
11
+ date: 2016-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -87,7 +87,6 @@ files:
87
87
  - lib/pixelpro_sdk/add_page.rb
88
88
  - lib/pixelpro_sdk/ddl_gen.rb
89
89
  - lib/pixelpro_sdk/string_ext_function.rb
90
- - lib/pixelpro_sdk/templates/template_controller.rb
91
90
  - lib/pixelpro_sdk/version.rb
92
91
  - pixelpro_sdk.gemspec
93
92
  homepage: https://github.com/zhaolin1992/pixelpro_sdk_ruby
@@ -1,20 +0,0 @@
1
- class CarRestrictionController < ApplicationController
2
-
3
- skip_before_action :verify_authenticity_token
4
-
5
- def config_ui
6
- # Add your codes here
7
- end
8
-
9
- def ins
10
- # Add your codes here
11
- end
12
-
13
- def info
14
- # Add your codes here
15
- end
16
-
17
- def event
18
- # Add your codes here
19
- end
20
- end