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) ); }
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; }
void po::drawTexturedRect(poTexture *tex, poRect rect) { drawTexturedRect(tex, rect, poRect(0,0,1,1)); }
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)); }
void po::drawTexturedRect(poTexture *tex) { drawTexturedRect(tex, poRect(0,0,tex->getWidth(),tex->getHeight()), poRect(0,0,1,1)); }
void TestObj::draw() { po::setColor(poColor::red); po::drawFilledRect(poRect(0, 0, 200, 200)); }