Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

On Render

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    I'm trying to print the Ichimoku cloud and this code is the ticket I needed to figure it all out in
    WPF - the cloud perfectly matches the cloud in a similar chart in version 7 - all except for those annoying border lines on each bar I'm rendering. I suspect they're border lines since OnRender() paints each bar, one-by-one. Would you have any idea how to get rid of those lines?

    Thanks!
    Originally posted by Calonious View Post
    Try this code out -
    Code:
    	SharpDX.Direct2D1.Brush linebrush = myBrush.ToDxBrush(RenderTarget);
    		
    	Point p0 = new Point(100, 100);
    	Point p1 = new Point(100, 125);
    	Point p2 = new Point(200, 125);
    	Point p3 = new Point(200, 100);
    	SharpDX.Vector2[] vectors = new []  {p1.ToVector2(), p2.ToVector2(), p3.ToVector2() };
    
             SharpDX.Direct2D1.PathGeometry geo1 = new SharpDX.Direct2D1.PathGeometry([B]Core.Globals.D2DFactory[/B]);
             SharpDX.Direct2D1.GeometrySink sink1 = geo1.Open();
             sink1.BeginFigure(p0.ToVector2(), [B]SharpDX.Direct2D1.FigureBegin.Filled[/B]);
             sink1.AddLines(vectors);
             sink1.EndFigure([B]SharpDX.Direct2D1.FigureEnd.Closed[/B]);
             sink1.Close();
    
            [B] RenderTarget.DrawGeometry(geo1, linebrush);
    	 RenderTarget.FillGeometry(geo1, linebrush)[/B];
              geo1.Dispose();
              sink1.Dispose();
              linebrush.Dispose();
    Attached Files

    Comment


      #32
      Originally posted by traderpards View Post
      all except for those annoying border lines on each bar I'm rendering. Would you have any idea how to get rid of those lines?
      Try commenting out this line completely..

      //RenderTarget.DrawGeometry(geo1, linebrush);


      -=Edge=-
      NinjaTrader Ecosystem Vendor - High Tech Trading Analysis

      Comment


        #33
        And that did it!! Thank you very much!

        Originally posted by -=Edge=- View Post
        Try commenting out this line completely..

        //RenderTarget.DrawGeometry(geo1, linebrush);


        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Jonker, 04-27-2024, 01:19 PM
        3 responses
        23 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by businessman1929, 04-29-2024, 01:28 PM
        2 responses
        21 views
        0 likes
        Last Post businessman1929  
        Started by bltdavid, 03-27-2023, 05:32 AM
        18 responses
        347 views
        0 likes
        Last Post ETFVoyageur  
        Started by NM_eFe, Today, 05:15 PM
        0 responses
        5 views
        0 likes
        Last Post NM_eFe
        by NM_eFe
         
        Started by vitaly_p, Today, 05:09 PM
        0 responses
        7 views
        0 likes
        Last Post vitaly_p  
        Working...
        X