-
Borders
Hi everyone,
I have a question about the graphics 2d. I have a buffered image which i read in and what i want to do is to draw a simple black line around this image something like a simple border(nothing fancy).
This is what i have so far
Dimension Size4 = image.getSize();
BufferedImage Image1= new BufferedImage(Size4.width, Size4.height,
BufferedImage.TYPE_INT_RGB);
Graphics2D g2 = Image1.createGraphics();
Can anybody explain to me or show me any codings on how this can be achieved.
I hope someone can help me with this
Thank You
Yours Sincerely
Richard West
-
your need something like this
g2.drawImage(image,0,0,Size4.width,Size4.height,null);
g2.setColor(Color.BLACK);
g2.drawRect(0,0,Size4.width-1,Size4.height-1);
best regards
floaty
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks