yanweiyuan3
2023-10-27 d1d15b61dfcf7fd0f800b32359f082cf580ed556
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Quintiq file version 2.0
#parent: #root
Method DrawScenarioSummary (
  internal[Surface] surface,
  ScenarioSummary object,
  Number xpos,
  Number ypos,
  Number width,
  Number height,
  Number height2,
  String fonttype,
  Number fontsize
) id:Method_FormScenarioSummary_DrawScenarioSummary
{
  #keys: '[136682.0.1857638181]'
  Body:
  [*
    ypos2:= ypos + height;
    font := FontSpecification::Construct( fonttype, fontsize );
    pen := PenSpecification::Construct( Color::Black() );
    
    textFormat := TextFormat::Construct( TextFormat::AlignCenter(),
                                         TextFormat::AlignMiddle(),
                                         TextFormat::WrapWords() );
    
    
    textFormat := textFormat.AlignMiddle().AlignCenter().NoEndEllipsis();
    
    surface.TextColor( Color::GrayText() );
    surface.Rect( xpos, ypos, width, height )
    
    surface.Pen( pen );
    surface.Font( font );
    surface.TextZoom( xpos, ypos, width, height, [String]object.GetValue(), textFormat );
    surface.Rect( xpos, ypos2, width, height2 )
    surface.Fill( xpos, ypos2, width, height2, Color::DarkBlue() );
    
    surface.TextColor( Color::White() );
    surface.TextZoom( xpos, ypos2, width, height2, object.Name(), textFormat );
  *]
  Declarative: true
}