Last change
on this file since 13949 was
12762,
checked in by aballeit, 9 years ago
|
#2283 GUI updates, Tree-chart, MCTS Version 2 (prune leaves)
|
File size:
1.3 KB
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Linq;
|
---|
3 | using System.Text;
|
---|
4 | using System.Collections.Generic;
|
---|
5 |
|
---|
6 | using System.Windows;
|
---|
7 | using System.Windows.Media;
|
---|
8 |
|
---|
9 | namespace SharpVectors.Renderers.Texts
|
---|
10 | {
|
---|
11 | public struct WpfTextStringFormat
|
---|
12 | {
|
---|
13 | public FlowDirection Direction;
|
---|
14 | public TextTrimming Trimming;
|
---|
15 | //public TextAlignment Alignment;
|
---|
16 | public WpfTextAnchor Anchor;
|
---|
17 |
|
---|
18 | public WpfTextStringFormat(FlowDirection direction, TextTrimming trimming,
|
---|
19 | WpfTextAnchor anchor)
|
---|
20 | {
|
---|
21 | this.Direction = direction;
|
---|
22 | this.Trimming = trimming;
|
---|
23 | this.Anchor = anchor;
|
---|
24 | }
|
---|
25 |
|
---|
26 | public TextAlignment Alignment
|
---|
27 | {
|
---|
28 | get
|
---|
29 | {
|
---|
30 | if (Anchor == WpfTextAnchor.Middle)
|
---|
31 | {
|
---|
32 | return TextAlignment.Center;
|
---|
33 | }
|
---|
34 | if (Anchor == WpfTextAnchor.End)
|
---|
35 | {
|
---|
36 | return TextAlignment.Right;
|
---|
37 | }
|
---|
38 |
|
---|
39 | return TextAlignment.Left;
|
---|
40 | }
|
---|
41 | }
|
---|
42 |
|
---|
43 | public static WpfTextStringFormat Default
|
---|
44 | {
|
---|
45 | get
|
---|
46 | {
|
---|
47 | return new WpfTextStringFormat(FlowDirection.LeftToRight,
|
---|
48 | TextTrimming.None, WpfTextAnchor.Start);
|
---|
49 | }
|
---|
50 | }
|
---|
51 | }
|
---|
52 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.