labels 0.0.4 → 0.0.5

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.
@@ -80,7 +80,7 @@ module Labels
80
80
  pdf.grid.columns.times do |j|
81
81
  box = pdf.grid(i,j)
82
82
  pdf.bounding_box box.top_left, :width => box.width, :height => box.height do
83
- self._draw_template(pdf, template)
83
+ _draw_template(pdf, template)
84
84
  end
85
85
  end
86
86
  end
@@ -109,15 +109,15 @@ module Labels
109
109
  if draw
110
110
  case layer
111
111
  when Labels::Barcode
112
- self._draw_barcode(pdf, layer, content)
112
+ _draw_barcode(pdf, layer, content)
113
113
  when Labels::Date
114
- self._draw_date(pdf, layer, content)
114
+ _draw_date(pdf, layer, content)
115
115
  when Labels::Image
116
- self._draw_image(pdf, layer, content)
116
+ _draw_image(pdf, layer, content)
117
117
  when Labels::Shape
118
- self._draw_shape(pdf, layer, content)
118
+ _draw_shape(pdf, layer, content)
119
119
  when Labels::Text
120
- self._draw_text(pdf, layer, content)
120
+ _draw_text(pdf, layer, content)
121
121
  end
122
122
  end
123
123
  end
@@ -141,7 +141,7 @@ module Labels
141
141
  origin = {:x => layer.x, :y => pdf.bounds.top - layer.y}
142
142
  center = {:x => origin[:x] + (layer.width * 0.5), :y => origin[:y] - (layer.height * 0.5)}
143
143
 
144
- pdf.rotate(layer.rotation, :origin => [center[:x], center[:y]]) do
144
+ pdf.rotate(360 - layer.rotation, :origin => [center[:x], center[:y]]) do
145
145
  pdf.transparent layer.alpha do
146
146
  begin
147
147
  options = {
@@ -190,7 +190,7 @@ module Labels
190
190
  content = Time.now.strftime(layer.format)
191
191
  end
192
192
 
193
- self._draw_text(pdf, layer, content)
193
+ _draw_text(pdf, layer, content)
194
194
  end
195
195
 
196
196
  # Draws the given image layer with optional content
@@ -201,7 +201,7 @@ module Labels
201
201
  origin = {:x => layer.x, :y => pdf.bounds.top - layer.y}
202
202
  center = {:x => origin[:x] + (layer.width * 0.5), :y => origin[:y] - (layer.height * 0.5)}
203
203
 
204
- pdf.rotate(layer.rotation, :origin => [center[:x], center[:y]]) do
204
+ pdf.rotate(360 - layer.rotation, :origin => [center[:x], center[:y]]) do
205
205
  pdf.transparent layer.alpha do
206
206
  begin
207
207
  unless content.nil?
@@ -250,7 +250,7 @@ module Labels
250
250
  origin = {:x => layer.x, :y => pdf.bounds.top - layer.y}
251
251
  center = {:x => origin[:x] + (layer.width * 0.5), :y => origin[:y] - (layer.height * 0.5)}
252
252
 
253
- pdf.rotate(layer.rotation, :origin => [center[:x], center[:y]]) do
253
+ pdf.rotate(360 - layer.rotation, :origin => [center[:x], center[:y]]) do
254
254
  pdf.transparent layer.alpha do
255
255
  unless layer.elliptical
256
256
  pdf.rounded_rectangle([origin[:x], origin[:y]], layer.width, layer.height, layer.corner_radius)
@@ -300,7 +300,7 @@ module Labels
300
300
  origin = {:x => layer.x, :y => pdf.bounds.top - layer.y}
301
301
  center = {:x => origin[:x] + (layer.width * 0.5), :y => origin[:y] - (layer.height * 0.5)}
302
302
 
303
- pdf.rotate(layer.rotation, :origin => [center[:x], center[:y]]) do
303
+ pdf.rotate(360 - layer.rotation, :origin => [center[:x], center[:y]]) do
304
304
  pdf.transparent layer.alpha do
305
305
  style = :normal
306
306
  style = :bold if layer.bold
@@ -6,5 +6,5 @@
6
6
 
7
7
  #
8
8
  module Labels
9
- VERSION = "0.0.4"
9
+ VERSION = "0.0.5"
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: labels
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-18 00:00:00.000000000 Z
12
+ date: 2012-10-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -172,7 +172,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
172
172
  version: '0'
173
173
  segments:
174
174
  - 0
175
- hash: -3186400745073761168
175
+ hash: -1830323042357358280
176
176
  required_rubygems_version: !ruby/object:Gem::Requirement
177
177
  none: false
178
178
  requirements:
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
181
181
  version: '0'
182
182
  segments:
183
183
  - 0
184
- hash: -3186400745073761168
184
+ hash: -1830323042357358280
185
185
  requirements: []
186
186
  rubyforge_project: labels
187
187
  rubygems_version: 1.8.24