Skip to content

Commit

Permalink
Merge pull request #64 from danieljprice/heasoft
Browse files Browse the repository at this point in the history
Fix PGDRAW and justification of text strings in PGPLOT interface
  • Loading branch information
danieljprice authored Dec 5, 2024
2 parents d55a5bd + 4972f1d commit b1266a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/giza-draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ giza_draw (double xpt, double ypt)
int oldTrans = _giza_get_trans ();
_giza_set_trans (GIZA_TRANS_WORLD);
cairo_line_to (Dev[id].context, xpt, ypt);
cairo_move_to (Dev[id].context, xpt, ypt);
_giza_stroke ();

giza_flush_device ();
Expand Down
10 changes: 5 additions & 5 deletions src/giza-pgplot.f90
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ subroutine PGLEN (UNITS, STRING, XL, YL)
integer, intent(in) :: UNITS
character*(*), intent(in) :: STRING

call giza_qtextlen(units_giza(UNITS),STRING,XL,YL)
call giza_qtextlen(units_giza(UNITS),trim(STRING),XL,YL)

end subroutine PGLEN

Expand Down Expand Up @@ -728,7 +728,7 @@ subroutine PGMTXT (SIDE, DISP, COORD, FJUST, TEXT)
character*(*), intent(in) :: SIDE, TEXT
real, intent(in) :: DISP, COORD, FJUST

call giza_annotate(SIDE,DISP,COORD,FJUST,TEXT)
call giza_annotate(SIDE,DISP,COORD,FJUST,TEXT(:LEN_TRIM(TEXT)))

end subroutine PGMTXT

Expand Down Expand Up @@ -917,7 +917,7 @@ subroutine PGPTXT (X, Y, ANGLE, FJUST, TEXT)
real, intent(in) :: X, Y, ANGLE, FJUST
character*(*), intent(in) :: TEXT

call giza_ptext(X, Y, ANGLE, FJUST, TEXT)
call giza_ptext(X, Y, ANGLE, FJUST, TEXT(:LEN_TRIM(TEXT)))

end subroutine PGPTXT

Expand Down Expand Up @@ -1240,7 +1240,7 @@ subroutine PGQTXT (X, Y, ANGLE, FJUST, TEXT, XBOX, YBOX)
character*(*), intent(in) :: TEXT
real, intent(out) :: XBOX(4), YBOX(4)

call giza_qtext(X, Y, ANGLE, FJUST, TEXT, XBOX, YBOX)
call giza_qtext(X, Y, ANGLE, FJUST, TEXT(:LEN_TRIM(TEXT)), XBOX, YBOX)

end subroutine PGQTXT

Expand Down Expand Up @@ -1675,7 +1675,7 @@ subroutine PGTEXT (X, Y, TEXT)
real, intent(in) :: X, Y
character*(*), intent(in) :: TEXT

call giza_text(X, Y, TEXT)
call giza_text(X, Y, TEXT(:LEN_TRIM(TEXT)))

end subroutine PGTEXT

Expand Down

0 comments on commit b1266a8

Please sign in to comment.