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 none~set_pixels format_pnm%set_pixels proc~negative->none~set_pixels proc~set_pixel_a format_pnm%set_pixel_a none~set_pixels->proc~set_pixel_a proc~set_pixel_b format_pnm%set_pixel_b none~set_pixels->proc~set_pixel_b proc~check_pixel_range format_pnm%check_pixel_range proc~set_pixel_a->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