tags:

views:

13

answers:

1

In my Silverlight application I display texts (textblock on canvas) as well as rectangles and lines (again shapes drawn on the canvas) over deep zoom images. I handle zoom in / out, pan and tilts. What is not realy cool in my opinion, is the way my vector objects look at different zoom factors. Of cause they become bigger or smaller.

Would you have any suggestions how to keep some of the objects dimentions look the same at any zoom? let's say, a line with StrokeThickness will always be of 10 screen pixels. or text block width, height 100 screen pix by 300 screen pix.

Thanks, Val

+1  A: 

It depends on how/where your objects are defined that you want to remain at 1:1 scale.

The 2 options I can think of are:

  • Render those objects in a canvas above the deep zoom (this means you need to work out the positions again yourself).
  • Apply reciprocal scaling to those objects (which means you work out what scale the item is going to display at and apply a 1/x scaling factor to them. That way the deep zoom shrinks an object that is scaled up to compensate and the 2 cancel out).

Hope this helps.

Enough already