Exemple #1
0
        public static GBitmap Rotate(GBitmap image, int Angle)
        {
            Bitmap   BM = new Bitmap(image.Width, image.Height);
            Graphics g  = Graphics.FromImage(BM);

            g.TranslateTransform((float)BM.Width / 2, (float)BM.Height / 2);
            g.RotateTransform((float)Angle);
            g.TranslateTransform(-(float)BM.Width / 2, -(float)BM.Height / 2);
            g.InterpolationMode = InterpolationMode.HighQualityBicubic;
            g.DrawImage(image.GetFullImage(), new Point(0, 0));
            g.Dispose();

            return(new GBitmap(BM));
        }
 public void Blit(GBitmap source, int x, int y)
 {
     Blit(source.GetFullImage(), x, y);
 }