bool IGraphics::DrawRotatedBitmap(IBitmap* pIBitmap, int destCtrX, int destCtrY, double angle, int yOffsetZeroDeg, const IChannelBlend* pBlend) { LICE_IBitmap* pLB = (LICE_IBitmap*) pIBitmap->mData; //double dA = angle * PI / 180.0; // Can't figure out what LICE_RotatedBlit is doing for irregular bitmaps exactly. //double w = (double) bitmap.W; //double h = (double) bitmap.H; //double sinA = fabs(sin(dA)); //double cosA = fabs(cos(dA)); //int W = int(h * sinA + w * cosA); //int H = int(h * cosA + w * sinA); int W = pIBitmap->W; int H = pIBitmap->H; int destX = destCtrX - W / 2; int destY = destCtrY - H / 2; _LICE::LICE_RotatedBlit(mDrawBitmap, pLB, destX, destY, W, H, 0.0f, 0.0f, (float) W, (float) H, (float) angle, false, LiceWeight(pBlend), LiceBlendMode(pBlend) | LICE_BLIT_FILTER_BILINEAR, 0.0f, (float) yOffsetZeroDeg); return true; }
bool IGraphics::FillIConvexPolygon(const IColor* pColor, int* x, int* y, int npoints, const IChannelBlend* pBlend) { _LICE::LICE_FillConvexPolygon(mDrawBitmap, x, y, npoints, LiceColor(pColor), LiceWeight(pBlend), LiceBlendMode(pBlend)); return true; }
bool IGraphics::FillTriangle(const IColor* pColor, int x1, int y1, int x2, int y2, int x3, int y3, IChannelBlend* pBlend) { _LICE::LICE_FillTriangle(mDrawBitmap, x1, y1, x2, y2, x3, y3, LiceColor(pColor), LiceWeight(pBlend), LiceBlendMode(pBlend)); return true; }
bool IGraphics::FillCircle(const IColor* pColor, int cx, int cy, float r, const IChannelBlend* pBlend, bool antiAlias) { _LICE::LICE_FillCircle(mDrawBitmap, (float) cx, (float) cy, r, LiceColor(pColor), LiceWeight(pBlend), LiceBlendMode(pBlend), antiAlias); return true; }
bool IGraphics::FillIRect(const IColor* pColor, IRECT* pR, const IChannelBlend* pBlend) { _LICE::LICE_FillRect(mDrawBitmap, pR->L, pR->T, pR->W(), pR->H(), LiceColor(pColor), LiceWeight(pBlend), LiceBlendMode(pBlend)); return true; }
bool IGraphics::RoundRect(const IColor* pColor, IRECT* pR, const IChannelBlend* pBlend, int cornerradius, bool aa) { _LICE::LICE_RoundRect(mDrawBitmap, (float) pR->L, (float) pR->T, (float) pR->W(), (float) pR->H(), cornerradius, LiceColor(pColor), LiceWeight(pBlend), LiceBlendMode(pBlend), aa); return true; }
bool IGraphics::DrawLine(const IColor* pColor, float x1, float y1, float x2, float y2, const IChannelBlend* pBlend, bool antiAlias) { _LICE::LICE_Line(mDrawBitmap, (int) x1, (int) y1, (int) x2, (int) y2, LiceColor(pColor), LiceWeight(pBlend), LiceBlendMode(pBlend), antiAlias); return true; }
bool IGraphicsLice::DrawCircle(const IColor* pColor, float cx, float cy, float r, const IChannelBlend* pBlend, bool antiAlias) { _LICE::LICE_Circle(mDrawBitmap, cx, cy, r, LiceColor(pColor), LiceWeight(pBlend), LiceBlendMode(pBlend), antiAlias); return true; }