| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 * | 6 * |
| 7 * Simple tool to generate SKP files for testing. | 7 * Simple tool to generate SKP files for testing. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
| 11 #include "SkColor.h" | 11 #include "SkColor.h" |
| 12 #include "SkCommandLineFlags.h" | 12 #include "SkCommandLineFlags.h" |
| 13 #include "SkPaint.h" | 13 #include "SkPaint.h" |
| 14 #include "SkPicture.h" | 14 #include "SkPicture.h" |
| 15 #include "SkPictureRecorder.h" |
| 15 #include "SkScalar.h" | 16 #include "SkScalar.h" |
| 16 #include "SkStream.h" | 17 #include "SkStream.h" |
| 17 | 18 |
| 18 // Flags used by this file, alphabetically: | 19 // Flags used by this file, alphabetically: |
| 19 DEFINE_int32(blue, 128, "Value of blue color channel in image, 0-255."); | 20 DEFINE_int32(blue, 128, "Value of blue color channel in image, 0-255."); |
| 20 DEFINE_int32(border, 4, "Width of the black border around the image."); | 21 DEFINE_int32(border, 4, "Width of the black border around the image."); |
| 21 DEFINE_int32(green, 128, "Value of green color channel in image, 0-255."); | 22 DEFINE_int32(green, 128, "Value of green color channel in image, 0-255."); |
| 22 DEFINE_int32(height, 200, "Height of canvas to create."); | 23 DEFINE_int32(height, 200, "Height of canvas to create."); |
| 23 DEFINE_int32(red, 128, "Value of red color channel in image, 0-255."); | 24 DEFINE_int32(red, 128, "Value of red color channel in image, 0-255."); |
| 24 DEFINE_int32(width, 300, "Width of canvas to create."); | 25 DEFINE_int32(width, 300, "Width of canvas to create."); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 SkColor color = SkColorSetRGB(FLAGS_red, FLAGS_green, FLAGS_blue); | 76 SkColor color = SkColorSetRGB(FLAGS_red, FLAGS_green, FLAGS_blue); |
| 76 skpmaker(FLAGS_width, FLAGS_height, FLAGS_border, color, FLAGS_writePath[0])
; | 77 skpmaker(FLAGS_width, FLAGS_height, FLAGS_border, color, FLAGS_writePath[0])
; |
| 77 return 0; | 78 return 0; |
| 78 } | 79 } |
| 79 | 80 |
| 80 #if !defined SK_BUILD_FOR_IOS | 81 #if !defined SK_BUILD_FOR_IOS |
| 81 int main(int argc, char * const argv[]) { | 82 int main(int argc, char * const argv[]) { |
| 82 return tool_main(argc, (char**) argv); | 83 return tool_main(argc, (char**) argv); |
| 83 } | 84 } |
| 84 #endif | 85 #endif |
| OLD | NEW |