Results 1 to 1 of 1
- 01-08-2011, 07:30 PM #1
Member
- Join Date
- Jan 2011
- Posts
- 5
- Rep Power
- 0
Drawing a graphics onto another Graphics ?
Hello there. This is the structure im using for the applet paint method in a very simplistic way.
This is the applets paint method.
This is the method witch will actually draws the mapJava Code:public void paint(Graphics g) { engine.drawMap(g); }
What im wanting to do is, somehow like a buffer but i didnt managed to do it. It should be something like this:Java Code:public drawmap(Graphics g) { g.drawImage(map, x, y, null); }
So i could create a simple camera effect w/o having to set x and y modifications on all classes that draw stuff.Java Code:public void paint(Graphics g) { Graphics otherGraphics; engine.drawMap(otherGraphics); g.drawImage(otherGraphics, variantX, variantY, null); }
Thanx for any help.
[]´s Gabriel
Similar Threads
-
Drawing simple graphics in NetBeans
By arifin in forum AWT / SwingReplies: 1Last Post: 11-12-2010, 10:01 AM -
Drawing graphics primitives
By diegofsza in forum Java 2DReplies: 7Last Post: 09-24-2009, 11:10 PM -
Help me with graphics
By 7oclock in forum New To JavaReplies: 12Last Post: 04-04-2009, 11:20 PM -
Help with 2d graphics please
By xbox_nutter in forum New To JavaReplies: 0Last Post: 04-02-2009, 11:48 AM -
drawing char by char with Graphics
By diggitydoggz in forum New To JavaReplies: 5Last Post: 12-27-2008, 12:49 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks