// Copyright 2005, 2006 - Morten Nielsen (www.iter.dk)
//
// This file is part of SharpMap.
// SharpMap is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// SharpMap 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 Lesser General Public License for more details.
// You should have received a copy of the GNU Lesser General Public License
// along with SharpMap; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
using System;
using System.Drawing;
using DelftTools.Utils.Collections.Generic;
using GeoAPI.Extensions.Feature;
namespace SharpMap.Api
{
///
/// Interface for rendering a thematic layer
///
/// TODO: review ITheme, it should be easier to work with them, check implementation in ArgGIS, uDIG, QGIS...
///
public interface ITheme : ICloneable
{
///
/// Returns all themeItems that are part of this theme
///
/// Color
IEventedList ThemeItems { get; set; }
///
/// Theme attribute is used to find the values on which to base the coloring
///
string AttributeName { get; }
///
/// Returns the style based on a feature
///
/// Attribute to calculate color from
/// Color
IStyle GetStyle(IFeature feature);
///
/// Returns the style based on a value
///
/// Added for access based on coverage values
///
/// Value to determine style for
/// Color
IStyle GetStyle(T value) where T : IComparable, IComparable;
///
/// Returns color by value based on current configuration of theme.
///
/// ADDED ONLY FOR PERFORMANCE
/// Added for fast access to colors.
///
///
///
Color GetFillColor(T value) where T : IComparable;
///
/// Rescales the Theme based on and .
///
/// Minimum value used for the visualisation of the theme
/// Maximum value used for the visualisation of the theme
/// Returns a new, rescaled theme based on this object.
void ScaleTo(double min, double max);
}
}