Imported Upstream version 2.3.1
[platform/upstream/harfbuzz.git] / util / helper-cairo.hh
index b2ac9e4..5bfbf7b 100644 (file)
  * Google Author(s): Behdad Esfahbod
  */
 
+#ifndef HELPER_CAIRO_HH
+#define HELPER_CAIRO_HH
+
+#include "hb.hh"
 #include "options.hh"
 
 #include <cairo.h>
 
-#ifndef HELPER_CAIRO_HH
-#define HELPER_CAIRO_HH
-
 
 cairo_scaled_font_t *
-helper_cairo_create_scaled_font (const font_options_t *font_opts,
-                                double font_size);
+helper_cairo_create_scaled_font (const font_options_t *font_opts);
+
+bool
+helper_cairo_scaled_font_has_color (cairo_scaled_font_t *scaled_font);
 
-extern const char helper_cairo_supported_formats[];
+extern const char *helper_cairo_supported_formats[];
 
 cairo_t *
 helper_cairo_create_context (double w, double h,
                             view_options_t *view_opts,
-                            output_options_t *out_opts);
+                            output_options_t *out_opts,
+                            cairo_content_t content);
 
 void
 helper_cairo_destroy_context (cairo_t *cr);
@@ -56,7 +60,7 @@ struct helper_cairo_line_t {
   unsigned int num_clusters;
   cairo_text_cluster_flags_t cluster_flags;
 
-  void finish (void) {
+  void finish () {
     if (glyphs)
       cairo_glyph_free (glyphs);
     if (clusters)
@@ -76,7 +80,7 @@ helper_cairo_line_from_buffer (helper_cairo_line_t *l,
                               hb_buffer_t         *buffer,
                               const char          *text,
                               unsigned int         text_len,
-                              double               scale,
+                              int                  scale_bits,
                               hb_bool_t            utf8_clusters);
 
 #endif