Results 1 to 3 of 3
  1. #1
    Cemi's Avatar
    Cemi is offline Member
    Join Date
    Apr 2010
    Posts
    36
    Rep Power
    0

    Default setPixel in java?

    Hi again! :)

    I'm working on rewriting my paint program, and I am supposed to draw it without using the defailt .drawLine and .drawSquare methods.

    The problem is not in the calculations, nor in the coding of them, but more in how you can set a pixel to a color in java?

    I've tried googling it, but I couldn't really find how to do it.

    How do you draw pixel by pixel without using the default methods? I asume the drawLine etc. functions use some sort of setPixel. What is it? :)

    Thank you for reading,
    - Cemi
    Carpe Diem
    Each day's a gift and not a given right

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,616
    Rep Power
    25

    Default

    Strange assignment, not allowing you to use the Graphics class method.
    Have you looked in the API doc at all the setPixel methods available? There are lots of them in different classes. Go to the S-Index and use the browser's Search

  3. #3
    Zack's Avatar
    Zack is offline Senior Member
    Join Date
    Jun 2010
    Location
    Destiny Islands
    Posts
    692
    Rep Power
    5

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •