本文整理汇总了C++中CFX_Path::AddArc方法的典型用法代码示例。如果您正苦于以下问题:C++ CFX_Path::AddArc方法的具体用法?C++ CFX_Path::AddArc怎么用?C++ CFX_Path::AddArc使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFX_Path
的用法示例。
在下文中一共展示了CFX_Path::AddArc方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rtInner
void CFWL_WidgetTP::Draw3DCircle(CFX_Graphics* pGraphics,
FWLTHEME_EDGE eType,
FX_FLOAT fWidth,
const CFX_RectF* pRect,
FX_ARGB cr1,
FX_ARGB cr2,
FX_ARGB cr3,
FX_ARGB cr4,
CFX_Matrix* pMatrix) {
if (!pGraphics)
return;
if (!pRect)
return;
pGraphics->SaveGraphState();
CFX_Path path;
path.Create();
path.AddArc(pRect->left, pRect->top, pRect->width, pRect->height,
FWLTHEME_PI * 3 / 4, FWLTHEME_PI);
CFX_Color crFill1(eType == FWLTHEME_EDGE_Raised ? cr4 : cr1);
pGraphics->SetStrokeColor(&crFill1);
pGraphics->StrokePath(&path, pMatrix);
CFX_RectF rtInner(*pRect);
rtInner.Deflate(pRect->width / 4, pRect->height / 4);
path.Clear();
path.AddArc(rtInner.left, rtInner.top, rtInner.width, rtInner.height,
FWLTHEME_PI * 3 / 4, FWLTHEME_PI);
CFX_Color crFill2(eType == FWLTHEME_EDGE_Raised ? cr3 : cr2);
pGraphics->SetStrokeColor(&crFill2);
pGraphics->StrokePath(&path, pMatrix);
path.Clear();
path.AddArc(pRect->left, pRect->top, pRect->width, pRect->height,
FWLTHEME_PI * 7 / 4, FWLTHEME_PI);
CFX_Color crFill3(eType == FWLTHEME_EDGE_Raised ? cr1 : cr3);
pGraphics->SetStrokeColor(&crFill3);
pGraphics->StrokePath(&path, pMatrix);
path.AddArc(rtInner.left, rtInner.top, rtInner.width, rtInner.height,
FWLTHEME_PI * 7 / 4, FWLTHEME_PI);
CFX_Color crFill4(eType == FWLTHEME_EDGE_Raised ? cr2 : cr4);
pGraphics->SetStrokeColor(&crFill4);
pGraphics->StrokePath(&path, pMatrix);
pGraphics->RestoreGraphState();
}