Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Graphics2D"/> class.
        /// </summary>
        /// <param name="device">The hardware device which is used for rendering.</param>
        /// <param name="renderTarget">The render target which is used by this graphics object.</param>
        /// <param name="screenSize">The size of the screen in device independent pixels.</param>
        internal Graphics2D(EngineDevice device, D2D.ID2D1RenderTarget renderTarget, SizeF screenSize)
        {
            _transformSettings  = Graphics2DTransformSettings.Default;
            this.TransformStack = new Matrix3x2Stack();

            this.Device          = device;
            _renderTarget        = renderTarget;
            this.ScreenPixelSize = screenSize;
            _deviceContext       = (D2D.ID2D1DeviceContext)_renderTarget;

            this.Internals = new Graphics2DInternals(this);
        }
Esempio n. 2
0
 public void SetRenderTarget(Direct2D1.ID2D1DeviceContext renderTarget)
 {
     _renderTarget = renderTarget;
 }