Exemple #1
0
void
drawdatum(Graph *g, int x, uint64_t prev, uint64_t v, uint64_t vmax)
{
	int c;
	Point p, q;

	c = g->colindex;
	p = datapoint(g, x, v, vmax);
	q = datapoint(g, x, prev, vmax);
	if(p.y < q.y){
		draw(screen, Rect(p.x, g->r.min.y, p.x+1, p.y), cols[c][0], nil, paritypt(p.x));
		draw(screen, Rect(p.x, p.y, p.x+1, q.y+Dot), cols[c][2], nil, ZP);
		draw(screen, Rect(p.x, q.y+Dot, p.x+1, g->r.max.y), cols[c][1], nil, ZP);
	}else{
		draw(screen, Rect(p.x, g->r.min.y, p.x+1, q.y), cols[c][0], nil, paritypt(p.x));
		draw(screen, Rect(p.x, q.y, p.x+1, p.y+Dot), cols[c][2], nil, ZP);
		draw(screen, Rect(p.x, p.y+Dot, p.x+1, g->r.max.y), cols[c][1], nil, ZP);
	}

}
Exemple #2
0
void
drawdatum(int x, double prev, double v)
{
	Point p, q;

	p = datapoint(x, v);
	q = datapoint(x, prev);
	if(p.y < q.y){
		draw(screen, Rect(p.x, hrect.min.y, p.x+1, p.y), neutral,
			nil, ZP);
		draw(screen, Rect(p.x, p.y, p.x+1, q.y+Dot), dark, nil, ZP);
		draw(screen, Rect(p.x, q.y+Dot, p.x+1, hrect.max.y), light,
			nil, ZP);
	}else{
		draw(screen, Rect(p.x, hrect.min.y, p.x+1, q.y), neutral,
			nil, ZP);
		draw(screen, Rect(p.x, q.y, p.x+1, p.y+Dot), dark, nil, ZP);
		draw(screen, Rect(p.x, p.y+Dot, p.x+1, hrect.max.y), light,
			nil, ZP);
	}

}
std::ostream& operator <<( std::ostream& os, const compactTractChar& object )
{
    std::vector< unsigned char > tract( object.tract() );
    size_t counter0 ( 0 );
    for( size_t i = 0; i < tract.size() && counter0 < 15; ++i )
    {
        size_t datapoint(tract[i]);
        if(datapoint)
        {
            os << datapoint << " ";
            ++counter0;
        }
    }
    return os;
} // end "operator << " -----------------------------------------------------------------