]> git.cworth.org Git - spritext/commitdiff
Remove some dead code that was littering the program
authorCarl Worth <cworth@cworth.org>
Wed, 13 Feb 2008 19:19:38 +0000 (11:19 -0800)
committerCarl Worth <cworth@cworth.org>
Wed, 13 Feb 2008 19:19:38 +0000 (11:19 -0800)
spritext.c

index fd031a479d4f9caac2841ac46f0719d9a8dee241..5ae64ba2309bb9a17d04ca3929c5175409423cd8 100644 (file)
@@ -47,8 +47,6 @@ get_max_height (cairo_t *cr, const char *characters, int num_characters)
        cairo_text_extents_t extents;
        string[0] = characters[i];
        cairo_text_extents (cr, string, &extents);
-//    if ((extents.height - extents.y_bearing) > max_height)
-//      max_height = extents.height - extents.y_bearing;
        if ((extents.height) > max_height)
            max_height = extents.height;
     }
@@ -146,11 +144,6 @@ get_characters_max_width_height (FT_Face ft_face, double size,
 
     cr = cairo_create (surface);
 
-/*
-  cairo_select_font_face (cr, fontname,
-  CAIRO_FONT_SLANT_NORMAL,
-  CAIRO_FONT_WEIGHT_NORMAL);
-*/
     cr_face = cairo_ft_font_face_create_for_ft_face (ft_face, 0);
     cairo_set_font_face (cr, cr_face);
 
@@ -177,11 +170,6 @@ draw_character_table (cairo_t *cr,
     cairo_font_face_t *cr_face;
     int i;
 
-/*
-  cairo_select_font_face (cr, fontname,
-  CAIRO_FONT_SLANT_NORMAL,
-  CAIRO_FONT_WEIGHT_NORMAL);
-*/
     cr_face = cairo_ft_font_face_create_for_ft_face (ft_face, 0);
     cairo_set_font_face (cr, cr_face);
 
@@ -193,8 +181,6 @@ draw_character_table (cairo_t *cr,
 
     cairo_translate (cr, 0, -(character_height / 2.50));
 
-//    cairo_translate (cr, 0, -5.0);
-
     char string[2];
     string[1] = '\0';
     for (i = 0; i < num_characters; i++)
@@ -218,71 +204,8 @@ draw_character_table (cairo_t *cr,
        x += character_width + 8;
     }
 
-/*
-  int thick_width = 4;
-  int thin_width = 0;
-
-  for (c = 'A'; c <= 'I'; c++)
-  {
-  string[0] = c;
-  int spacing = ((c - 'A') * letterspacing) + 1;
-
-
-  cairo_save(cr);
-
-  cairo_move_to (cr, spacing, 0);
-  cairo_text_path (cr, string);
-//      cairo_set_source_rgb (cr, 0.1, 0.2, 0.2); // gray
-cairo_set_source_rgb (cr, 0.8, 0.8, 0.85); // silver
-cairo_set_line_join (cr, CAIRO_LINE_JOIN_ROUND);
-
-cairo_push_group (cr);
-cairo_set_line_width (cr, thick_width);
-cairo_stroke_preserve (cr);
-cairo_set_line_width (cr, thin_width);
-cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
-cairo_stroke_preserve (cr);
-cairo_fill (cr);
-cairo_pop_group_to_source (cr);
-
-cairo_paint (cr);
-
-cairo_restore(cr);
-
-cairo_move_to (cr, spacing, 0);
-cairo_text_path (cr, string);
-cairo_set_source_rgb (cr, 0.4, 0.45, 0.7); // blue
-
-cairo_fill (cr);
-}
-*/
-
     cairo_scale (cr, 1, -1);
     cairo_push_group (cr);
-/*
-
-cairo_pattern_t *gradient;
-
-for (i = 0; i < 9; i++)
-{
-char c[2];
-strncpy(c, STRING + i, 1);
-c[1] = '\0';
-int spacing = (i * letterspacing) + 1;
-cairo_move_to (cr, spacing, -3);
-cairo_show_text (cr, c);
-
-}
-cairo_pop_group_to_source (cr);
-
-gradient = cairo_pattern_create_linear (0, 0, 0, -fontsize);
-cairo_pattern_add_color_stop_rgba (gradient, 0.0, 1, 1, 1, 0.5);
-cairo_pattern_add_color_stop_rgba (gradient, 0.7, 1, 1, 1, 0.0);
-
-cairo_mask (cr, gradient);
-
-cairo_pattern_destroy (gradient);
-*/
 }
 
 int