Solved

java graphics..201 points

Posted on 2002-06-25
6
211 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
ID: 7106780
Graphics g = image1.getGraphics();
g.drawImage(x, y, image2, null);
0
 

Author Comment

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

Expert Comment

by:daitt
ID: 7107884
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
ID: 7109534
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
ID: 8860698
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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Chrome and Firefox Java 5 69
spring maven example issues 3 44
passing enum to a method 4 37
Find out all repos that a user is most active on Github 1 35
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

696 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