perl-gfx.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. Index: PostScript-Simple-0.07/lib/PostScript/Simple.pm
  2. --- PostScript-Simple-0.07/lib/PostScript/Simple.pm.orig 2005-05-04 16:42:28.187771138 +0200
  3. +++ PostScript-Simple-0.07/lib/PostScript/Simple.pm 2005-05-04 16:58:39.923776000 +0200
  4. @@ -1322,10 +1322,21 @@
  5. my ($x, $y, $r) = @_;
  6. - unless (@_ == 3)
  7. + if (@_ == 4)
  8. {
  9. - $self->_error("circle: wrong number of arguments");
  10. - return 0;
  11. + if (defined($opt{'filled'}))
  12. + {
  13. + $opt{'filled'} = 1;
  14. + }
  15. + else
  16. + {
  17. + $opt{'filled'} = 0;
  18. + }
  19. + }
  20. + elsif (@_ != 3)
  21. + {
  22. + $self->_error( "wrong number of args for line" );
  23. + return 0;
  24. }
  25. if (!$self->{usedcircle})
  26. @@ -1378,7 +1385,7 @@
  27. my ($x, $y, $r, $a, $text) = @_;
  28. - unless (@_ == 5) {
  29. + unless (@_ == 5 || @_ == 6) {
  30. $self->_error("circletext: wrong number of arguments");
  31. return 0;
  32. }
  33. @@ -1499,16 +1506,23 @@
  34. my ($x1, $y1, $x2, $y2) = @_;
  35. - unless (@_ == 4) {
  36. - $self->_error("box: wrong number of arguments");
  37. - return 0;
  38. + if (@_ == 5)
  39. + {
  40. + if (defined($opt{'filled'}))
  41. + {
  42. + $opt{'filled'} = 1;
  43. + }
  44. + else
  45. + {
  46. + $opt{'filled'} = 0;
  47. + }
  48. }
  49. -
  50. - if (!defined($opt{'filled'}))
  51. + elsif (@_ != 4)
  52. {
  53. - $opt{'filled'} = 0;
  54. + $self->_error( "wrong number of args for line" );
  55. + return 0;
  56. }
  57. -
  58. +
  59. unless ($self->{usedbox})
  60. {
  61. $self->{psfunctions} .= "/box {
  62. @@ -1606,7 +1616,7 @@
  63. %opt = %{; shift};
  64. }
  65. - unless ( @_ == 3 )
  66. + unless ( @_ == 3 || @_ == 4 )
  67. { # check required params first
  68. $self->_error("text: wrong number of arguments");
  69. return 0;
  70. @@ -1818,7 +1828,7 @@
  71. my ($file, $x1, $y1, $x2, $y2) = @_;
  72. - unless (@_ == 5) {
  73. + unless (@_ == 5 || @_ == 6) {
  74. $self->_error("importepsfile: wrong number of arguments");
  75. return 0;
  76. }