Quick update to this post - firstly I changed my OnKeyDown function;
void OnKeyDown(object sender, KeyEventArgs e)
{
double centreX = msi.ViewportOrigin.X + (msi.ViewportWidth / 2);
double viewportHeight = msi.ViewportWidth / msi.AspectRatio;
double centreY = msi.ViewportOrigin.Y + (viewportHeight / 2);
double xInc = 0.05 * msi.ViewportWidth;
double yInc = 0.05 * viewportHeight;
switch (e.Key)
{
case Key.I:
msi.ZoomAboutLogicalPoint(1.1, centreX, centreY);
break;
case Key.O:
msi.ZoomAboutLogicalPoint(0.9, centreX, centreY);
break;
case Key.Right:
msi.ViewportOrigin = new Point(msi.ViewportOrigin.X + xInc,
msi.ViewportOrigin.Y);
break;
case Key.Left:
msi.ViewportOrigin = new Point(msi.ViewportOrigin.X - xInc,
msi.ViewportOrigin.Y);
break;
case Key.Up:
msi.ViewportOrigin = new Point(msi.ViewportOrigin.X,
msi.ViewportOrigin.Y - yInc);
break;
case Key.Down:
msi.ViewportOrigin = new Point(msi.ViewportOrigin.X,
msi.ViewportOrigin.Y + yInc);
break;
default:
break;
}
}
}
and secondly I learned a little bit more ( I think ) about using the Deep Zoom Composer. I revisited my project and arrange these 9 images;
and if you notice in the middle image there's a magnifying glass showing where I've dropped 9 more images...so I zoom in...
and right in the middle of that image I have 9 more images ( they are in the eye of one of the fish :-) ) and if you notice in the middle there's a magnifying glass and so if I zoom in further;
then in the middle of that image there are 9 more images. I stopped at that point, it was making my head hurt :-) but it makes for a nicer zoom in and zoom out demo than I originally had with just a bunch of images and no "images inside images".
Posted
Sat, Mar 8 2008 9:51 AM
by
mtaulty