3 Replies - 113 Views - Last Post: 04 May 2012 - 12:13 PM Rate Topic: -----

#1 Pin Head  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 7
  • View blog
  • Posts: 203
  • Joined: 31-July 09

making a Graphics library

Posted 04 May 2012 - 09:59 AM

Hi,
I'm interested in making graphics without using the Java2D library.The question is their any books or information on how to do this.I have good programming skills, and have a good knowledge of Mathamatics .I don't intend to build some super
out this world graphics library, I'm just really interested about how graphics are programmed and how they appear on the computer screen?
Is This A Good Question/Topic? 0
  • +

Replies To: making a Graphics library

#2 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8022
  • View blog
  • Posts: 31,133
  • Joined: 06-March 08

Re: making a Graphics library

Posted 04 May 2012 - 10:37 AM

So don't use Java :)
Seriously, Java is there to hide the OS and its hardware from the user.
Writing your own graphic library will require access to low level functions that are OS independant and that you can't just access from Java.
You might write them in C/C++ and use JNI to call these low level functions.
Was This Post Helpful? 0
  • +
  • -

#3 Pin Head  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 7
  • View blog
  • Posts: 203
  • Joined: 31-July 09

Re: making a Graphics library

Posted 04 May 2012 - 10:44 AM

Hi,
This may sound stupid, but then how did Java write Java2D did they use the same process.Did they use the same process
that you suggested?
I also keep seeing this book Michael Abrash's Graphics Programming Black Book a lot
Was This Post Helpful? 0
  • +
  • -

#4 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8022
  • View blog
  • Posts: 31,133
  • Joined: 06-March 08

Re: making a Graphics library

Posted 04 May 2012 - 12:13 PM

It is a bit more complicated than that
If you look at the Graphics and Graphics2D class you will see that most methods are actually abstract.
If you:
    public void paint(Graphics g) {
      System.out.println(g);


You will see that the Graphics g object is actually a sun.java2d.SunGraphics2D object and this going further down then the published standard Java API

You can found it here
http://www.docjar.co...ics2D.java.html

but I personnaly never had to go that way deep in the code which you will have to do to implement your own graphic library.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1