windows runtime - C# winrt scale and translate ellipse -


I grow in C # with Windows runtime. I have a picture with scrollwriters. On this image, I make the oval from When I zoom the image, do not zoom the oval. I want to know how to zoom in oval to keep a good position.

My code:

  list & lt; Point & gt; Ptmp = new list & lt; Point & gt; (); Point position ogine = new point (); If (tabPointOrig == zero) {tabPointOrig = New list & lt; Point & gt; (); TabPointOrig = tabPoint; } Foreach (pointP in tabPointOrig) {pTmp.Add (new point (mathematics.read (px - scrolling horizontol offset), math round (p. Y - scroll vertical offset)); } Tabpoint = ptmp; Leading (can be in the grid image.Children) {If (Can.GetType () == Type (Canvas)} Canvas Canvas Canvas = (canvas); Forrestacht (Cantement in Cantt.) {Transform Group TG = New Transform Group (); Trans Trans Trans Trans = New Translation Transform (); Scale Transform Scale = New Scale Transform (); Positionogrin = new point (canvas, gate left (canment), canvas .Gettop (connection)); #region Dependence des Pointer // Transposes the Transpace.x = Scrolls on the Ones Trans Laced Points in Reservant N Mimes Temps. Horizontal offset * -1; Trans.Y = Scroll Vertical Offset * -1; #endrian # regian zoom dot points // zoom louds points in razor enter meme templates zoom factor = scroll. Zoom Faker; Scale.ScaleX = scale.ScaleY = scale.ScaleX * ZoomFactor; # Ndrian tg hair. Add (scale); TG.Children.Add (trans); // The ultimate ferrous less changes al image cement.rendertransform = tg; #region Point Sorti du Grid // But if there is no grid in your situation (if canvas. Get Left (+++) + Transx + (30 * ZoomFactor)) & lt; 0 || (Canvas.Tet (Canalment) + Trans. Y + (30 * ZoomFactor)) & lt; 0) can do it. Visibility = Visibility Collapsed; Others can. Visibility = visibility Visible; #endrian}}}  


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -