Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
[pdfium.git] / xfa_test / pdf / number_image_generator.h
1 // Copyright (c) 2012 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.
4
5 #ifndef PDF_NUMBER_IMAGE_GENERATOR_H
6 #define PDF_NUMBER_IMAGE_GENERATOR_H
7
8 #include <vector>
9
10 #include "ppapi/cpp/image_data.h"
11
12 namespace chrome_pdf {
13
14 class Instance;
15
16 class NumberImageGenerator {
17  public:
18   explicit NumberImageGenerator(Instance* instance);
19   virtual ~NumberImageGenerator();
20
21   void Configure(const pp::ImageData& number_background,
22                  const std::vector<pp::ImageData>& number_images,
23                  float device_scale);
24
25   void GenerateImage(int page_number, pp::ImageData* image);
26
27  private:
28   Instance* instance_;
29   pp::ImageData number_background_;
30   std::vector<pp::ImageData> number_images_;
31   float device_scale_;
32 };
33
34 }  // namespace chrome_pdf
35
36 #endif  // PDF_NUMBER_IMAGE_GENERATOR_H
37