Class: HashAvatar::Icon

Inherits:
Object
  • Object
show all
Includes:
Magick
Defined in:
lib/hash_avatar/icon.rb

Class Method Summary collapse

Class Method Details

.draw_full_circleObject



254
255
256
257
258
259
260
261
# File 'lib/hash_avatar/icon.rb', line 254

def self.draw_full_circle
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.circle(150, 160, 160).styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_full_rectObject



9
10
11
12
13
14
15
16
# File 'lib/hash_avatar/icon.rb', line 9

def self.draw_full_rect
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.rect(320, 320).styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_half_rect_1Object



18
19
20
21
22
23
24
25
# File 'lib/hash_avatar/icon.rb', line 18

def self.draw_half_rect_1
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.rect(160, 320, 0, 0).styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_half_rect_2Object



27
28
29
30
31
32
33
34
# File 'lib/hash_avatar/icon.rb', line 27

def self.draw_half_rect_2
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.rect(320, 160, 0, 0).styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_half_rect_3Object



36
37
38
39
40
41
42
43
# File 'lib/hash_avatar/icon.rb', line 36

def self.draw_half_rect_3
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.rect(320, 160, 0, 160).styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_half_rect_4Object



45
46
47
48
49
50
51
52
# File 'lib/hash_avatar/icon.rb', line 45

def self.draw_half_rect_4
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.rect(160, 320, 160, 0).styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_half_rect_5Object



54
55
56
57
58
59
60
61
62
# File 'lib/hash_avatar/icon.rb', line 54

def self.draw_half_rect_5
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.rect(160, 160).styles(:fill => 'black', :stroke_width => 0)
    canvas.rect(160, 160, 160, 160).styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_half_rect_6Object



64
65
66
67
68
69
70
71
72
# File 'lib/hash_avatar/icon.rb', line 64

def self.draw_half_rect_6
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.rect(160, 160, 0, 160).styles(:fill => 'black', :stroke_width => 0)
    canvas.rect(160, 160, 160, 0).styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_half_triangle_1Object



110
111
112
113
114
115
116
117
# File 'lib/hash_avatar/icon.rb', line 110

def self.draw_half_triangle_1
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.path("M 0,0 L 0,320 L 320,320 z").styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_half_triangle_2Object



119
120
121
122
123
124
125
126
# File 'lib/hash_avatar/icon.rb', line 119

def self.draw_half_triangle_2
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.path("M 0,0 L 320,0 L 320,320 z").styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_half_triangle_3Object



128
129
130
131
132
133
134
135
# File 'lib/hash_avatar/icon.rb', line 128

def self.draw_half_triangle_3
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.path("M 0,0 L 0,320 L 320,0 z").styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_half_triangle_4Object



137
138
139
140
141
142
143
144
# File 'lib/hash_avatar/icon.rb', line 137

def self.draw_half_triangle_4
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.path("M 320,0 L 0,320 L 320,320 z").styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_half_triangle_5Object



146
147
148
149
150
151
152
153
# File 'lib/hash_avatar/icon.rb', line 146

def self.draw_half_triangle_5
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.path("M 160,0 L 0,320 L 320,320 z").styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_half_triangle_6Object



155
156
157
158
159
160
161
162
# File 'lib/hash_avatar/icon.rb', line 155

def self.draw_half_triangle_6
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.path("M 160,320 L 0,0 L 320,0 z").styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_half_triangle_7Object



164
165
166
167
168
169
170
171
# File 'lib/hash_avatar/icon.rb', line 164

def self.draw_half_triangle_7
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.path("M 0,160 L 320,0 L 320,320 z").styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_half_triangle_8Object



173
174
175
176
177
178
179
180
# File 'lib/hash_avatar/icon.rb', line 173

def self.draw_half_triangle_8
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.path("M 320,160 L 0,0 L 0,320 z").styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_quarter_circle_1Object



263
264
265
266
267
268
269
270
# File 'lib/hash_avatar/icon.rb', line 263

def self.draw_quarter_circle_1
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.circle(70, 80, 80).styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_quarter_circle_2Object



272
273
274
275
276
277
278
279
# File 'lib/hash_avatar/icon.rb', line 272

def self.draw_quarter_circle_2
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.circle(70, 80, 240).styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_quarter_circle_3Object



281
282
283
284
285
286
287
288
# File 'lib/hash_avatar/icon.rb', line 281

def self.draw_quarter_circle_3
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.circle(70, 240, 80).styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_quarter_circle_4Object



290
291
292
293
294
295
296
297
# File 'lib/hash_avatar/icon.rb', line 290

def self.draw_quarter_circle_4
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.circle(70, 240, 240).styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_quarter_circle_5Object



299
300
301
302
303
304
305
306
# File 'lib/hash_avatar/icon.rb', line 299

def self.draw_quarter_circle_5
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.circle(70, 80, 160).styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_quarter_circle_6Object



308
309
310
311
312
313
314
315
# File 'lib/hash_avatar/icon.rb', line 308

def self.draw_quarter_circle_6
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.circle(70, 240, 160).styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_quarter_circle_7Object



317
318
319
320
321
322
323
324
# File 'lib/hash_avatar/icon.rb', line 317

def self.draw_quarter_circle_7
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.circle(70, 160, 80).styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_quarter_circle_8Object



326
327
328
329
330
331
332
333
# File 'lib/hash_avatar/icon.rb', line 326

def self.draw_quarter_circle_8
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.circle(70, 160, 240).styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_quarter_circle_9Object



335
336
337
338
339
340
341
342
# File 'lib/hash_avatar/icon.rb', line 335

def self.draw_quarter_circle_9
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.circle(70, 160, 160).styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_quarter_rect_1Object



74
75
76
77
78
79
80
81
# File 'lib/hash_avatar/icon.rb', line 74

def self.draw_quarter_rect_1
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.rect(160, 160).styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_quarter_rect_2Object



83
84
85
86
87
88
89
90
# File 'lib/hash_avatar/icon.rb', line 83

def self.draw_quarter_rect_2
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.rect(160, 160, 160, 160).styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_quarter_rect_3Object



92
93
94
95
96
97
98
99
# File 'lib/hash_avatar/icon.rb', line 92

def self.draw_quarter_rect_3
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.rect(160, 160, 0, 160).styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_quarter_rect_4Object



101
102
103
104
105
106
107
108
# File 'lib/hash_avatar/icon.rb', line 101

def self.draw_quarter_rect_4
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.rect(160, 160, 160, 0).styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_quarter_triangle_1Object



182
183
184
185
186
187
188
189
# File 'lib/hash_avatar/icon.rb', line 182

def self.draw_quarter_triangle_1
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.path("M 0,0 L 0,160 L 320,160 z").styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_quarter_triangle_2Object



191
192
193
194
195
196
197
198
# File 'lib/hash_avatar/icon.rb', line 191

def self.draw_quarter_triangle_2
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.path("M 0,0 L 320,0 L 320,160 z").styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_quarter_triangle_3Object



200
201
202
203
204
205
206
207
# File 'lib/hash_avatar/icon.rb', line 200

def self.draw_quarter_triangle_3
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.path("M 0,0 L 160,0 L 160,320 z").styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_quarter_triangle_4Object



209
210
211
212
213
214
215
216
# File 'lib/hash_avatar/icon.rb', line 209

def self.draw_quarter_triangle_4
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.path("M 0,0 L 0,320 L 160,320 z").styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_quarter_triangle_5Object



218
219
220
221
222
223
224
225
# File 'lib/hash_avatar/icon.rb', line 218

def self.draw_quarter_triangle_5
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.path("M 320,320 L 320,0 L 160,0 z").styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_quarter_triangle_6Object



227
228
229
230
231
232
233
234
# File 'lib/hash_avatar/icon.rb', line 227

def self.draw_quarter_triangle_6
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.path("M 320,320 L 160,320 L 160,0 z").styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_quarter_triangle_7Object



236
237
238
239
240
241
242
243
# File 'lib/hash_avatar/icon.rb', line 236

def self.draw_quarter_triangle_7
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.path("M 320,320 L 0,320 L 0,160 z").styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end

.draw_quarter_triangle_8Object



245
246
247
248
249
250
251
252
# File 'lib/hash_avatar/icon.rb', line 245

def self.draw_quarter_triangle_8
  rvg = RVG.new(64, 64) do |canvas|
    canvas.background_fill = 'white'
    canvas.viewbox(0, 0, 320, 320)
    canvas.path("M 320,320 L 320,160 L 0,160 z").styles(:fill => 'black', :stroke_width => 0)
  end
  rvg.draw
end