title: How to shift image to left (or right)?
body: <p>I'm writing an Java program that do some stuffs with images.</p>
  
  <p>Now I need to shift my image to left <code>n pixels</code>. I can clip the image with a shape using <code>Graphics.setClip(Shape)</code> functions.But I cannot move it to left alignment.</p>
  
  <p>[EDIT] Sorry for the lack of information of the above question.</p>
  
  <p>I have an image, and draw it on a canvas like this:</p>
  
  <pre><code>@Override
  public void paint(Graphics g){
      g.drawImage(image, 0, 0, this);
  }
  </code></pre>
  
  <p>I need to shift my image to left <code>n pixels</code> on my canvas (so I can draw something new to the place on right side after shifting).</p>
  
  <p><img src="https://i.stack.imgur.com/enifS.jpg" alt="image before shifting">
  <img src="https://i.stack.imgur.com/T5CXC.jpg" alt="enter image description here"></p>
  
  <p>This is an example. Image 1 is the original one, the second is the one after shifting.
  Please tell me how can I do that.</p>
  
  <p>Thanks all!</p>