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 "mozilla/StandardInteger.h"
8 #include "mozilla/Util.h"
16 // The metadata about an image that decoders accumulate as they decode.
24 , mIsNonPremultiplied(false)
27 // Set the metadata this object represents on an image.
28 void SetOnImage(RasterImage
* image
);
30 void SetHotspot(uint16_t hotspotx
, uint16_t hotspoty
)
35 void SetLoopCount(int32_t loopcount
)
37 mLoopCount
= loopcount
;
40 void SetIsNonPremultiplied(bool nonPremult
)
42 mIsNonPremultiplied
= nonPremult
;
45 void SetSize(int32_t width
, int32_t height
)
47 mSize
.construct(nsIntSize(width
, height
));
50 bool HasSize() const { return !mSize
.empty(); }
52 int32_t GetWidth() const { return mSize
.ref().width
; }
53 int32_t GetHeight() const { return mSize
.ref().height
; }
56 // The hotspot found on cursors, or -1 if none was found.
60 // The loop count for animated images, or -1 for infinite loop.
63 Maybe
<nsIntSize
> mSize
;
65 bool mIsNonPremultiplied
;
69 } // namespace mozilla