示例#1
0
        internal Bitmap GetRectangleFromActiveTemplateBitmap(float x, float y, float w, float h)
        {
            Rectangle r = new Rectangle(0, 0, ActiveTemplateBitmap.Width, ActiveTemplateBitmap.Height);

            r.Intersect(new Rectangle((int)x, (int)y, (int)w, (int)h));
            return(ActiveTemplateBitmap.Clone(r, System.Drawing.Imaging.PixelFormat.Undefined));
            //return ImageRoutines.GetCopy(ActiveTemplateBitmap, new RectangleF(x, y, w, h));
        }
示例#2
0
        internal Bitmap GetRectangleFromActiveTemplateBitmap(float x, float y, float w, float h)
        {
            Rectangle r = new Rectangle(0, 0, ActiveTemplateBitmap.Width, ActiveTemplateBitmap.Height);

            r.Intersect(new Rectangle((int)x, (int)y, (int)w, (int)h));
            if (r.Width < 1 || r.Height < 1)
            {
                return(null);
            }
            return(ActiveTemplateBitmap.Clone(r, ActiveTemplateBitmap.PixelFormat));
            //return Cliver.Win.ImageRoutines.GetCopy(ActiveTemplateBitmap, r);
        }
示例#3
0
 public Color GetColor(float x, float y)
 {
     return(ActiveTemplateBitmap.GetPixel((int)Math.Round(x / Settings.Constants.Image2PdfResolutionRatio), (int)Math.Round(y / Settings.Constants.Image2PdfResolutionRatio)));
 }