Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8502397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:28:24+00:00 2026-06-11T01:28:24+00:00

In order to edit an image using OpenGL I provided user interaction such that,

  • 0

In order to edit an image using OpenGL I provided user interaction such that, as the user moves the finger the image gets edited according to drag direction .But I want to limit the dragging.For example, user should edit only some part of the nose, if dragging is not limited my image texture is getting distorted as there is chance for user to drag his/her finger all over the screen or face(more specifically) .

//here is the code

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event 
{
    count++;
    NSLog(@"touches moved called");
    UITouch *touch = [[touches allObjects] objectAtIndex:0];
    if(count>2)
    {
        NSLog(@"Entered");
        count=0;
        self.view.userInteractionEnabled=NO;
    }
    else{
        updatepoint = [touch locationInView:self.view];
        mousex = updatepoint.x;
        mousey = self.view.bounds.size.height-updatepoint.y;
        grab = [self ripple_grab:mousex:mousey];
        [self drawFrame];
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T01:28:26+00:00Added an answer on June 11, 2026 at 1:28 am

    I got the solution

    Here is my updated code. Please do give me suggestions if there is any other method.

    - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 
    {
        count = 0;
    }
    - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event 
    {
        count++;
        NSLog(@"touches moved called");
        UITouch *touch = [[touches allObjects] objectAtIndex:0];
        if (count > 6)
        {
            NSLog(@"Entered");
           // count=0;
           // self.view.userInteractionEnabled = NO;
           //NSLog(@"line skipped");
        }
        else{
            NSLog(@"else Entered");
            updatepoint = [touch locationInView:self.view];
            mousex = updatepoint.x;
            mousey = self.view.bounds.size.height-updatepoint.y;
            grab = [self ripple_grab:mousex:mousey];
            [self drawFrame];
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using User-Submitted-Posts Plugin in order to let users submit their images to
<%= link_to 'Edit', edit_order_path(@order) %> Is it possible to wire this link to the
I used to edit Web.config before in order to allow some users to access
I have been trying to edit the jquery buttons in order to modify them
I'm going to try building a custom language extension for Komodo Edit. In order
EDIT: I've altered the code to now read: View code: <h3>Your Orders:</h3> <table class=order-items>
I have a form like this: <asp:Content ID=Content2 ContentPlaceHolderID=MainContent runat=server> <% using (Html.BeginForm(Edit, Order,
I have a table named users and each row (user) has an image. The
I have a website: parisforaweekend.com with a 'subscribe' button-image that changes color on mouseover.
I'm building a django app that has an image gallery, and the client insists

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.