The math behind MultiScaleImage.ZoomAboutLogicalPoint

Developing a Silverlight DeepZoom app, I needed to reimplement MultiScaleImage.ZoomAboutLogicalPoint method in terms of changing ViewportWidth and ViewportOrigin, and this is what code I’ve ended with: public void ZoomAboutPoint(double newScale, Point scalePoint) { double newViewportWidth = _currentViewportWidth / newScale; Point centerPoint = new Point(scalePoint.X / this.ActualWidth, scalePoint.Y / this.ActualHeight); double aboutLogicalPointFactor = _currentViewportWidth – newViewportWidth; Point newViewportOrigin = …

This week in Twitter

The dentist couldn’t help but laugh out loudly looking at me trying my usual smile after a huge dose of anesthesia http://j.mp/RFDjd Intel has implemented Smooth Streaming for netbooks http://j.mp/13DCIq http://gizmodo.com/5366263 via @XaocCPS: interesting. Sharp has always been my favorite trademark in consumer electronics. Developing DRM solutions at work, isn’t it ironic that the Pirate …

This Week in Twitter

Some day, all social networks will merge into the single Peoplenet. Until there, we need profile pages like http://hi.im/fridental. # Does NYC smog consist from marijuana? ;) http://j.mp/iu99r (via @rands) And seriously: I envy people whose craziness looks so noble. # In Web2.0, even the bank account balance is shared to friends: http://whf.me/fridental # HANA-BI …

This Week in Twitter

Berlin, Pyronale'09 last weekend: huge, mind blowing and captivating. Poland owns my heart: http://j.mp/G303x (but better to see live!) # Guten Morgen: etwas feiner Musik aus James Stone seinem roten iPod… http://j.mp/1hnXmU # Future now: http://bit.ly/Xysur # Microsoft will port DirectX and some other tech from Windows 7 back to Vista: http://j.mp/269TV (via @XaocCPS) # …

This Week in Twitter

Berlin, Pyronale'09 last weekend: huge, mind blowing and captivating. Poland owns my heart: http://j.mp/G303x (but better to see live!) # Guten Morgen: etwas feiner Musik aus James Stone seinem roten iPod… http://j.mp/1hnXmU # Future now: http://bit.ly/Xysur # Microsoft will port DirectX and some other tech from Windows 7 back to Vista: http://j.mp/269TV (via @XaocCPS) # …