Inheritance: ITextRenderer
Ejemplo n.º 1
0
 protected override void OnCreateDeviceResources(WindowRenderTarget renderTarget)
 {
     base.OnCreateDeviceResources(renderTarget);
     this._blackBrush = renderTarget.CreateSolidColorBrush(Color.FromKnown(Colors.Black, 1));
     using (Bitmap bitmap = renderTarget.CreateBitmap(this.GetType(), "flowers.jpg"))
     {
         this._bitmapBrush = renderTarget.CreateBitmapBrush(bitmap, new BitmapBrushProperties(ExtendMode.Wrap, ExtendMode.Wrap, BitmapInterpolationMode.NearestNeighbor), BrushProperties.Default);
     }
     _customRenderer = new CustomTextRenderer(this.Direct2DFactory, renderTarget, this._blackBrush, this._bitmapBrush);
 }
Ejemplo n.º 2
0
 protected override void OnCreateDeviceResources(WindowRenderTarget renderTarget)
 {
     base.OnCreateDeviceResources(renderTarget);
     this._blackBrush = renderTarget.CreateSolidColorBrush(Color.FromARGB(Colors.Black, 1));
     using (Bitmap bitmap = renderTarget.CreateBitmap(this.GetType(), "flowers.jpg"))
     {
         this._bitmapBrush = renderTarget.CreateBitmapBrush(bitmap, new BitmapBrushProperties(ExtendMode.Wrap, ExtendMode.Wrap, BitmapInterpolationMode.NearestNeighbor), BrushProperties.Default);
     }
     _customRenderer = new CustomTextRenderer(this.Direct2DFactory, renderTarget, this._blackBrush, this._bitmapBrush);
 }