Proszę o podrzucenie kodu, który na jakiejś bitmapie narysuje coś [choćby wykres sinusoidy]. Pozdrawiam
0
0
Proszę o podrzucenie kodu, który na jakiejś bitmapie narysuje coś
Połóż PictureBox
na formę.
private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e)
{
pictureBox1->Image = gcnew Bitmap(pictureBox1->Width, pictureBox1->Height);
Graphics ^g = Graphics::FromImage(pictureBox1->Image);
array<Point>
^tab1 = gcnew array<Point> {
Point(25,20), Point(20,20), Point(10,30),
Point(10,40), Point(20,50), Point(25,50),
},
^tab2 = gcnew array<Point> {
Point(75, 20), Point(60, 20),
Point(60, 35), Point(75, 35),
Point(75, 50), Point(60, 50)
};
g->Clear(Color::AliceBlue);
g->DrawLines(Pens::Red, tab1);
g->DrawEllipse(Pens::Red, 30, 20, 20, 30);
g->DrawLines(Pens::Red, tab2);
g->DrawLine(Pens::Red, 66, 23, 71, 13);
delete g;
}