Quintiq file version 2.0
#parent: CustomDrawComponentRoutingConfigurator/CustomDrawDataLayerOperationOutput
Response OnDrawObject (
  OperationOutput object
) id:Response_CustomDrawComponentRoutingConfigurator_CustomDrawDataLayerOperationOutput_OnDrawObject_481
{
  #keys: '[124808.0.1223414352]'
  Body:
  [*
    // Draw operation output
    
    //Initialize borders
    surface.Pen().Style( PenSpecification::StyleSolid() );
    surface.Pen().Width( 1 )
    surface.Pen().Color( ColorScheme.Outline() );
    
    colorstart := ColorScheme.RoutingConfigurator_OperationInputOutput1();
    colorend := ColorScheme.RoutingConfigurator_OperationInputOutput2();
    
    // Set color to black if operation is being disabled
    if( not object.Operation().IsEnabled() )
    {
      colorstart := ColorScheme.RoutingConfiguratorDisabled_InputOutput();
      colorend := ColorScheme.RoutingConfiguratorDisabled_InputOutput();
    }
    else if( object.IsFloating() )
    {
      colorstart := ColorScheme.RoutingConfigurator_FloatingProduct();
      colorend := ColorScheme.RoutingConfigurator_FloatingProduct();
    }
    
    surface.Brush().LinearGradient( region, colorstart, colorend, 0.0 )
    surface.Fill( region );
    surface.Rect( region.Left(), region.Top(), region.Width(), region.Height(), Color::Black() );  
      
    //Initialize text
    rcv := DataHolderRCView.Data();
    surface.Font().Name( rcv.FontName() );
    surface.Font().Size( rcv.FontSize() );
    surface.TextColor( Color::Black() );
    
    textformat := TextFormat::Construct( TextFormat::AlignCenter(), TextFormat::AlignMiddle() );
    surface.Text( region, text, textformat );
  *]
  CanBindMultiple: false
  DefinitionID: 'Responsedef_CustomDrawDataLayer_OnDrawObject'
  Precondition:
  [*
    return not isnull( DataHolderRCView.Data() )
  *]
}
