Fix typo in 9b54bd30006c008b4a951331b273613d5bac3abf
[pm.git] / image / src / ImageMetadata.cpp
blob03bd48965e3fd51f81b570944ca36f5522eef8f8
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "ImageMetadata.h"
9 #include "RasterImage.h"
10 #include "nsComponentManagerUtils.h"
11 #include "nsISupportsPrimitives.h"
12 #include "nsXPCOMCID.h"
14 namespace mozilla {
15 namespace image {
17 void
18 ImageMetadata::SetOnImage(RasterImage* image)
20 if (mHotspotX != -1 && mHotspotY != -1) {
21 nsCOMPtr<nsISupportsPRUint32> intwrapx = do_CreateInstance(NS_SUPPORTS_PRUINT32_CONTRACTID);
22 nsCOMPtr<nsISupportsPRUint32> intwrapy = do_CreateInstance(NS_SUPPORTS_PRUINT32_CONTRACTID);
23 intwrapx->SetData(mHotspotX);
24 intwrapy->SetData(mHotspotY);
25 image->Set("hotspotX", intwrapx);
26 image->Set("hotspotY", intwrapy);
29 image->SetLoopCount(mLoopCount);
32 } // namespace image
33 } // namespace mozilla