Fixes and suggestions by Viktor Szakats
- HB_ISBYREF() is not needed when you're calling hb_stor*() functions. - Declare always CAIRO_IMAGE_SURFACE_CREATE_FOR_DATA and CAIRO_IMAGE_SURFACE_CREATE. - Update hbcairo.hbx and align case.
This commit is contained in:
@@ -71,6 +71,11 @@ extern HB_EXPORT PHB_ITEM hb_cairoPathItemPut( PHB_ITEM pItem, cairo_p
|
||||
extern HB_EXPORT cairo_path_t * hb_cairo_path_param( int iParam );
|
||||
extern HB_EXPORT void hb_cairo_path_ret( cairo_path_t * pPath );
|
||||
|
||||
extern HB_EXPORT cairo_pattern_t * hb_cairoPatternItemGet( PHB_ITEM pItem );
|
||||
extern HB_EXPORT PHB_ITEM hb_cairoPatternItemPut( PHB_ITEM pItem, cairo_pattern_t * pPattern );
|
||||
extern HB_EXPORT cairo_pattern_t * hb_cairo_pattern_param( int iParam );
|
||||
extern HB_EXPORT void hb_cairo_pattern_ret( cairo_pattern_t * pPattern );
|
||||
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_CAIRO_H_ */
|
||||
|
||||
@@ -45,6 +45,7 @@ DYNAMIC cairo_get_matrix
|
||||
DYNAMIC cairo_has_current_point
|
||||
DYNAMIC cairo_identity_matrix
|
||||
DYNAMIC cairo_image_surface_create
|
||||
DYNAMIC cairo_image_surface_create_for_data
|
||||
DYNAMIC cairo_image_surface_create_from_png
|
||||
DYNAMIC cairo_in_fill
|
||||
DYNAMIC cairo_in_stroke
|
||||
@@ -60,12 +61,29 @@ DYNAMIC cairo_path_iterator_destroy
|
||||
DYNAMIC cairo_path_iterator_get_points
|
||||
DYNAMIC cairo_path_iterator_next
|
||||
DYNAMIC cairo_path_iterator_set_points
|
||||
DYNAMIC cairo_pattern_add_color_stop_rgb
|
||||
DYNAMIC cairo_pattern_add_color_stop_rgba
|
||||
DYNAMIC cairo_pattern_create_for_surface
|
||||
DYNAMIC cairo_pattern_create_linear
|
||||
DYNAMIC cairo_pattern_create_radial
|
||||
DYNAMIC cairo_pattern_create_rgb
|
||||
DYNAMIC cairo_pattern_create_rgba
|
||||
DYNAMIC cairo_pattern_destroy
|
||||
DYNAMIC cairo_pattern_get_color_stop_count
|
||||
DYNAMIC cairo_pattern_get_color_stop_rgba
|
||||
DYNAMIC cairo_pattern_get_linear_points
|
||||
DYNAMIC cairo_pattern_get_radial_circles
|
||||
DYNAMIC cairo_pattern_get_rgba
|
||||
DYNAMIC cairo_pattern_get_surface
|
||||
DYNAMIC cairo_pattern_status
|
||||
DYNAMIC cairo_pdf_surface_create
|
||||
DYNAMIC cairo_pdf_surface_set_size
|
||||
DYNAMIC cairo_pop_group_to_source
|
||||
DYNAMIC cairo_ps_surface_create
|
||||
DYNAMIC cairo_ps_surface_get_eps
|
||||
DYNAMIC cairo_ps_surface_set_eps
|
||||
DYNAMIC cairo_ps_surface_set_size
|
||||
DYNAMIC cairo_push_group
|
||||
DYNAMIC cairo_rectangle
|
||||
DYNAMIC cairo_rel_curve_to
|
||||
DYNAMIC cairo_rel_line_to
|
||||
@@ -86,8 +104,10 @@ DYNAMIC cairo_set_line_width
|
||||
DYNAMIC cairo_set_matrix
|
||||
DYNAMIC cairo_set_miter_limit
|
||||
DYNAMIC cairo_set_operator
|
||||
DYNAMIC cairo_set_source
|
||||
DYNAMIC cairo_set_source_rgb
|
||||
DYNAMIC cairo_set_source_rgba
|
||||
DYNAMIC cairo_set_source_surface
|
||||
DYNAMIC cairo_set_tolerance
|
||||
DYNAMIC cairo_show_page
|
||||
DYNAMIC cairo_show_text
|
||||
|
||||
@@ -183,11 +183,11 @@ HB_FUNC( CAIRO_PATTERN_GET_COLOR_STOP_RGBA )
|
||||
|
||||
hb_retni( cairo_pattern_get_color_stop_rgba( pPattern, hb_parni( 2 ), &dOffset, &dRed, &dGreen, &dBlue, &dAlpha ) );
|
||||
|
||||
if ( HB_ISBYREF( 3 ) ) hb_stord( dOffset, 3 );
|
||||
if ( HB_ISBYREF( 4 ) ) hb_stord( dRed, 4 );
|
||||
if ( HB_ISBYREF( 5 ) ) hb_stord( dGreen, 5 );
|
||||
if ( HB_ISBYREF( 6 ) ) hb_stord( dBlue, 6 );
|
||||
if ( HB_ISBYREF( 7 ) ) hb_stord( dAlpha, 7 );
|
||||
hb_stord( dOffset, 3 );
|
||||
hb_stord( dRed, 4 );
|
||||
hb_stord( dGreen, 5 );
|
||||
hb_stord( dBlue, 6 );
|
||||
hb_stord( dAlpha, 7 );
|
||||
}
|
||||
else
|
||||
hb_retni( -1 );
|
||||
@@ -224,10 +224,10 @@ HB_FUNC( CAIRO_PATTERN_GET_RGBA )
|
||||
|
||||
hb_retni( cairo_pattern_get_rgba( pPattern, &dRed, &dGreen, &dBlue, &dAlpha ) );
|
||||
|
||||
if ( HB_ISBYREF( 2 ) ) hb_stord( dRed, 2 );
|
||||
if ( HB_ISBYREF( 3 ) ) hb_stord( dGreen, 3 );
|
||||
if ( HB_ISBYREF( 4 ) ) hb_stord( dBlue, 4 );
|
||||
if ( HB_ISBYREF( 5 ) ) hb_stord( dAlpha, 5 );
|
||||
hb_stord( dRed, 2 );
|
||||
hb_stord( dGreen, 3 );
|
||||
hb_stord( dBlue, 4 );
|
||||
hb_stord( dAlpha, 5 );
|
||||
}
|
||||
else
|
||||
hb_retni( -1 );
|
||||
@@ -286,10 +286,10 @@ HB_FUNC( CAIRO_PATTERN_GET_LINEAR_POINTS )
|
||||
|
||||
hb_retni( cairo_pattern_get_linear_points( pPattern, &dX0, &dY0, &dX1, &dY1 ) );
|
||||
|
||||
if ( HB_ISBYREF( 2 ) ) hb_stord( dX0, 2 );
|
||||
if ( HB_ISBYREF( 3 ) ) hb_stord( dY0, 3 );
|
||||
if ( HB_ISBYREF( 4 ) ) hb_stord( dX1, 4 );
|
||||
if ( HB_ISBYREF( 5 ) ) hb_stord( dY1, 5 );
|
||||
hb_stord( dX0, 2 );
|
||||
hb_stord( dY0, 3 );
|
||||
hb_stord( dX1, 4 );
|
||||
hb_stord( dY1, 5 );
|
||||
}
|
||||
else
|
||||
hb_retni( -1 );
|
||||
@@ -322,12 +322,12 @@ HB_FUNC( CAIRO_PATTERN_GET_RADIAL_CIRCLES )
|
||||
|
||||
hb_retni( cairo_pattern_get_radial_points( pPattern, &dX0, &dY0, &dR0, &dX1, &dY1, &dR1 ) );
|
||||
|
||||
if ( HB_ISBYREF( 2 ) ) hb_stord( dX0, 2 );
|
||||
if ( HB_ISBYREF( 3 ) ) hb_stord( dY0, 3 );
|
||||
if ( HB_ISBYREF( 4 ) ) hb_stord( dR0, 4 );
|
||||
if ( HB_ISBYREF( 5 ) ) hb_stord( dX1, 5 );
|
||||
if ( HB_ISBYREF( 6 ) ) hb_stord( dY1, 6 );
|
||||
if ( HB_ISBYREF( 7 ) ) hb_stord( dR1, 7 );
|
||||
hb_stord( dX0, 2 );
|
||||
hb_stord( dY0, 3 );
|
||||
hb_stord( dR0, 4 );
|
||||
hb_stord( dX1, 5 );
|
||||
hb_stord( dY1, 6 );
|
||||
hb_stord( dR1, 7 );
|
||||
}
|
||||
else
|
||||
hb_retni( -1 );
|
||||
|
||||
Reference in New Issue
Block a user