You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: patterns.rb
    path of file: ./repos/prawn/lib/prawn/graphics
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require 'digest/sha1'

module Prawn
  module Graphics
    # Implements axial & radial gradients.
    modu
    
      def gradient_coordinates(gradient)
        x1, y1 = map_to_absolute(gradient.from)
        x2, y2 = map_to_absolute(gradient.to)

        transformation =
          if gradient.apply_transformations
            current_transformation_matrix_with_translation(x1, y1)
          else
            [1, 0, 0, 1, x1, y1]
          end