1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_UTILITY_CLOUD_PRINT_BITMAP_IMAGE_H_
6 #define CHROME_UTILITY_CLOUD_PRINT_BITMAP_IMAGE_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "ui/gfx/point.h"
10 #include "ui/gfx/size.h"
12 namespace cloud_print
{
17 // These are the only types PWGEncoder currently supports.
22 BitmapImage(const gfx::Size
& size
, Colorspace colorspace
);
25 uint8
channels() const;
26 const gfx::Size
& size() const { return size_
; }
27 Colorspace
colorspace() const { return colorspace_
; }
29 const uint8
* pixel_data() const { return data_
.get(); }
30 uint8
* pixel_data() { return data_
.get(); }
32 const uint8
* GetPixel(const gfx::Point
& point
) const;
36 Colorspace colorspace_
;
37 scoped_ptr
<uint8
[]> data_
;
39 DISALLOW_COPY_AND_ASSIGN(BitmapImage
);
42 } // namespace cloud_print
44 #endif // CHROME_UTILITY_CLOUD_PRINT_BITMAP_IMAGE_H_