VideoTools
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Gr::LineDraw< T > Class Template Reference

A class template for drawing lines in terms of separate horizontal line segments. More...

#include <grlinedraw.h>

Public Member Functions

 LineDraw (T x1, T y1, T x2, T y2)
 Constructor.
 
bool more ()
 Iterator for the next line segment. Returns true at least once.
 
x1 () const
 Returns the current smaller x coordinate.
 
x2 () const
 Returns the current larger x coordinate.
 
y () const
 Returns the current y coordinate.
 
bool flat () const
 Returns true if the x dimension of the line is greater the the y dimension. More...
 

Detailed Description

template<typename T>
class Gr::LineDraw< T >

A class template for drawing lines in terms of separate horizontal line segments.

Usage:

LineDraw<int> line_scan( ... ) ;
while( line_scan.more() )
drawSegment( line_scan.x1() , line_scan.x2() , line_scan.y() ) ;

Definition at line 30 of file grlinedraw.h.

Member Function Documentation

template<typename T >
bool Gr::LineDraw< T >::flat ( ) const

Returns true if the x dimension of the line is greater the the y dimension.

Definition at line 275 of file grlinedraw.h.


The documentation for this class was generated from the following file: