Show
Ignore:
Timestamp:
03/29/09 07:05:20 (16 months ago)
Author:
artem
Message:

+ applied "hill shading" patch from Marcin Rudowski

a) Raster opacity
b) Raster merging modes (TODO:add more modes, consider agg impl)
c) Raster scaling algos: fast,bilinear,bilinear8

(TODO: add alpha support in bilinear8)

d) improvements to png256

*Great work, thanks!*

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/include/mapnik/raster_symbolizer.hpp

    r313 r1027  
    2929namespace mapnik 
    3030{ 
    31     struct MAPNIK_DECL raster_symbolizer { /* TODO */}; 
     31    struct MAPNIK_DECL raster_symbolizer { 
     32        explicit raster_symbolizer() 
     33            : mode_("normal"), 
     34              scaling_("fast"), 
     35              opacity_(1.0) {} 
     36 
     37        std::string const& get_mode() const 
     38        { 
     39            return mode_; 
     40        } 
     41        void set_mode(std::string const& mode) 
     42        { 
     43            mode_ = mode; 
     44        } 
     45        std::string const& get_scaling() const 
     46        { 
     47            return scaling_; 
     48        } 
     49        void set_scaling(std::string const& scaling) 
     50        { 
     51            scaling_ = scaling; 
     52        } 
     53        void set_opacity(float opacity) 
     54        { 
     55            opacity_ = opacity; 
     56        } 
     57        float get_opacity() const 
     58        { 
     59            return opacity_; 
     60        } 
     61    private: 
     62        std::string mode_; 
     63        std::string scaling_; 
     64        float opacity_; 
     65    }; 
    3266} 
    3367