1
# legend.rb: style of legends
2
# copyright (c) 2009 by Vincent Fourmond
4
# This program is free software; you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation; either version 2 of the License, or
7
# (at your option) any later version.
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
# GNU General Public License for more details (in the COPYING file).
14
require 'ctioga2/utils'
17
# This module contains all the classes used by ctioga
20
Version::register_svn_info('$Revision: 55 $', '$Date: 2009-05-27 00:01:34 +0200 (Wed, 27 May 2009) $')
26
# Style of a given Legends::LegendStorage object.
27
class LegendStorageStyle < BasicStyle
29
# The distance between two lines, a Types::Dimension object.
32
# The width of the legend pictogram, a Types::Dimension object.
33
attr_accessor :picto_width
35
# The height of the legend pictogram, a Types::Dimension object.
36
attr_accessor :picto_height
38
# The distance between the legend pictogram and the text
39
attr_accessor :picto_to_text
41
# The scale of the legend
44
# The scale of the legend text -- relative to the overall
46
attr_accessor :text_scale
49
@dy = Types::Dimension.new(:dy, 1.6, :y)
51
@picto_width = Types::Dimension.new(:dy, 1.6, :x)
52
@picto_height = Types::Dimension.new(:dy, 0.6, :y)
54
@picto_to_text = Types::Dimension.new(:dy, 0.3, :x)