![]() |
#2
追梦人zmrghy2022-07-23 13:03
|
只有本站会员才能查看附件,请 登录
只有本站会员才能查看附件,请 登录
只有本站会员才能查看附件,请 登录
只有本站会员才能查看附件,请 登录
只有本站会员才能查看附件,请 登录
只有本站会员才能查看附件,请 登录
只有本站会员才能查看附件,请 登录
只有本站会员才能查看附件,请 登录
只有本站会员才能查看附件,请 登录

private: Void draw_num_str(Point^ inpoint, int wide, int num)
{
Image^ drawimg = gcnew Bitmap(wide, wide);
Graphics^ g = Graphics::FromImage(drawimg);
SolidBrush^ MyBrush = gcnew SolidBrush(Color::Cyan);
g->FillRectangle(MyBrush, Rectangle(inpoint->X + wide / 20, inpoint->Y + wide / 20, (wide * 9) / 10, (wide * 9) / 10));
MyBrush->Color = Color::Black;
g->FillEllipse(MyBrush, Rectangle(inpoint->X + wide / 10, inpoint->Y + wide / 10, (wide * 4) / 5, (wide * 4) / 5));
MyBrush->Color = Color::Cyan;
/*-----------------------------------------------
此处是 DrawString 绘制数字,字符串的地方
6个 DrawString 函数,应该使用哪一个。
实现,如图效果,代码应该如何写。。。。
------------------------------------------------*/
this->pictureBox1->Image = drawimg;
}
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
{
draw_num_str(Point(0, 0), 200, 9999);
}
{
Image^ drawimg = gcnew Bitmap(wide, wide);
Graphics^ g = Graphics::FromImage(drawimg);
SolidBrush^ MyBrush = gcnew SolidBrush(Color::Cyan);
g->FillRectangle(MyBrush, Rectangle(inpoint->X + wide / 20, inpoint->Y + wide / 20, (wide * 9) / 10, (wide * 9) / 10));
MyBrush->Color = Color::Black;
g->FillEllipse(MyBrush, Rectangle(inpoint->X + wide / 10, inpoint->Y + wide / 10, (wide * 4) / 5, (wide * 4) / 5));
MyBrush->Color = Color::Cyan;
/*-----------------------------------------------
此处是 DrawString 绘制数字,字符串的地方
6个 DrawString 函数,应该使用哪一个。
实现,如图效果,代码应该如何写。。。。
------------------------------------------------*/
this->pictureBox1->Image = drawimg;
}
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
{
draw_num_str(Point(0, 0), 200, 9999);
}
DrawString 函数, 如何输出如图效果。。。。。
6个 DrawString 函数,应该使用哪一个。
实现,如图效果,代码应该如何写。。。。
[此贴子已经被作者于2022-7-22 20:45编辑过]