negative Subroutine

private pure elemental subroutine negative(this)

Inverts the colors of the image.

Type Bound

format_pnm

Arguments

Type IntentOptional Attributes Name
class(format_pnm), intent(inout) :: this

Calls

proc~~negative~~CallsGraph proc~negative format_pnm%negative proc~set_pixels format_pnm%set_pixels proc~negative->proc~set_pixels proc~check_pixel_range format_pnm%check_pixel_range proc~set_pixels->proc~check_pixel_range

Called by

proc~~negative~~CalledByGraph proc~negative format_pnm%negative program~demo_ppm demo_ppm program~demo_ppm->proc~negative program~test17 test17 program~test17->proc~negative

Source Code

   elemental pure subroutine negative(this)
      class(format_pnm), intent(inout) :: this

      call this%set_pixels(this%max_color - this%pixels)
   end subroutine negative