本文整理汇总了C++中Pen::SetColor方法的典型用法代码示例。如果您正苦于以下问题:C++ Pen::SetColor方法的具体用法?C++ Pen::SetColor怎么用?C++ Pen::SetColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pen
的用法示例。
在下文中一共展示了Pen::SetColor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: draw
VOID Button::draw(Graphics *pGraphics, Pen &rPen, SolidBrush &rBrush, CONST Font &/*rFont*/) const
{
rPen.SetColor(Color(5, 159, 225));
rPen.SetWidth(3);
rBrush.SetColor(Color(255, 125, 34));
pGraphics->DrawRectangle(&rPen, RECT2Rect());
//graphics->DrawString(text_.c_str(), text_.length(), &font, PointF(RECT2RectF().GetLeft(), RECT2RectF().GetTop()), &brush);
}
示例2: draw
VOID vec::draw(double x0, double y0, Graphics *graphics, Pen &rPen, CONST Color &rColor /* = Color::Yellow */) const
{
rPen.SetColor(rColor);
rPen.SetWidth(2);
graphics->DrawLine(&rPen, Point(static_cast<INT>(x0 ), static_cast<INT>( y0)), Point(static_cast<INT>(x0 + x_), static_cast<INT>(y_ + y0)));
graphics->DrawLine(&rPen, Point(static_cast<INT>(x0 + x_), static_cast<INT>(y_ + y0)), Point(static_cast<INT>(x0 + x_ - ((l_ < 0)? -1 : 1) * 5 * cos(k_ + M_PI_4)), static_cast<INT>(y_ + y0 - ((l_ < 0)? -1 : 1) * 5 * sin(k_ + M_PI_4))));
graphics->DrawLine(&rPen, Point(static_cast<INT>(x0 + x_), static_cast<INT>(y_ + y0)), Point(static_cast<INT>(x0 + x_ - ((l_ < 0)? -1 : 1) * 5 * cos(k_ - M_PI_4)), static_cast<INT>(y_ + y0 - ((l_ < 0)? -1 : 1) * 5 * sin(k_ - M_PI_4))));
l_ = sqrt(x_ * x_ + y_ * y_);
k_ = atan_(x_, y_);
}
示例3: draw
VOID Cue::draw(Graphics *pGraphics, Pen &rPen, Image &rCue) const
{
auxiliaryLine_.draw((ball_ - auxiliaryLine_).getX(), (ball_ - auxiliaryLine_).getY(), pGraphics, rPen, static_cast<ARGB>(Color::Gray));
rPen.SetColor(static_cast<ARGB>(Color::Gray));
rPen.SetWidth(3);
pGraphics->DrawEllipse(&rPen, static_cast<INT>(mouse_.getX() - RShari), static_cast<INT>(mouse_.getY() - RShari), RShari * 2, RShari * 2);
pGraphics->TranslateTransform(static_cast<REAL>(ball_.getX()), static_cast<REAL>(ball_.getY()));
pGraphics->RotateTransform(angle_);
ImageAttributes imAttr;
imAttr.SetColorKey(COLOR_KEY, COLOR_KEY);
pGraphics->DrawImage(&rCue, Rect(static_cast<INT>(-884 - force_ * 8), static_cast<INT>(-20 / 2), 884 * 2, 20), 0, 0, 884 * 2, 20, Unit::UnitPixel, &imAttr, 0);
pGraphics->ResetTransform();
}