locked
WinRT Why applying ScaleTransform to Canvas with many shape is too slow . RRS feed

  • Question

  • Hi,guys.

    Now I'm developing a kind of drawing app.I put Polyline on canvas to draw drawing shape.

    When I put hundreds of Polylines on canvas,applying ScaleTransform become too slow.But why?I thought applying ScaleTransform uses GPU,isn't right?

    Questions are...

    1.Why ScaleTransform is too slow?I know I shoudn't put many framework element on visual tree,but ScaleTransform is too slow.What it does?Consume CPU power or GPU power much?

    2.Setting big value to ScaleX or Y raises out of memory exception when available system memory is over 5G.Is the exception of GPU memory?

    3.Please advice me if there is better approach than usin Polyline.I wanna use DrawingVisual but WinRt doesn't have...

    https://skydrive.live.com/redir?resid=71B440F382D67DA6!13198


    This is a sample app to check ScaleTransform performance.There are some controls on the top,they are num of shapes,num of points for each shape,generate shapes,use PathGeometry or PolyLine,use PathGeometry with multi PolyLineSegments,minimum of ScaleTransform,maximum of ScaleTransform.

    After generating shapes, moving mouse with left button pressing changes ScaleTransform between minimum and maximum set by controls above.


    Regards


    cyclops


    • Edited by cyclops2 Friday, September 13, 2013 5:40 AM
    Friday, September 13, 2013 5:38 AM

Answers