Changeset 502

Show
Ignore:
Timestamp:
06/22/08 12:20:39 (3 months ago)
Author:
Mike Wey
Message:

Don't forget the rewraped files

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/cairo/Context.d

    r499 r502  
    4848 *  - cairo.ScaledFont 
    4949 *  - cairo.Surface 
     50 *  - cairo.Pattern 
    5051 *  - glib.Str 
    5152 *  - gdk.Region 
     
    6061 *  - cairo_font_options_t* -> FontOption 
    6162 *  - cairo_matrix_t* -> Matrix 
     63 *  - cairo_pattern_t* -> Pattern 
    6264 *  - cairo_scaled_font_t* -> ScaledFont 
    6365 *  - cairo_surface_t* -> Surface 
     
    8082private import cairo.ScaledFont; 
    8183private import cairo.Surface; 
     84private import cairo.Pattern; 
    8285private import glib.Str; 
    8386private import gdk.Region; 
     
    436439     * Returns: a newly created (surface) pattern containing theresults of all drawing operations performed to the group. Thecaller owns the returned object and should callcairo_pattern_destroy() when finished with it. 
    437440     */ 
    438     public cairo_pattern_t* popGroup() 
     441    public Pattern popGroup() 
    439442    { 
    440443        // cairo_pattern_t* cairo_pop_group (cairo_t *cr); 
    441         return cairo_pop_group(cairo); 
     444        auto p = cairo_pop_group(cairo); 
     445        if(p is null) 
     446        { 
     447            version(Exceptions) throw new Exception("Null GObject from GTK+."); 
     448            else return null; 
     449        } 
     450        return new Pattern(cast(cairo_pattern_t*) p); 
    442451    } 
    443452     
     
    536545     * subsequent drawing operations. 
    537546     */ 
    538     public void setSource(cairo_pattern_t* source) 
     547    public void setSource(Pattern source) 
    539548    { 
    540549        // void cairo_set_source (cairo_t *cr,  cairo_pattern_t *source); 
    541         cairo_set_source(cairo, source); 
     550        cairo_set_source(cairo, (source is null) ? null : source.getPatternStruct()); 
    542551    } 
    543552     
     
    571580     * Returns: the current source pattern. This object is owned bycairo. To keep a reference to it, you must callcairo_pattern_reference(). 
    572581     */ 
    573     public cairo_pattern_t* getSource() 
     582    public Pattern getSource() 
    574583    { 
    575584        // cairo_pattern_t* cairo_get_source (cairo_t *cr); 
    576         return cairo_get_source(cairo); 
     585        auto p = cairo_get_source(cairo); 
     586        if(p is null) 
     587        { 
     588            version(Exceptions) throw new Exception("Null GObject from GTK+."); 
     589            else return null; 
     590        } 
     591        return new Pattern(cast(cairo_pattern_t*) p); 
    577592    } 
    578593     
     
    10581073     * pattern =  a cairo_pattern_t 
    10591074     */ 
    1060     public void mask(cairo_pattern_t* pattern) 
     1075    public void mask(Pattern pattern) 
    10611076    { 
    10621077        // void cairo_mask (cairo_t *cr,  cairo_pattern_t *pattern); 
    1063         cairo_mask(cairo, pattern); 
     1078        cairo_mask(cairo, (pattern is null) ? null : pattern.getPatternStruct()); 
    10641079    } 
    10651080     
  • trunk/src/cairo/ImageSurface.d

    r499 r502  
    3838 * prefixes: 
    3939 *  - cairo_image_surface_ 
     40 *  - cairo_surface_ 
    4041 *  - cairo_ 
    4142 * omit structs: 
     
    287288     * image. 
    288289     * Params: 
    289      * surface =  a cairo_surface_t with pixel contents 
    290290     * filename =  the name of a file to write to 
    291291     * Returns: CAIRO_STATUS_SUCCESS if the PNG file was writtensuccessfully. Otherwise, CAIRO_STATUS_NO_MEMORY if memory could notbe allocated for the operation orCAIRO_STATUS_SURFACE_TYPE_MISMATCH if the surface does not havepixel contents, or CAIRO_STATUS_WRITE_ERROR if an I/O error occurswhile attempting to write the file. 
    292292     */ 
    293     public cairo_status_t surfaceWriteToPng(string filename) 
     293    public cairo_status_t writeToPng(string filename) 
    294294    { 
    295295        // cairo_status_t cairo_surface_write_to_png (cairo_surface_t *surface,  const char *filename); 
     
    300300     * Writes the image surface to the write function. 
    301301     * Params: 
    302      * surface =  a cairo_surface_t with pixel contents 
    303302     * writeFunc =  a cairo_write_func_t 
    304303     * closure =  closure data for the write function 
    305304     * Returns: CAIRO_STATUS_SUCCESS if the PNG file was writtensuccessfully. Otherwise, CAIRO_STATUS_NO_MEMORY is returned ifmemory could not be allocated for the operation,CAIRO_STATUS_SURFACE_TYPE_MISMATCH if the surface does not havepixel contents. 
    306305     */ 
    307     public cairo_status_t surfaceWriteToPngStream(cairo_write_func_t writeFunc, void* closure) 
     306    public cairo_status_t writeToPngStream(cairo_write_func_t writeFunc, void* closure) 
    308307    { 
    309308        // cairo_status_t cairo_surface_write_to_png_stream (cairo_surface_t *surface,  cairo_write_func_t write_func,  void *closure); 
  • trunk/src/gtkc/cairotypes.d

    r499 r502  
    5959    SUBPIXEL 
    6060} 
     61alias cairo_antialias_t CairoAntialias; 
     62 
    6163/** 
    6264 * cairo_fill_rule_t is used to select how paths are filled. For both 
     
    7779    EVEN_ODD 
    7880} 
     81alias cairo_fill_rule_t CairoFillRule; 
     82 
    7983/** 
    8084 * Specifies how to render the endpoints of the path when stroking. 
     
    8892    SQUARE 
    8993} 
     94alias cairo_line_cap_t CairoLineCap; 
     95 
    9096/** 
    9197 * Specifies how to render the junction of two lines when stroking. 
     
    99105    BEVEL 
    100106} 
     107alias cairo_line_join_t CairoLineJoin; 
     108 
    101109/** 
    102110 * cairo_operator_t is used to set the compositing operator for all cairo 
     
    133141    SATURATE 
    134142} 
     143alias cairo_operator_t CairoOperator; 
     144 
    135145/** 
    136146 * cairo_path_data_t is used to describe the type of one portion 
     
    146156    CLOSE_PATH 
    147157} 
     158alias cairo_path_data_type_t CairoPathDataType; 
     159 
    148160/** 
    149161 * Specifies variants of a font face based on their slant. 
     
    156168    OBLIQUE 
    157169} 
     170alias cairo_font_slant_t CairoFontSlant; 
     171 
    158172/** 
    159173 * Specifies variants of a font face based on their weight. 
     
    165179    BOLD 
    166180} 
     181alias cairo_font_weight_t CairoFontWeight; 
     182 
    167183/** 
    168184 * cairo_extend_t is used to describe how pattern color/alpha will be 
     
    182198    PAD 
    183199} 
     200alias cairo_extend_t CairoExtend; 
     201 
    184202/** 
    185203 * cairo_filter_t is used to indicate what filtering should be 
     
    198216    GAUSSIAN 
    199217} 
     218alias cairo_filter_t CairoFilter; 
     219 
    200220/** 
    201221 * cairo_pattern_type_t is used to describe the type of a given pattern. 
     
    223243    RADIAL 
    224244} 
     245alias cairo_pattern_type_t CairoPatternType; 
     246 
    225247/** 
    226248 * cairo_font_type_t is used to describe the type of a given font 
     
    253275    QUARTZ 
    254276} 
     277alias cairo_font_type_t CairoFontType; 
     278 
    255279/** 
    256280 * The subpixel order specifies the order of color elements within 
     
    267291    VBGR 
    268292} 
     293alias cairo_subpixel_order_t CairoSubpixelOrder; 
     294 
    269295/** 
    270296 * Specifies the type of hinting to do on font outlines. Hinting 
     
    285311    FULL 
    286312} 
     313alias cairo_hint_style_t CairoHintStyle; 
     314 
    287315/** 
    288316 * Specifies whether to hint font metrics; hinting font metrics 
     
    299327    ON 
    300328} 
     329alias cairo_hint_metrics_t CairoHintMetrics; 
     330 
    301331/** 
    302332 * cairo_content_t is used to describe the content that a surface will 
     
    314344    COLOR_ALPHA = 0x3000 
    315345} 
     346alias cairo_content_t CairoContent; 
     347 
    316348/** 
    317349 * cairo_surface_type_t is used to describe the type of a given 
     
    349381    QUARTZ_IMAGE 
    350382} 
     383alias cairo_surface_type_t CairoSurfaceType; 
     384 
    351385/** 
    352386 * cairo_format_t is used to identify the memory format of 
     
    366400    +/ 
    367401} 
     402alias cairo_format_t CairoFormat; 
     403 
    368404/** 
    369405 * cairo_ps_level_t is used to describe the language level of the 
     
    377413    LEVEL_3 
    378414} 
     415alias cairo_ps_level_t CairoPsLevel; 
     416 
    379417/** 
    380418 * cairo_svg_version_t is used to describe the version number of the SVG 
     
    387425    VERSION_1_2 
    388426} 
     427alias cairo_svg_version_t CairoSvgVersion; 
     428 
    389429/** 
    390430 * cairo_status_t is used to indicate errors that can occur when 
     
    425465    /+* after adding a new error: update LAST_STATUS inn cairoint.h +/ 
    426466} 
     467alias cairo_status_t CairoStatus; 
     468 
    427469 
    428470/**