//----------------------------------------------------------------------------- CGraphicsPath* CDrawContext::createRoundRectGraphicsPath (const CRect& size, CCoord radius) { CGraphicsPath* path = createGraphicsPath (); if (path) { path->addRoundRect (size, radius); } return path; }
/* * Class: org_apache_harmony_awt_gl_windows_WinGDIPGraphics2D * Method: fillShape * Signature: (J[FI)V */ JNIEXPORT void JNICALL Java_org_apache_harmony_awt_gl_windows_WinGDIPGraphics2D_fillShape (JNIEnv *env, jobject obj, jlong gip, jfloatArray jpath, jint len, jint winding) { GraphicsInfo *gi = (GraphicsInfo *)gip; GraphicsPath *path = createGraphicsPath(env, jpath, len, winding); gi->graphics->FillPath(gi->brush, path); delete path; }
//----------------------------------------------------------------------------- void D2DDrawContext::drawArc (const CRect& _rect, const float _startAngle, const float _endAngle, const CDrawStyle drawStyle) { CGraphicsPath* path = createGraphicsPath (); if (path) { path->addArc (_rect, _startAngle, _endAngle, false); if (drawStyle == kDrawFilled || drawStyle == kDrawFilledAndStroked) drawGraphicsPath (path, kPathFilled); if (drawStyle == kDrawStroked || drawStyle == kDrawFilledAndStroked) drawGraphicsPath (path, kPathStroked); path->forget (); } }