本文整理汇总了C++中CWindowGc::SetPenSize方法的典型用法代码示例。如果您正苦于以下问题:C++ CWindowGc::SetPenSize方法的具体用法?C++ CWindowGc::SetPenSize怎么用?C++ CWindowGc::SetPenSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CWindowGc
的用法示例。
在下文中一共展示了CWindowGc::SetPenSize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DrawEyes
void CSmiley::DrawEyes(CWindowGc &aGc) const
{
// Draw the eyes
TPoint leftEye(iSmileyWidth / 3, iSmileyHeight / 3);
TPoint rightEye(iSmileyWidth * 2 / 3, iSmileyHeight / 3);
aGc.SetPenSize(TSize(5, 5));
aGc.Plot(iSmileyRect.iTl + leftEye);
aGc.Plot(iSmileyRect.iTl + rightEye);
}
示例2: DrawGrid
void CCalendarManagerContainer::DrawGrid(CWindowGc& gc, const TRect& aRect, const TRgb& p_Default_Grid_Color1) const
{
gc.SetPenColor(p_Default_Grid_Color1);
gc.SetPenSize(TSize(2, 2));
gc.DrawLine(TPoint(0, g_Pos_Y), TPoint(aRect.Width(), g_Pos_Y));
gc.SetPenSize(TSize(1, 1));
TInt i_Pos_X = g_Space_X;
for (TInt i = 0; i < 7; i++)
{
gc.DrawLine(TPoint(i_Pos_X, g_Pos_Y), TPoint(i_Pos_X, aRect.Height()));
i_Pos_X += g_Space_X + 1;
}
g_Pos_Y += 1;
TInt i_Pos_Y = g_Pos_Y;
for (TInt i = 0; i < 6; i++)
{
gc.DrawLine(TPoint(g_Space_X, i_Pos_Y), TPoint(aRect.Width(), i_Pos_Y));
i_Pos_Y += g_Space_Y + 2;
}
}
示例3: DrawEyebrow
void CSmiley::DrawEyebrow(CWindowGc & aGc, TBool bSmiling) const
{
//Draw the mouth, smiling or looking sad.
aGc.SetPenSize(TSize(1, 1));
aGc.SetPenColor(KRgbWhite);
if (bSmiling)
{
aGc.DrawArc(iFrownRect,
iFrownRect.iTl + TPoint(iSmileyWidth / 2, iFrownRect.Height() / 2),
iFrownRect.iTl + TPoint(0, iFrownRect.Height() / 2));
}
else
{
aGc.DrawArc(iSmileRect,
iSmileRect.iTl + TPoint(0, iSmileRect.Height() / 2),
iSmileRect.iTl + TPoint(iSmileyWidth / 2, iSmileRect.Height() / 2));
}
}
示例4: HandlePointerMoveBufferReady
void CMainWindow::HandlePointerMoveBufferReady()
{
TPoint pnts[KPointerMoveBufferSize];
TPtr8 ptr((TUint8 *) &pnts, sizeof(pnts));
TInt numPnts = Window().RetrievePointerMoveBuffer(ptr);
TRect redrawRect(Window().Position(), Window().Size());
CWindowGc* gc = SystemGc();
gc->Activate(Window());
gc->SetPenColor(KRgbBlue);
gc->SetPenSize(TSize(2, 2));
Window().Invalidate();
Window().BeginRedraw(redrawRect); // N.B. Redrawer::RunL() gets called with this
// rectangle - must give it a non-zero value
for (TInt index = 0; index < numPnts; index++)
{
gc->DrawLineTo(pnts[index]);
}
Window().EndRedraw();
gc->Deactivate();
}