diff --git a/ChangeLog b/ChangeLog index c74aea4d6..43b8b9b32 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-04-26 Owen Taylor + + * doc/public/cairo-sections.txt: Updated. + + * src/cairo-png.c src/cairo.h: Fix up some doc build issues. + 2005-04-26 Carl Worth * ROADMAP: diff --git a/doc/public/cairo-sections.txt b/doc/public/cairo-sections.txt index c71916d92..9e329b9c3 100644 --- a/doc/public/cairo-sections.txt +++ b/doc/public/cairo-sections.txt @@ -32,8 +32,10 @@ cairo_pdf_surface_create_for_callback
cairo-png PNG Backend -cairo_surface_write_png -cairo_image_surface_create_for_png +cairo_image_surface_create_from_png +cairo_image_surface_create_from_png_stream +cairo_surface_write_to_png +cairo_surface_write_to_png_stream
@@ -107,7 +109,8 @@ cairo_pattern_create_linear cairo_pattern_create_radial cairo_pattern_reference cairo_pattern_destroy -cairo_pattern_add_color_stop +cairo_pattern_add_color_stop_rgb +cairo_pattern_add_color_stop_rgba cairo_pattern_set_matrix cairo_pattern_get_matrix cairo_extend_t @@ -115,6 +118,8 @@ cairo_pattern_set_extend cairo_pattern_get_extend cairo_pattern_set_filter cairo_pattern_get_filter + +cairo_pattern_add_color_stop
@@ -176,8 +181,9 @@ cairo_set_target_image cairo_set_target_image_no_data cairo_operator_t cairo_set_operator -cairo_set_rgb_color -cairo_set_pattern +cairo_set_source_rgb +cairo_set_source_rgba +cairo_set_source cairo_set_alpha cairo_set_tolerance cairo_fill_rule_t @@ -211,8 +217,11 @@ cairo_rel_line_to cairo_rel_curve_to cairo_rectangle cairo_close_path +cairo_paint cairo_stroke +cairo_stroke_preserve cairo_fill +cairo_fill_preserve cairo_copy_page cairo_show_page cairo_in_stroke @@ -221,6 +230,7 @@ cairo_bool_t cairo_stroke_extents cairo_fill_extents cairo_clip +cairo_clip_preserve cairo_reset_clip cairo_glyph_t cairo_font_slant_t @@ -241,7 +251,7 @@ cairo_glyph_path cairo_show_surface cairo_get_operator cairo_get_rgb_color -cairo_get_pattern +cairo_get_source cairo_get_alpha cairo_get_tolerance cairo_get_current_point @@ -265,8 +275,11 @@ cairo_status_string cairo_filter_t cairo_image_surface_create cairo_image_surface_create_for_data +cairo_image_surface_get_width +cairo_image_surface_get_height cairo_destroy_func_t cairo_user_data_key_t +cairo_read_func_t cairo_write_func_t CAIRO_API_SHAKEUP_FLAG_DAY @@ -294,6 +307,8 @@ cairo_inverse_transform_point cairo_inverse_transform_distance cairo_scale_font cairo_select_font +cairo_set_pattern +cairo_set_rgb_color cairo_transform_font cairo_get_font_extents cairo_get_status diff --git a/doc/public/tmpl/cairo-pattern.sgml b/doc/public/tmpl/cairo-pattern.sgml index 4687bd6c8..30deec9b8 100644 --- a/doc/public/tmpl/cairo-pattern.sgml +++ b/doc/public/tmpl/cairo-pattern.sgml @@ -74,7 +74,20 @@ cairo_pattern_t @pattern: - + + + + + +@pattern: +@offset: +@red: +@green: +@blue: +@Returns: + + + diff --git a/doc/public/tmpl/cairo-png.sgml b/doc/public/tmpl/cairo-png.sgml index 14a67f41b..dd4486c71 100644 --- a/doc/public/tmpl/cairo-png.sgml +++ b/doc/public/tmpl/cairo-png.sgml @@ -17,24 +17,43 @@ PNG Backend - + + + + + +@filename: +@Returns: + + + + + + + +@read_func: +@closure: +@Returns: + + + @surface: -@file: +@filename: @Returns: - + -@file: -@width: -@height: +@surface: +@write_func: +@closure: @Returns: diff --git a/doc/public/tmpl/cairo.sgml b/doc/public/tmpl/cairo.sgml index 62f1855ee..ceac45c08 100644 --- a/doc/public/tmpl/cairo.sgml +++ b/doc/public/tmpl/cairo.sgml @@ -154,7 +154,7 @@ Drawing contexts. @op: - + @@ -165,20 +165,35 @@ Drawing contexts. @blue: - + @cr: -@pattern: +@red: +@green: +@blue: +@alpha: - + +@cr: +@source: + +@pattern: + + + + + + + + @cr: @alpha: @@ -500,6 +515,14 @@ Drawing contexts. @cr: + + + + + +@cr: + + @@ -508,6 +531,14 @@ Drawing contexts. @cr: + + + + + +@cr: + + @@ -516,6 +547,14 @@ Drawing contexts. @cr: + + + + + +@cr: + + @@ -592,6 +631,14 @@ Drawing contexts. @cr: + + + + + +@cr: + + @@ -786,7 +833,7 @@ Drawing contexts. @blue: - + @@ -971,8 +1018,10 @@ Drawing contexts. @CAIRO_STATUS_NULL_POINTER: @CAIRO_STATUS_INVALID_STRING: @CAIRO_STATUS_INVALID_PATH_DATA: +@CAIRO_STATUS_READ_ERROR: @CAIRO_STATUS_WRITE_ERROR: @CAIRO_STATUS_SURFACE_FINISHED: +@CAIRO_STATUS_SURFACE_TYPE_MISMATCH: @@ -1037,6 +1086,24 @@ End: --> + + + + + +@surface: +@Returns: + + + + + + + +@surface: +@Returns: + + @@ -1052,6 +1119,17 @@ End: @unused: + + + + + +@closure: +@data: +@length: +@Returns: + + diff --git a/src/cairo-png.c b/src/cairo-png.c index e5df7238e..97310497f 100644 --- a/src/cairo-png.c +++ b/src/cairo-png.c @@ -187,7 +187,7 @@ stdio_write_func (png_structp png, png_bytep data, png_size_t size) /** * cairo_surface_write_to_png: * @surface: a #cairo_surface_t with pixel contents - * @file: a #FILE opened in write mode + * @filename: the name of a file to write to * * Writes the image surface to the given #FILE pointer. The file * should be opened in write mode and binary mode if applicable. @@ -282,22 +282,6 @@ premultiply_data (png_structp png, } } -/** - * cairo_image_surface_create_from_png: - * @file: a #FILE - * @width: if not %NULL, the width of the image surface is written to - * this address - * @height: if not %NULL, the height of the image surface is written to - * this address - * - * Creates a new image surface and initializes the contents to the - * given PNG file. If width or height are not %NULL the dimensions of - * the image surface will be written to those addresses. - * - * Return value: a new #cairo_surface_t initialized with the contents - * of the PNG file or %NULL if the file is not a valid PNG file or - * memory could not be allocated for the operation. - **/ static cairo_surface_t * read_png (png_rw_ptr read_func, void *closure) @@ -456,13 +440,14 @@ stream_read_func (png_structp png, png_bytep data, png_size_t size) /** * cairo_image_surface_create_from_png_stream: - * @file: a #FILE + * @read_func: function called to read the data of the file + * @closure: data to pass to @read_func. * - * Creates a new image surface and initializes the contents to the - * given PNG file. + * Creates a new image surface from PNG data read incrementally + * via the @read_func function. * * Return value: a new #cairo_surface_t initialized with the contents - * of the PNG file or %NULL if the file is not a valid PNG file or + * of the PNG file or %NULL if the data read is not a valid PNG image or * memory could not be allocated for the operation. **/ cairo_surface_t * diff --git a/src/cairo.h b/src/cairo.h index e6cd720cf..58b58d82d 100644 --- a/src/cairo.h +++ b/src/cairo.h @@ -271,7 +271,7 @@ void cairo_set_operator (cairo_t *cr, cairo_operator_t op); void -cairo_set_source (cairo_t *cr, cairo_pattern_t *pattern); +cairo_set_source (cairo_t *cr, cairo_pattern_t *source); /* XXX: NYI: void