Пример #1
0
        /// <summary>
        /// Called to prepare the Direct2D graphics device for drawing, including clearing the back buffer
        /// render target and initializing the Transform property of the D2dGraphics instance.</summary>
        protected virtual void OnBeginDrawD2d()
        {
            D2dGraphics.BeginDraw();
            ITransformAdapter xform = this.As <ITransformAdapter>();

            D2dGraphics.Transform = xform == null ? Matrix3x2F.Identity : xform.Transform;
            D2dGraphics.Clear(BackColor);
            D2dGraphics.AntialiasMode = D2dAntialiasMode.Aliased;
        }