xaml - WPF PathGeometry/RotateTransform optimization -


When I have performance issues while rendering / rotating WPF triangle

If I have a WPF It was a triangle and it would be rotated for some degree around a centepoint, I can do it in two ways:

  1. In the program backend, to determine the number and their offset For XAM, use bus space where they are on the canvas, they will look like this:

      & lt; Path stroke = "black" & gt; & Lt; Path.Data & gt; & Lt; PathGeometry & gt; & Lt; Pathfinder Starpoint = "{Binding Calculation Pointe, Mode = Options}" & gt; & Lt; LineSegment Point = "{Compulsive Calculation PointB, Mode = OneWay}" /> & Lt; LineSegment Point = "{Compulsive Calculation PointC, Mode = Options " /> & Lt; LineSegment Point = "{Binding Calculation Pointe, Mode = Options}" /> & Lt; / PathFigure & gt; & Lt; / PathGeometry & gt; & Lt; /Path.Data> & Lt; / Path & gt;  
  2. Generate the 'same' triangle each time, and then use it to place a rendering transformer where it is related. In this situation, rotation calculations are being ambiguous, because I have no access to use it.

      & lt; Path stroke = "black" & gt; & Lt; Path.Data & gt; & Lt; PathGeometry & gt; & Lt; Pathfinder startpoint = "{binding triangular, mode = wienz}" & gt; & Lt; LineSegment Point = "{Binding TriPointB, Mode = Options}" /> & Lt; LineSegment Point = "{Binding TriPointC, Mode = Options " /> & Lt; LineSegment Point = "{binding triangular one, mode = wienz}" /> & Lt; / PathFigure & gt; & Lt; / PathGeometry & gt; & Lt; /Path.Data> & Lt; Path.RenderTransform & gt; & Lt; RotateTransform CenterX = "{Binding Center. X, Mode = VanWebs}" Center Y = "{Binding Center. Y, Mode = Wienweis}" angle = "{Binding Orientation, Mode = Options}" /> & Lt; /Path.RenderTransform> & Lt; / Path & gt;  
  3. My question is, which is faster?

    I know that I should test myself, but how do I measure the render time of time? Objects with such granularity should be able to make time for me that the actual rendering time for the form is time, but since I do not want to kill that radra, I do not know how to capture the start time.

Have you tried using either the perforator or the visual profiler? With documentation, it looks like these tools should be able to get you the information you are looking for. You have to make your application in the first place, test with these tools, keep in mind the performance information, and then the second method is made to make it a second time.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -