Esempio n. 1
0
 public mainWindow()
 {
     InitializeComponent();
     PythonPathBox.Text = loadConfig();
     karnaughCnt        = new KarnaughGraphControl();
     karnaughCnt.Width  = this.mainSplitContainer.Panel2.Width;
     karnaughCnt.Height = this.mainSplitContainer.Panel2.Height;
     this.mainSplitContainer.Panel2.Controls.Add(karnaughCnt);
     statusLabel.Text = "準備完了";
 }
        public KarnaughGraphDraw(KarnaughGraphControl target)
        {
            this.width  = target.Width;
            this.height = target.Height;

            var hwnd = new HwndRenderTargetProperties();

            hwnd.Hwnd      = target.Handle;
            hwnd.PixelSize = new Size2(this.width, this.height);

            this.fact   = new SharpDX.Direct2D1.Factory();
            render      = new SharpDX.Direct2D1.WindowRenderTarget(this.fact, new RenderTargetProperties(), hwnd);
            this.target = target;

            //いろいろ設定
            LineColor  = new SharpDX.Direct2D1.SolidColorBrush(render, new RawColor4(1f, 1f, 1f, 1f));
            background = new RawColor4(0.3f, 0.3f, 0.3f, 0f);
        }