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 DJ888, 04-16-2024, 06:09 PM
        6 responses
        18 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        1 view
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        6 views
        0 likes
        Last Post Javierw.ok  
        Started by timmbbo, Today, 08:59 AM
        2 responses
        10 views
        0 likes
        Last Post bltdavid  
        Started by alifarahani, Today, 09:40 AM
        6 responses
        41 views
        0 likes
        Last Post alifarahani  
        Working...
        X