/**
 * TODO:describtion
 */
void IND_TTF_FontManager::renderAllTexts() {
	// render simple text from DrawText method
	DrawTextRequestNode *pReq = NULL;
	for(DTRListIterator it = _DTRList.begin() ; it != _DTRList.end() ; it++) {
		pReq = it->second;
		if(pReq->bEx)
			doDrawTextEx(	pReq->sFont, pReq->sText, pReq->xPos, pReq->yPos,
							pReq->rPos, pReq->bPos, pReq->nFmt, pReq->clrFont, 
							pReq->clrBdr, pReq->clrBak, 
							pReq->btBdrTrans, pReq->btBakTrans, 
							pReq->bMirrorX,
							pReq->bMirrorY,
							pReq->fZRotate,
							pReq->btTransparency,
							pReq->bUseKerning,
							pReq->bUnderline);
		else
			doDrawText(pReq->sFont, pReq->sText, pReq->xPos, pReq->yPos,
					pReq->clrFont, 
					pReq->bMirrorX,
					pReq->bMirrorY,
					pReq->fZRotate,
					pReq->btTransparency,
					pReq->bUseKerning,
					pReq->bUnderline);
	}
	
}
Beispiel #2
0
void ImProxy::readyRead(s8 *buf, u32 len)
{
	for (s8 *end = buf + len; buf < end && MSG(buf)->len && MSG(buf)->len <= (end - buf); buf += MSG(buf)->len) {
		if (mMsgWaitState == WaitingMessage && mMsgWaitType == MSG(buf)->type) mMsgWaitState = GotMessage;
		if (!mConnected && MSG(buf)->type != Connect) continue;

		switch (MSG(buf)->type) {
		case Connect:
			mConnected = true;
			mRawInput = MSG(buf)->raw;

			sendInfo();
			break;

		case PutText:
			if (MSG(buf)->len > OFFSET(Message, texts)) {
				mShell->imInput(MSG(buf)->texts, MSG(buf)->len - OFFSET(Message, texts));
			}
			break;

		case SetWin:
			if (MSG(buf)->len == sizeof(Message)) { // keep compatibility with v1.5
				setImWin(MSG(buf)->win.winid, MSG(buf)->win.rect);
			}
			sendAckWin();
			break;

		case FillRect:
			if (addWinMsg(MSG(buf)) && FbShellManager::instance()->activeShell() == mShell) {
				doFillRect(MSG(buf));
			}
			break;

		case DrawText:
			if (addWinMsg(MSG(buf)) && FbShellManager::instance()->activeShell() == mShell) {
				doDrawText(MSG(buf));
			}
			break;

		case Ping:
			sendAckPing();
			break;

		default:
			break;
		}
	}
}
Beispiel #3
0
void ImProxy::redrawImWin(const Rectangle &rect)
{
	for (u32 num = mValidWinNum, i = 0; num && i < NR_IM_WINS; i++) {
		if (!mWins[i].w || !mWins[i].h) continue;
		num--;

		IntersectState state = intersectRectangles(rect, mWins[i]);
		if (state == Outside) continue;

		for (MsgList::iterator it = mWinMsgs[i].begin(); it != mWinMsgs[i].end(); it++) {
			Message *m = *it;

			if (m->type == FillRect) doFillRect(m);
			else if (m->type == DrawText) doDrawText(m);
		}
	}
}