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 wzgy0920, 04-20-2024, 06:09 PM
        2 responses
        26 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, 02-22-2024, 01:11 AM
        5 responses
        32 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, Yesterday, 09:53 PM
        2 responses
        49 views
        0 likes
        Last Post wzgy0920  
        Started by Kensonprib, 04-28-2021, 10:11 AM
        5 responses
        192 views
        0 likes
        Last Post Hasadafa  
        Started by GussJ, 03-04-2020, 03:11 PM
        11 responses
        3,234 views
        0 likes
        Last Post xiinteractive  
        Working...
        X