Ejemplo n.º 1
0
    /* Try to expand each nonprime and noncovered cube */
    foreach_set(F, last, p) {
	/* do not expand if PRIME or if covered by previous expansion */
	if (! TESTP(p, PRIME) && ! TESTP(p, COVERED)) {

	    /* expand the cube p, result is RAISE */
	    expand1(R, F, RAISE, FREESET, OVEREXPANDED_CUBE, SUPER_CUBE,
		INIT_LOWER, &num_covered, p);
	    if (debug & EXPAND)
		printf("EXPAND: %s (covered %d)\n", pc1(p), num_covered);
	    (void) set_copy(p, RAISE);
	    SET(p, PRIME);
	    RESET(p, COVERED);		/* not really necessary */

	    /* See if we generated an inessential prime */
	    if (num_covered == 0 && ! setp_equal(p, OVEREXPANDED_CUBE)) {
		SET(p, NONESSEN);
	    }
	}
    }
Ejemplo n.º 2
0
bool FlashText::getBounds(float& left, float& top, float& right, float& bottom, IFlashDisplayObject* targetCoordinateSystem){
	if ( targetCoordinateSystem == 0 ){
		left = 0;
		top = 0;
		right = width;
		bottom = height;
		sort2(left, right);
		sort2(top, bottom);
	}else{
		float tx, ty;
		tx = 0;
		ty = 0;
		localToTarget(tx, ty, targetCoordinateSystem);
		left = right = tx;
		top = bottom = ty;

		tx = 0 + width;
		ty = 0;
		localToTarget(tx, ty, targetCoordinateSystem);
		expand1(left, right, tx);
		expand1(top, bottom, ty);

		
		tx = 0;
		ty = 0 + height;
		localToTarget(tx, ty, targetCoordinateSystem);
		expand1(left, right, tx);
		expand1(top, bottom, ty);

		tx = 0 + width;
		ty = 0 + height;
		localToTarget(tx, ty, targetCoordinateSystem);
		expand1(left, right, tx);
		expand1(top, bottom, ty);
	}
	return true;
}