Hi,

> Viktor Szakáts wrote:
>> so all that needs to be done is fall back to return failure where cairo 
>> functions don't exist in the cairo version hbcairo is build against.
> 
> I found only 4 functions that needs to be fixed. See, pdf.c and png.c.
> 
> I still has a question that to do with this:
> 
> HB_FUNC( CAIRO_SURFACE_WRITE_TO_PNG )
> {
> #ifdef CAIRO_HAS_PNG_FUNCTIONS
>   cairo_surface_t *  pSurface = hb_cairo_surface_param( 1 );
>   if( pSurface )
>      hb_retni( cairo_surface_write_to_png( pSurface, hb_parc( 2 ) ) );
> #else
>   hb_cairo_surface_param( 1 ); /* Parameter validation */
>   hb_ret();                    /* There is no good CAIRO_STATUS_* */ #endif
> }
> 
> This function should return error code. 0 means "no error". There is no good 
> CAIRO_STATUS_* constant to indicate "no supported" (complete 
> http://www.cairographics.org/manual/cairo-error-status.html#cairo-status-t ). 
> What action do you prefer return NIL, return -1, return 999 or some number 
> larger than existing cairo errors. Something else...

Definitely an integer, I'd vote for -1.

Brgds,
Viktor

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to