Suppose an image is displayed on a Canvas. One way to erase the image is simply to

Question:

Suppose an image is displayed on a Canvas. One way to erase the image is simply to set every pixel to the same color immediately, but the visual effect is dull. Write an app that displays an image, then erases it by using random-number generation to select individual pixels to erase. After most of the image is erased, erase all the remaining pixels at once. You might try several variants of this problem. For example, you might display lines, circles or shapes randomly to erase regions of the screen. Investigate interface PixelWriter (package javafx.scene.image), which can be used to manipulate pixels in a Canvas. Use GraphicsContext’s getPixelWriter method to obtain the PixelWriter.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Java How To Program Late Objects Version

ISBN: 9780136123712

8th Edition

Authors: Paul Deitel, Deitel & Associates

Question Posted: