~ubuntu-branches/ubuntu/wily/tdiary/wily

« back to all changes in this revision

Viewing changes to misc/plugin/gradient.rb

  • Committer: Bazaar Package Importer
  • Author(s): Daigo Moriwaki
  • Date: 2011-04-11 21:53:16 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110411215316-ih4gt4q8p29d2wf8
Tags: 3.0.1-1
* New upstream release (Closes: #542801, #594947)
* debian/control:
 - Bumped up Standards-Version to 3.9.1.
 - Updated version dependency.
* debian/tdiary-setup.rb: Followed the upstream changes, incorporating js and
  index.fcgi

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# gradient.rb $Revision: 1.3 $
2
 
#
3
 
# gradient.rb: ʸ�����礭�����Ѳ������ʤ���ɽ��
4
 
#   �ѥ�᥿:
5
 
#     str:        ʸ����
6
 
#     first_size: ����ʸ��������(���͡�ñ��pt)
7
 
#     last_size:  ����ʸ��������(���͡�ñ��pt)
8
 
#
9
 
#   ��: �֤���ʤ��Ȥ�Ǥ��ޤ��פ�10pt����30pt�˳���
10
 
#     <%=gradient '����ʤ��Ȥ�Ǥ��ޤ�', 10, 30 %>
 
1
# -*- coding: utf-8 -*-
 
2
# gradient.rb
 
3
#
 
4
# gradient.rb: 文字の大きさを変化させながら表示
 
5
#   パラメタ:
 
6
#     str:        文字列
 
7
#     first_size: 開始文字サイズ(数値、単位pt)
 
8
#     last_size:  開始文字サイズ(数値、単位pt)
 
9
#
 
10
#   例: 「こんなこともできます」を10ptから30ptに拡大
 
11
#     <%=gradient 'こんなこともできます', 10, 30 %>
11
12
#
12
13
# Copyright (c) 2002 TADA Tadashi <sho@spc.gr.jp>
13
14
# You can distribute this file under the GPL2.
14
15
#
15
16
def gradient( str, first_size, last_size )
16
 
        ary = str.split( // )
 
17
        ary = str.split( //u )
17
18
        len = ary.length - 1
18
19
        result = ""
19
20
        fontsize = first_size.to_f
26
27
        result
27
28
end
28
29
 
 
30
 
 
31
# Local Variables:
 
32
# mode: ruby
 
33
# indent-tabs-mode: t
 
34
# tab-width: 3
 
35
# ruby-indent-level: 3
 
36
# End: