示例#1
0
文件: place.cpp 项目: junjiek/Placer
myPoint myPlacement::getOrigin(InstTerm& it) {
	Inst* inst = getInst(it);
	long cx = inst->getCenterX();
	long cy = inst->getCenterY();
	long ox = it.getOffsetX();
	long oy = it.getOffsetY();

	switch(inst->getOrient()){
	case kR0:
		return myPoint(cx + ox, cy + oy);
	case kR90:
		return myPoint(cx + oy, cy - ox);
	case kR180:
		return myPoint(cx - ox, cy - oy);
	case kR270:
		return myPoint(cx - oy, cy + ox);
	case kMY:
		return myPoint(cx - ox, cy + oy);
	case kMYR90:
		return myPoint(cx + oy, cy + ox);
	case kMX:
		return myPoint(cx + ox, cy - oy);
	case kMXR90:
		return myPoint(cx - oy, cy - ox);
	default:
		cout<<"unknown orientation!!!"<<endl;
		return myPoint(0,0);
	}

	return myPoint(cx, cy);
}
示例#2
0
文件: place.cpp 项目: junjiek/Placer
myPoint myPlacement::getOrigin(InstTerm* it) {
	Inst* inst = getInst(it);
	long cx = inst->getCenterX();
	long cy = inst->getCenterY();
	long ox = it->getOffsetX();
	long oy = it->getOffsetY();
	return myPoint(cx + ox, cy + oy);
}