Пример #1
0
        private d2.Bitmap1 CreateBitmap(int width, int height, d2.BitmapOptions options, d2.PixelFormat?pixelFormat = null)
        {
            // create the d2d bitmap description and 96 DPI
            var d2dBitmapProps = new d2.BitmapProperties1(pixelFormat ?? d2PixelFormat, 96, 96, options);

            return(new d2.Bitmap1(d2dContext, new Size2(width, height), d2dBitmapProps));
        }
Пример #2
0
        private ISurface CreateSurface(int width, int height, d2.BitmapOptions options)
        {
            var bitmap = CreateBitmap(width, height, options);

            return(new CSurface(this, bitmap));
        }