Solved

java graphics..201 points

Posted on 2002-06-25
6
174 Views
Last Modified: 2010-03-31
Is it posible in java to replace a part of image with other image.
if posible give me a solution please.Very urgent...


the html simulation is available in the below link
http://www.atlantainfotech.net/floor/floor_image.htm
0
Comment
Question by:ravi24
6 Comments
 
LVL 92

Accepted Solution

by:
objects earned 201 total points
Comment Utility
Graphics g = image1.getGraphics();
g.drawImage(x, y, image2, null);
0
 

Author Comment

by:ravi24
Comment Utility
i need to paste a image to a existing image in diferend size like diamondsize, or triangle..
0
 
LVL 3

Expert Comment

by:daitt
Comment Utility
You can try Graphics.setClip(Shape) or Graphics2D.clip(Shape) to clip your graphics object, after that you can draw images on your graphics object. Only area inside clip will be drawn.
0
 
LVL 92

Expert Comment

by:objects
Comment Utility
The x, y coordinates in my comment above specify the location in image1 you want to paint image2.
0
 
LVL 35

Expert Comment

by:girionis
Comment Utility
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this
question is:

- points to objects

Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

girionis
Cleanup Volunteer
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This video teaches viewers about errors in exception handling.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now