Quintiq file version 2.0
#parent: CustomDrawRC/CustomDrawDataLayerOperationOutput
Response OnDrawObject (
  OperationOutput object
) id:Response_CustomDrawRC_CustomDrawDataLayerOperationOutput_OnDrawObject
{
  #keys: '[139394.0.1290777474]'
  CanBindMultiple: false
  DefinitionID: 'Responsedef_WebCustomDrawDataLayer_OnDrawObject'
  QuillAction
  {
    Body:
    [*
      // Draw operation output
      
      //Initialize borders
      surface.Pen().Style( PenSpecification::StyleSolid() );
      surface.Pen().Width( 1 )
      surface.Pen().Color( ColorScheme.RoutingConfigurator_RoutingOutline() );
      
      colorstart := ColorScheme.RoutingConfigurator_OperationInputOutputFromColor();
      colorend := ColorScheme.RoutingConfigurator_OperationInputOutputToColor();
      
      // Set color to black if operation is being disabled
      if( not object.Operation().IsEnabled() )
      {
        colorstart := ColorScheme.RoutingConfigurator_Disabled();
        colorend := ColorScheme.RoutingConfigurator_Disabled();
      }
      else if( object.IsFloating() )
      {
        colorstart := ColorScheme.RoutingConfigurator_FloatingProduct();
        colorend := ColorScheme.RoutingConfigurator_FloatingProduct();
      }
      
      surface.Brush().LinearGradient( region.BoundingRect(), colorstart, colorend, 0.0 )
      surface.Fill( region.Shape() );
      surface.Rect( region.BoundingRect().Left(), region.BoundingRect().Top(), 
                    region.BoundingRect().Width(), region.BoundingRect().Height(), ColorScheme.RoutingConfigurator_RoutingOutline() );  
        
      //Initialize text
      rcv := MacroPlan.RoutingConfiguratorView();
      surface.Font().Name( rcv.FontName() );
      surface.Font().Size( rcv.FontSize() );
      surface.TextColor( Color::Black() );
      
      textformat := TextFormat::Construct( TextFormat::AlignCenter(), TextFormat::AlignMiddle() );
      surface.TextZoom( region.BoundingRect(), text, textformat );
    *]
    GroupServerCalls: false
  }
}
