# legends.rb: handling of legends # copyright (c) 2009 by Vincent Fourmond # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details (in the COPYING file). require 'ctioga2/graphics/types' require 'ctioga2/graphics/legends/items' require 'ctioga2/graphics/legends/area' require 'ctioga2/graphics/legends/storage' require 'ctioga2/graphics/legends/provider' module CTioga2 Version::register_svn_info('$Revision$', '$Date$') module Graphics # Now, various commands pertaining to legends LegendGroup = CmdGroup.new('legends', "Legends", < CmdArg.new('dimension'), 'scale' => CmdArg.new('float'), 'text_scale' => CmdArg.new('float'), } LegendStyleCommand = Cmd.new("legend-style",nil,"--legend-style", [], LegendStyleOptions) do |plotmaker, options| plotmaker.root_object.current_legend_area. legend_style.set_from_hash(options) end LegendStyleCommand.describe("Set the style of the legends", <