Beispiel #1
0
void    smImage::fastDraw( float x, float y )
{
    // replace the image data int the texture
    imageAsTexture->replace( imageData );
    // draw the texture
    po::drawTexturedRect( imageAsTexture, poRect(x+0,y+height,width,-height) );
}
Beispiel #2
0
poWindow* applicationCreateWindow(uint uid, poWindowType type, const char* name, int x, int y, int w, int h) {
	if(window != NULL) {
		printf("only one window please!!\n");
		return window;
	}

	//createWindow((LPWSTR)name, w, h);
	createWindow((LPTSTR)L"pocodeApp", w, h);

	po::initGraphics();

	window = new poWindow(name,uid,poRect(x,y,w,h));

	RECT rcClient, rcWind;
	POINT ptDiff;
	GetClientRect(hwnd, &rcClient);
	GetWindowRect(hwnd, &rcWind);
	ptDiff.x = (rcWind.right - rcWind.left) - rcClient.right;
	ptDiff.y = (rcWind.bottom - rcWind.top) - rcClient.bottom;
	MoveWindow(hwnd,rcWind.left, rcWind.top, w + ptDiff.x, h + ptDiff.y, TRUE);

	window->setWindowHandle(hwnd);

	SetWindowLongPtr(hwnd,GWL_USERDATA,(LONG)window);

	return window;
}
Beispiel #3
0
void po::drawTexturedRect(poTexture *tex, poRect rect) {
	drawTexturedRect(tex, rect, poRect(0,0,1,1));
}
Beispiel #4
0
void po::drawTexturedRect(poTexture *tex, float x, float y, float w, float h) {
	drawTexturedRect(tex, poRect(x,y,w,h), poRect(0,0,1,1));
}
Beispiel #5
0
void po::drawTexturedRect(poTexture *tex) {
	drawTexturedRect(tex, poRect(0,0,tex->getWidth(),tex->getHeight()), poRect(0,0,1,1));
}
Beispiel #6
0
void TestObj::draw() {
    po::setColor(poColor::red);
    po::drawFilledRect(poRect(0, 0, 200, 200));
}