C
C Williams
Hi,
I am quite new to Java and thought that making a simple painting program
would be a good way to get familiar with how to deal with its graphical
features. I'm using Swing and can see how to draw solid rectangles,
circles, lines, etc. But what I would like to do is implement an
airbrush, which I would like to work as fast as possible. Basically, I
would like to work with pixels directly: take all of the ones within a
radius of a mouse click, blend them with a mask the represents the
brush, and then update just those pixels back on the canvas.
I'm not sure what sort of component I can draw upon that lets me just
loop through its pixels. I've done something fairly similar to this a
few years ago (in C++), so I am okay with the concept but just
struggling with the implementation in Java.
Any help you have would be most appreciated!
Thanks,
-Casey
I am quite new to Java and thought that making a simple painting program
would be a good way to get familiar with how to deal with its graphical
features. I'm using Swing and can see how to draw solid rectangles,
circles, lines, etc. But what I would like to do is implement an
airbrush, which I would like to work as fast as possible. Basically, I
would like to work with pixels directly: take all of the ones within a
radius of a mouse click, blend them with a mask the represents the
brush, and then update just those pixels back on the canvas.
I'm not sure what sort of component I can draw upon that lets me just
loop through its pixels. I've done something fairly similar to this a
few years ago (in C++), so I am okay with the concept but just
struggling with the implementation in Java.
Any help you have would be most appreciated!
Thanks,
-Casey