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::line_interface Class Referenceabstract

The interface of line algorithm. More...

Inheritance diagram for nana::paint::image_process::line_interface:
nana::paint::detail::algorithms::bresenham_line

Public Member Functions

virtual ~line_interface ()=default
 
virtual void process (paint::pixel_buffer &pixbuf, const point &pos_beg, const point &pos_end, const ::nana::color &, double fade_rate) const =0
 Draws a line. More...
 

Detailed Description

The interface of line algorithm.

Constructor & Destructor Documentation

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

Member Function Documentation

virtual void nana::paint::image_process::line_interface::process ( paint::pixel_buffer pixbuf,
const point pos_beg,
const point pos_end,
const ::nana::color ,
double  fade_rate 
) const
pure virtual

Draws a line.

Semantics:

pixbuf = pixbuf * (1 - fade_rate) + color * fade_rate

The two points are calculated by Nana, they are always valid, and pos_beg.x <= pos_end.x

Parameters
pos_begleft point
pos_endright point
fade_rateblend rate in the range of [0, 1] If not 0, the line is blended to the pixbuf