コード例 #1
0
 protected override void DrawOntoOutputTarget(WicRenderTarget target)
 {
     foreach (var text in ItemArray)
     {
         var location = ImagePlacement[text.Key];
         var t        = text.Value;
         using (var brush = new SolidColorBrush(target, t.Background))
             target.FillRectangle(location, brush);
         using (var brush = new SolidColorBrush(target, t.Foreground))
             target.DrawTextLayout(new Vector2(location.Left + text.Value.Padding.X, location.Top + text.Value.Padding.Y),
                                   t.TextLayout, brush, DrawTextOptions.None);
     }
 }