示例#1
0
bool CSuperscape::MakeRasH()
{
// Collect strip tiles

	vector<int>	vid;
	int			w1, w2, h1, h2;

	w1 = int(Bxw * 0.45);
	w2 = Bxc + w1;
	w1 = Bxc - w1;

	h1 = (scr.stripwidth * gH)/2;
	h2 = Byc + h1;
	h1 = Byc - h1;

	for( int i = is0; i < isN; ++i ) {

		const CUTile&	U = TS.vtil[i];

		if( U.T.t[2] + gW > w1 && U.T.t[2] < w2 &&
			U.T.t[5] + gH > h1 && U.T.t[5] < h2 ) {

			vid.push_back( i );
		}
	}

	ras = TS.Scape( ws, hs, x0, y0,
			vid, inv_scl, 1, 0,
			scr.legendremaxorder, scr.rendersdevcnts,
			scr.maskoutresin );

	return (ras != NULL);
}
bool CSuperscape::MakeRasA()
{
	ras = TS.Scape( ws, hs, x0, y0,
			vID, inv_scl, 1, 0,
			scr.legendremaxorder, scr.rendersdevcnts,
			scr.maskoutresin, scr.blockslots );

	return (ras != NULL);
}
示例#3
0
bool CSuperscape::MakeWholeRaster()
{
	vector<int>	vid( isN - is0 );

	for( int i = is0; i < isN; ++i )
		vid[i - is0] = i;

	ras = TS.Scape( ws, hs, x0, y0,
			vid, inv_scl, 1, 0,
			scr.legendremaxorder, scr.rendersdevcnts,
			scr.maskoutresin );

	return (ras != NULL);
}
bool CSuperscape::MakeRasB( const DBox &Abb )
{
	vector<int>	vid;
	int			W2 = gW/2, H2 = gH/2;

	for( int i = is0; i < isN; ++i ) {

		const CUTile& U = TS.vtil[i];

		Point	p( W2, H2 );
		U.T.Transform( p );

		if( p.x >= Abb.L && p.x <= Abb.R &&
			p.y >= Abb.B && p.y <= Abb.T ) {

			vid.push_back( i );
		}
	}

	if( vid.size() < 0.05 * gDat.ntil ) {

		fprintf( flog, "Low B tile count [%ld] for z=%d.\n",
		vid.size(), TS.vtil[is0].z );

		return false;
	}

	ras = TS.Scape( ws, hs, x0, y0,
			vid, inv_scl, 1, 0,
			scr.legendremaxorder, scr.rendersdevcnts,
			scr.maskoutresin, scr.blockslots );

	if( !ras ) {

		fprintf( flog, "Empty B scape for z=%d.\n",
		TS.vtil[is0].z );

		return false;
	}

	return (ras != NULL);
}