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 Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        672 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        379 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        111 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        575 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        582 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X