//Draw to renderer void Sprite_Subimage::Draw(Renderer* renderer,const Pointf& point) { renderer->DrawTextureRegion(texturePage.get(),tex_x,tex_y,tex_width,tex_height,(int)point.X(),(int)point.Y(),width,height); }
void QTRenderer::SetClipRect(const Pointf& point, const Sizef& size) { painter->setClipRect(point.X(),point.Y(),size.W(),size.H()); }
void QTRenderer::DrawLine(const Pointf& p1, const Pointf& p2) { painter->drawLine((int)p1.X(),(int)p1.Y(),(int)p2.X(),(int)p2.Y()); }
void QTRenderer::DrawRectangle(const Pointf& point, const Sizef& size, const Color& outlineColor, float thickness) { QPen p(QColor(outlineColor.R(),outlineColor.G(),outlineColor.B(),outlineColor.A())); p.setWidth((int)thickness); painter->setPen(p); painter->drawRect(point.X(),point.Y(),size.W(),size.H()); }
void QTRenderer::DrawFilledRectangle(const Pointf& point, const Sizef& size, const Color& fillColor) { painter->fillRect(point.X(),point.Y(),size.W(),size.H(),QBrush(QColor(fillColor.R(),fillColor.G(),fillColor.B(),fillColor.A()))); }
void QTRenderer::Translate(const Pointf& point) { painter->translate(point.X(),point.Y()); }