title: Screen Coordinates With CGAffineTransform
body: <p>I m using Gesture touch function to Rotate resize my image. Now what i want to do is that when the image hit a certain X,Y point it disappears from the view. </p>
  
  <p>When i worked with CGpoint it worked fine. </p>
  
  <p>How do i gether the (x y) coordinates from CGTransform Matrix</p>
  
  <p>The Code i m using currently is</p>
  
  <pre><code>- (void)updateOriginalTransformForTouches:(NSSet *)touches 
  {
      if ([touches count] &gt; 0) {
          CGAffineTransform incrementalTransform = [self incrementalTransformWithTouches:touches];
          [self setConstrainedTransform:CGAffineTransformConcat(originalTransform, incrementalTransform)];
          originalTransform = self.transform;
      }
  }
  
  // At start, store the touch begin points and set an original transform
  - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 
  {
      [[self superview] bringSubviewToFront:self];
      NSMutableSet *currentTouches = [[[event touchesForView:self] mutableCopy] autorelease];
      [currentTouches minusSet:touches];
      if ([currentTouches count] &gt; 0) {
          [self updateOriginalTransformForTouches:currentTouches];
          [self cacheBeginPointForTouches:currentTouches];
      }
      [self cacheBeginPointForTouches:touches];
  }
  
  // During movement, update the transform to match the touches
  - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event 
  {
      CGAffineTransform incrementalTransform = [self incrementalTransformWithTouches:[event touchesForView:self]];
      [self setConstrainedTransform:CGAffineTransformConcat(originalTransform, incrementalTransform)];
  
      NSLog(@"%f",incrementalTransform.tx);
      NSLog(@"%f",incrementalTransform.ty);
  
      if (incrementalTransform.tx == 44 &amp;&amp; incrementalTransform.ty == 281) {
          NSLog(@"dvvd");
      }
  }
  
  // Finish by removing touches, handling double-tap requests
  - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event 
  {
      [self updateOriginalTransformForTouches:[event touchesForView:self]];
      [self removeTouchesFromCache:touches];
  
      for (UITouch *touch in touches) {
          if (touch.tapCount &gt;= 2) {
              [self.superview bringSubviewToFront:self];
          }
      }
  
      NSMutableSet *remainingTouches = [[[event touchesForView:self] mutableCopy] autorelease];
      [remainingTouches minusSet:touches];
      [self cacheBeginPointForTouches:remainingTouches];
  }// Redirect cancel to ended
  - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event 
  {
      [self touchesEnded:touches withEvent:event];
  }
  </code></pre>