Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
agg::scanline_hit_test Class Reference

#include <src/agg/agg_rasterizer_cells_aa.h>

Public Member Functions

 scanline_hit_test (int x)
 
void reset_spans ()
 
void finalize (int)
 
void add_cell (int x, int)
 
void add_span (int x, int len, int)
 
unsigned num_spans () const
 
bool hit () const
 

Private Attributes

int m_x
 
bool m_hit
 

Detailed Description

Constructor & Destructor Documentation

◆ scanline_hit_test()

agg::scanline_hit_test::scanline_hit_test ( int  x)
inline
718: m_x(x), m_hit(false) {}
bool m_hit
Definition agg_rasterizer_cells_aa.h:735
int m_x
Definition agg_rasterizer_cells_aa.h:734

Member Function Documentation

◆ add_cell()

void agg::scanline_hit_test::add_cell ( int  x,
int   
)
inline
723 {
724 if(m_x == x) m_hit = true;
725 }

References m_hit, and m_x.

◆ add_span()

void agg::scanline_hit_test::add_span ( int  x,
int  len,
int   
)
inline
727 {
728 if(m_x >= x && m_x < x+len) m_hit = true;
729 }

References m_hit, and m_x.

◆ finalize()

void agg::scanline_hit_test::finalize ( int  )
inline
721{}

◆ hit()

bool agg::scanline_hit_test::hit ( ) const
inline
731{ return m_hit; }

References m_hit.

Referenced by agg::rasterizer_scanline_aa< Clip >::hit_test(), and agg::rasterizer_scanline_aa_nogamma< Clip >::hit_test().

+ Here is the caller graph for this function:

◆ num_spans()

unsigned agg::scanline_hit_test::num_spans ( ) const
inline
730{ return 1; }

◆ reset_spans()

void agg::scanline_hit_test::reset_spans ( )
inline
720{}

Member Data Documentation

◆ m_hit

bool agg::scanline_hit_test::m_hit
private

Referenced by add_cell(), add_span(), and hit().

◆ m_x

int agg::scanline_hit_test::m_x
private

Referenced by add_cell(), and add_span().


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