rotate_bitmap_about_anchor Subroutine

public subroutine rotate_bitmap_about_anchor(src_bitmap, src_width, src_height, angle_deg, anchor_x, anchor_y, dst_bitmap, dst_width, dst_height, dst_anchor_x, dst_anchor_y)

Rotate an RGB bitmap around an anchor point, returning the rotated bitmap and the anchor location in the destination bitmap.

Coordinates are in pixel boundary space: - source bitmap spans x=[0,src_width], y=[0,src_height] - anchor_x/anchor_y can be any value in that space (e.g. 0, width/2, width)

Arguments

Type IntentOptional Attributes Name
integer(kind=1), intent(in) :: src_bitmap(:,:,:)
integer, intent(in) :: src_width
integer, intent(in) :: src_height
real(kind=wp), intent(in) :: angle_deg
real(kind=wp), intent(in) :: anchor_x
real(kind=wp), intent(in) :: anchor_y
integer(kind=1), intent(out), allocatable :: dst_bitmap(:,:,:)
integer, intent(out) :: dst_width
integer, intent(out) :: dst_height
real(kind=wp), intent(out) :: dst_anchor_x
real(kind=wp), intent(out) :: dst_anchor_y