Quintiq file version 2.0
#parent: CustomDrawComponent/CustomDrawDataLayerLaneLegEdge
Response OnDrawObject (
  LaneLegEdge object
) id:Response_CustomDrawComponent_CustomDrawDataLayerLaneLegEdge_OnDrawObject
{
  #keys: '[110880.4.1287168770]'
  Body:
  [*
    // Draw LLE
    
    // draw line
    minx := minvalue ( object.FromX(), object.ToX() );
    miny := minvalue ( object.FromY(), object.ToY() );
    
    // region always starts at 0,0
    adjustX := 0 - minx;
    adjustY := 0 - miny;
    
    color := Color::Color( ColorScheme.LaneLeg(), 0.5 );
                  
    surface.Pen().Color( color ); 
    surface.Pen().Style( PenSpecification::StyleDashed() );
    surface.Pen().Width( 1 );
    surface.Brush().Color( color ); // to paint the solid arrowhead
    
    line := GraphicalLine::LineTo( object.FromX() + adjustX, object.FromY() + adjustY, object.ToX() + adjustX, object.ToY() + adjustY );
    line.ArrowToEnd( true ).ArrowPos( GraphicalLine::ArrowPosMiddle() );
    
    surface.Draw( line );
  *]
  DefinitionID: 'Responsedef_CustomDrawDataLayer_OnDrawObject'
  Precondition:
  [*
    cond := MacroPlan::HasMacroPlan( MacroPlan, feedback )
          and not isnull( DataHolderView.Data() )
    return cond;
  *]
}
