Skip to content

Commit

Permalink
update for upcoming api change in Prima v1.74
Browse files Browse the repository at this point in the history
  • Loading branch information
dk committed Aug 18, 2024
1 parent cd07375 commit 0703a7d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ WriteMakefile(
CONFIGURE_REQUIRES => {
'ExtUtils::MakeMaker' => 0,
PDL => '2.037',
Prima => '1.57',
Prima => '1.74',
},
PREREQ_PM => {
PDL => '2.037',
Expand Down
46 changes: 23 additions & 23 deletions prima.pd
Original file line number Diff line number Diff line change
Expand Up @@ -1650,7 +1650,7 @@ DOC_STRING

my @properties = extract_properties_from($doc_string);
pp_def('prima_arcs',
Pars => 'int x(); int y(); int x_diameter(); int y_diameter();
Pars => 'x(); y(); x_diameter(); y_diameter();
start_angle(); end_angle(); ' . generate_pars_args_for(@properties),
OtherPars => $default_other_pars,
GenericTypes => ['D'],
Expand All @@ -1669,8 +1669,8 @@ pp_def('prima_arcs',
# properties:
. generate_switch_loop_for(@properties)
. pp_line_numbers(__LINE__, q[
/* Call apricot's arc function */
my->arc(widget_handle, $x(), $y(), $x_diameter(),
call_perl( widget_handle, "arc", "nnnnnn",
$x(), $y(), $x_diameter(),
$y_diameter(), $start_angle(), $end_angle());
%}
])
Expand Down Expand Up @@ -1819,7 +1819,7 @@ DOC_STRING

@properties = extract_properties_from $doc_string;
pp_def('prima_chords',
Pars => 'int x(); int y(); int x_diameter(); int y_diameter();
Pars => 'x(); y(); x_diameter(); y_diameter();
start_angle(); end_angle(); ' . generate_pars_args_for(@properties),
OtherPars => $default_other_pars,
GenericTypes => ['D'],
Expand All @@ -1838,8 +1838,8 @@ pp_def('prima_chords',
# properties:
. generate_switch_loop_for(@properties)
. pp_line_numbers(__LINE__, q[
/* Call apricot's chord function */
my->chord(widget_handle, $x(), $y(), $x_diameter(),
call_perl( widget_handle, "chord", "nnnnnn",
$x(), $y(), $x_diameter(),
$y_diameter(), $start_angle(), $end_angle());
%}
])
Expand Down Expand Up @@ -1977,7 +1977,7 @@ DOC_STRING

@properties = qw(colors backColors clipRects linePatterns lineWidths rops rop2s );
pp_def('prima_ellipses',
Pars => 'int x(); int y(); int x_diameter(); int y_diameter();'
Pars => 'x(); y(); x_diameter(); y_diameter();'
. generate_pars_args_for(@properties),
OtherPars => $default_other_pars,
GenericTypes => ['L'],
Expand All @@ -1996,9 +1996,8 @@ pp_def('prima_ellipses',
# properties:
. generate_switch_loop_for(@properties)
. pp_line_numbers(__LINE__, q[
/* Call apricot's ellipse function */
my->ellipse(widget_handle, $x(), $y(), $x_diameter(),
$y_diameter());
call_perl( widget_handle, "ellipse", "nnnn",
$x(), $y(), $x_diameter(), $y_diameter());
%}
])
. generate_cleanup_code_for(@properties),
Expand Down Expand Up @@ -2045,7 +2044,7 @@ DOC_STRING

@properties = extract_properties_from($doc_string);
pp_def('prima_fill_chords',
Pars => 'int x(); int y(); int x_diameter(); int y_diameter();
Pars => 'x(); y(); x_diameter(); y_diameter();
start_angle(); end_angle(); ' . generate_pars_args_for(@properties),
OtherPars => $default_other_pars,
GenericTypes => ['D'],
Expand All @@ -2065,8 +2064,8 @@ pp_def('prima_fill_chords',
# properties:
. generate_switch_loop_for(@properties)
. pp_line_numbers(__LINE__, q[
/* Call apricot's fill_chord function */
my->fill_chord(widget_handle, $x(), $y(), $x_diameter(),
call_perl( widget_handle, "fill_chord", "nnnnnn",
$x(), $y(), $x_diameter(),
$y_diameter(), $start_angle(), $end_angle());
%}
])
Expand Down Expand Up @@ -2126,7 +2125,7 @@ DOC_STRING

@properties = extract_properties_from($doc_string);
pp_def('prima_fill_ellipses',
Pars => 'int x(); int y(); int x_diameter(); int y_diameter();' . generate_pars_args_for(@properties),
Pars => 'x(); y(); x_diameter(); y_diameter();' . generate_pars_args_for(@properties),
OtherPars => $default_other_pars,
GenericTypes => ['L'],
PMFunc => undef,
Expand All @@ -2145,8 +2144,8 @@ pp_def('prima_fill_ellipses',
# properties:
. generate_switch_loop_for(@properties)
. pp_line_numbers(__LINE__, q[
/* Call apricot's fill_ellipse function */
my->fill_ellipse(widget_handle, $x(), $y(), $x_diameter(), $y_diameter());
call_perl( widget_handle, "fill_ellipse", "nnnn",
$x(), $y(), $x_diameter(), $y_diameter());
%}
])
. generate_cleanup_code_for(@properties),
Expand Down Expand Up @@ -2373,7 +2372,7 @@ DOC_STRING

@properties = extract_properties_from($doc_string);
pp_def('prima_fill_sectors',
Pars => 'int x(); int y(); int x_diameter(); int y_diameter();
Pars => 'x(); y(); x_diameter(); y_diameter();
start_angle(); end_angle(); ' . generate_pars_args_for(@properties),
OtherPars => $default_other_pars,
GenericTypes => ['D'],
Expand All @@ -2392,8 +2391,8 @@ pp_def('prima_fill_sectors',
# properties:
. generate_switch_loop_for(@properties)
. pp_line_numbers(__LINE__, q[
/* Call apricot's arc function */
my->fill_sector(widget_handle, $x(), $y(), $x_diameter(),
call_perl( widget_handle, "fill_sector", "nnnnnn",
$x(), $y(), $x_diameter(),
$y_diameter(), $start_angle(), $end_angle());
%}
])
Expand Down Expand Up @@ -3064,7 +3063,7 @@ DOC_STRING

@properties = extract_properties_from($doc_string);
pp_def('prima_sectors',
Pars => 'int x(); int y(); int x_diameter(); int y_diameter();
Pars => 'x(); y(); x_diameter(); y_diameter();
start_angle(); end_angle(); ' . generate_pars_args_for(@properties),
OtherPars => $default_other_pars,
GenericTypes => ['D'],
Expand All @@ -3084,7 +3083,8 @@ pp_def('prima_sectors',
. generate_switch_loop_for(@properties)
. pp_line_numbers(__LINE__, q[
/* Call apricot's arc function */
my->sector(widget_handle, $x(), $y(), $x_diameter(),
call_perl( widget_handle, "sector", "nnnnnn",
$x(), $y(), $x_diameter(),
$y_diameter(), $start_angle(), $end_angle());
%}
])
Expand Down Expand Up @@ -3384,10 +3384,10 @@ $code = q{
else if ($N_points() == 0 || $N_points() == 1) {
/* Handle the circle case up-front */
if ($filled() == 0) {
my->ellipse(widget_handle, $x(), $y(), 2*$size(), 2*$size());
call_perl( widget_handle, "ellipse", "nnnn", $x(), $y(), 2*$size(), 2*$size());
}
else {
my->fill_ellipse(widget_handle, $x(), $y(), 2*$size(), 2*$size());
call_perl( widget_handle, "fill_ellipse", "nnnn", $x(), $y(), 2*$size(), 2*$size());
}
}
else if (
Expand Down

0 comments on commit 0703a7d

Please sign in to comment.