سلام
یه پروژه هست
من تا اینجا پیش رفتم که ستاره رو میکشه + یه مربع وسطش برای انتقال و دوران و بزرگ نمایی
Star.png
برای انتقال و دوران و بزرگنماییش به مشکل خوردم.
ممنون میشم کسی کمک کنه
اینم کد :
کد HTML:
public Form1()
        {
            InitializeComponent();
            this.Paint += new PaintEventHandler(Form1_Paint);
            //System.Drawing.Pen myPen;
            //myPen = new System.Drawing.Pen(System.Drawing.Color.Red);
            //System.Drawing.Graphics formGraphics = this.CreateGraphics();
            //formGraphics.DrawLine(myPen, 0, 0, 200, 200);
        }

        static void drawFlag(Graphics g)
        {
            Point[] star ={
            new Point(0,-60),  new Point(11,-16),
            new Point(58,-16), new Point(18,6),
            new Point(40,41),  new Point(0,18),
            new Point(-40,41), new Point(-18,6),
            new Point(-48,-16),new Point(-11,-16)};
            Point[] starNormal ={
            new Point(0,-50),  new Point(11,-16),
            new Point(48,-16), new Point(18,6),
            new Point(30,41),  new Point(0,18),
            new Point(-30,41), new Point(-18,6),
            new Point(-48,-16),new Point(-11,-16)};
            ////g.FillRectangle(Brushes.Red, 0, 0, 200, 150);
            //g.TranslateTransform(100, 100);
            //g.FillPolygon(Brushes.Blue, star);
            g.TranslateTransform(150, 150);
            g.FillPolygon(Brushes.Blue, star);
            g.FillRectangle(Brushes.Red, 0, 0, 5, 5);
        }

        private void Form1_Paint(object sender, PaintEventArgs e)
        {
            System.Drawing.Graphics graphicsObj;

            graphicsObj = this.CreateGraphics();

            drawFlag(graphicsObj);
            //Pen myPen = new Pen(System.Drawing.Color.Green, 5);
            //Rectangle myRectangle = new Rectangle(20, 20, 250, 200);
            //graphicsObj.DrawEllipse(myPen, myRectangle);
        }

        private void Form1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (e.Location.X >= 100 && e.Location.X <= 104)
                MessageBox.Show(e.Location.X.ToString());
        }