-
Notifications
You must be signed in to change notification settings - Fork 9
/
logo.rb
46 lines (37 loc) · 1.02 KB
/
logo.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
$: << 'lib'
require 'skeptick'
puts "Skeptick #{Skeptick::VERSION}"
include Skeptick
image_size = '400x120'
paper = rounded_corners_image(size: image_size, radius: 25) do
set :size, image_size
image 'tile:granite:'
set '-brightness-contrast', '38x-25'
set :blur, '0x0.5'
end
left, top = 8, 80
text = image do
canvas :none, size: '395x110'
font 'Handwriting - Dakota'
set :pointsize, 90
set :fill, 'gradient:#37e-#007'
text 'Skeptick', left: left, top: top
end
bezier = \
"#{left + 17 }, #{top + 17} #{left + 457}, #{top - 13} " +
"#{left + 377}, #{top + 27} #{left + 267}, #{top + 27}"
curve = image do
canvas :none, size: '395x110'
set :strokewidth, 2
set :stroke, 'gradient:#37e-#007'
draw "fill none bezier #{bezier}"
end
result_path = "#{File.dirname(__FILE__)}/logo.png"
final = torn_paper_image \
paper * (text + curve),
spread: 50,
blur: '3x10'
logo_script = convert(final, to: result_path)
puts logo_script.to_s
logo_script.run
# system "osascript refresh_preview.scpt"