1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * multiscalesubimage.cpp
6 * Moonlight List (moonlight-list@lists.ximian.com)
8 * Copyright 2007-2008 Novell, Inc. (http://www.novell.com)
10 * See the LICENSE file included with the distribution for details.
20 #include "deepzoomimagetilesource.h"
21 #include "multiscalesubimage.h"
23 MultiScaleSubImage::MultiScaleSubImage ()
25 SetObjectType (Type::MULTISCALESUBIMAGE
);
29 MultiScaleSubImage::MultiScaleSubImage (const Uri
*parent_uri
, MultiScaleTileSource
*tsource
, int _id
, int _n
)
31 LOG_MSI ("new MultiScaleSubImage ()\n");
32 SetObjectType (Type::MULTISCALESUBIMAGE
);
37 Uri
*source_uri
= ((DeepZoomImageTileSource
*)source
)->GetUriSource ();
38 if (source_uri
->isAbsolute
)
41 LOG_MSI ("MSSI: UriSource changed from %s", source_uri
->ToString());
42 Uri
*original_uri
= new Uri ();
43 Uri::Copy (source_uri
, original_uri
);
44 Uri::Copy (parent_uri
, source_uri
);
45 source_uri
->Combine (original_uri
);
47 LOG_MSI (" to %s\n", source_uri
->ToString());
52 MultiScaleSubImage::GetViewportHeight ()
54 return GetAspectRatio () * GetViewportWidth ();