Nana C++ Library. Reference for users.
What we need to use nana
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
nana::paint::image_process::blend_interface Class Referenceabstract

The interface of a blend algorithm. More...

Inheritance diagram for nana::paint::image_process::blend_interface:
nana::paint::detail::algorithms::blend

Public Member Functions

virtual ~blend_interface ()=default
 
virtual void process (const paint::pixel_buffer &src_pixbuf, const nana::rectangle &src_area, paint::pixel_buffer &dest_pixbuf, const nana::point &dest_pos, double fade_rate) const =0
 Blends two images with specified area and blend rate. More...
 

Detailed Description

The interface of a blend algorithm.

Constructor & Destructor Documentation

virtual nana::paint::image_process::blend_interface::~blend_interface ( )
virtualdefault

Member Function Documentation

virtual void nana::paint::image_process::blend_interface::process ( const paint::pixel_buffer src_pixbuf,
const nana::rectangle src_area,
paint::pixel_buffer dest_pixbuf,
const nana::point dest_pos,
double  fade_rate 
) const
pure virtual

Blends two images with specified area and blend rate.

Semantics:

dest_pixbuf = dest_pixbuf * fade_rate + scr_pixbuf * (1 - fade_rate);

The area is always valid, it is calculated by Nana before passing to the algorithm. So the area could be applied without a check.

Parameters
fade_rateblend rate in the range of [0, 1]