Example #1
0
        public void Init()
        {
            if (NativeApp != null)
            {
                throw new InvalidOperationException("Application was already initialized.");
            }

            if (X11Application.IsAvailable())
            {
                NativeApp = new X11Application();
            }
            else if (Win32Application.IsAvailable())
            {
                NativeApp = new Win32Application();
            }
            else
            {
                throw new InvalidOperationException("Cannot determine a suitable API.");
            }

            NativeApp.Init();

            Graphics   = new NGraphics(NativeApp.Graphics);
            ImageCodec = new NImageCodec(NativeApp.ImageCodec);
            Clipboard  = new NClipboard(NativeApp.Clipboard);
        }
Example #2
0
 internal NImage(NImageCodec codec, INativeImage nativeImage)
 {
     Codec       = codec;
     NativeImage = nativeImage;
 }