public StoryTextPainter(StoryTextEditorControl control)
 {
     m_control = control;
     D2dFactory.EnableResourceSharing(m_control.Handle);
     m_d2dGraphics = D2dFactory.CreateD2dHwndGraphics(m_control.Handle);
     CreateSharedResources();
 }
Beispiel #2
0
        public Canvas2d()
        {
            this.SetStyle(ControlStyles.AllPaintingInWmPaint
                          | ControlStyles.Opaque | ControlStyles.UserPaint, true);
            this.ResizeRedraw = true;

            m_d2dGraphics = D2dFactory.CreateD2dHwndGraphics(this.Handle);

            CreateSharedResources();
        }
Beispiel #3
0
        /// <summary>
        /// Constructor</summary>
        public D2dAdaptableControl()
        {
            DoubleBuffered = false;
            SetStyle(
                ControlStyles.ResizeRedraw |
                ControlStyles.AllPaintingInWmPaint |
                ControlStyles.Opaque |
                ControlStyles.UserPaint, true);

            // D2dHwndGraphics needs to be resized on size changed. Look at OnResize.
            m_d2dGraphics = D2dFactory.CreateD2dHwndGraphics(Handle);
        }