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
}
