Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, I am trying to zoom into an image upon pressing and releasing the mouse.I need help The image must be zoomed in by 120%

Hello, I am trying to zoom into an image upon pressing and releasing the mouse.I need help The image must be zoomed in by 120% at the same spot where the mouse was

public void doMouse(String action, double x, double y){ if(action.equals("pressed")){ this.Xpos = x; this.Ypos = y; } else if (action.equals("released")){

} }

// CHALLENGE /** * Expand the image around the pixel in row r and column c. * The zoom should be 120% - every pixel moved 120% further from (r,c) than originally. * Hint: It is much easier to copy pixel values from the current image to their * new positions in a new array, and then replace the original array by the new one. */ public void zoomImage(int r,int c){

this.redisplayImage(); }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Database And Knowledge Base Systems

Authors: S Krishna

1st Edition

9810206208, 978-9810206208

More Books

Students also viewed these Databases questions

Question

Find the derivative of y= cos cos (x + 2x)

Answered: 1 week ago