Ejemplo n.º 1
0
        protected internal override void Draw(RenderTarget renderTarget)
        {
            DrawingStateBlock stateBlock = d2DFactory.CreateDrawingStateBlock();
            renderTarget.SaveDrawingState(stateBlock);
            renderTarget.SetTextRenderingParams(RenderingParams);

            if (Options.HasValue)
            {
                renderTarget.DrawTextLayout(
                    Point0, TextLayout, FillBrush, Options.Value);
            }
            else
                renderTarget.DrawTextLayout(
                    Point0, TextLayout, FillBrush);
            renderTarget.RestoreDrawingState(stateBlock);
            stateBlock.Dispose();
        }