2010-01-20 14:28 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)

* harbour/contrib/hbcairo/pdf.c
  * harbour/contrib/hbcairo/png.c
    * updated harbour level functions to be available, but return error 
      result, if it is not supported by some version of cairo library
  * harbour/contrib/hbcairo/image.c
    * comment typo
This commit is contained in:
Mindaugas Kavaliauskas
2010-01-20 12:26:19 +00:00
parent adc98db46a
commit 10ccef2ce0
4 changed files with 30 additions and 9 deletions

View File

@@ -17,6 +17,14 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-01-20 14:28 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt)
* harbour/contrib/hbcairo/pdf.c
* harbour/contrib/hbcairo/png.c
* updated harbour level functions to be available, but return error
result, if it is not supported by some version of cairo library
* harbour/contrib/hbcairo/image.c
* comment typo
2010-01-19 17:46 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbqt/hbqt_hbqsyntaxhighlighter.cpp
* contrib/hbqt/hbqt_hbqsyntaxhighlighter.h

View File

@@ -4,7 +4,7 @@
/*
* Harbour Project source code:
* Cairo library: pdf
* Cairo library: image
*
* Copyright 2009 Mindaugas Kavaliauskas <dbtopas at dbtopas.lt>
* www - http://www.harbour-project.org

View File

@@ -55,19 +55,24 @@
#include "cairo-pdf.h"
#ifdef CAIRO_HAS_PDF_SURFACE
HB_FUNC( CAIRO_PDF_SURFACE_CREATE )
{
#ifdef CAIRO_HAS_PDF_SURFACE
hb_cairo_surface_ret( cairo_pdf_surface_create( hb_parc( 1 ), hb_parnd( 2 ), hb_parnd( 3 ) ) );
#else
hb_retptr( NULL );
#endif
}
HB_FUNC( CAIRO_PDF_SURFACE_SET_SIZE )
{
#ifdef CAIRO_HAS_PDF_SURFACE
cairo_surface_t * pSurface = hb_cairo_surface_param( 1 );
if( pSurface )
cairo_pdf_surface_set_size( pSurface, hb_parnd( 2 ), hb_parnd( 3 ) );
#else
/* Just paramter validation */
hb_cairo_surface_param( 1 );
#endif
}
#endif /* CAIRO_HAS_PDF_SURFACE */

View File

@@ -54,17 +54,25 @@
#include "hbcairo.h"
#ifdef CAIRO_HAS_PNG_FUNCTIONS
HB_FUNC( CAIRO_IMAGE_SURFACE_CREATE_FROM_PNG )
{
#ifdef CAIRO_HAS_PNG_FUNCTIONS
hb_cairo_surface_ret( cairo_image_surface_create_from_png( hb_parc( 1 ) ) );
#else
hb_retptr( NULL );
#endif
}
HB_FUNC( CAIRO_SURFACE_WRITE_TO_PNG )
{
hb_retni( cairo_surface_write_to_png( hb_cairo_surface_param( 1 ), hb_parc( 2 ) ) );
#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_retni( -1 ); /* There is no good CAIRO_STATUS_* for this */
#endif
}
#endif /* CAIRO_HAS_PNG_FUNCTIONS */