• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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(Core.Globals.D2DFactory);
             SharpDX.Direct2D1.GeometrySink sink1 = geo1.Open();
             sink1.BeginFigure(p0.ToVector2(), SharpDX.Direct2D1.FigureBegin.Filled);
             sink1.AddLines(vectors);
             sink1.EndFigure(SharpDX.Direct2D1.FigureEnd.Closed);
             sink1.Close();
    
             RenderTarget.DrawGeometry(geo1, linebrush);
    	 RenderTarget.FillGeometry(geo1, linebrush);
              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 ajay8000, Yesterday, 11:31 PM
        4 responses
        14 views
        0 likes
        Last Post ajay8000  
        Started by simjs, Yesterday, 11:23 PM
        0 responses
        5 views
        0 likes
        Last Post simjs
        by simjs
         
        Started by akuntysh, Yesterday, 10:41 PM
        0 responses
        4 views
        0 likes
        Last Post akuntysh  
        Started by Wolf1, Yesterday, 08:26 PM
        0 responses
        7 views
        0 likes
        Last Post Wolf1
        by Wolf1
         
        Started by pparmley, Yesterday, 04:30 PM
        0 responses
        9 views
        0 likes
        Last Post pparmley  
        Working...
        X