Results 1 to 4 of 4

Thread: PaintPicture

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Posts
    482

    Question

    Hey, i have a picturebox, and i am constantly Painting Pictures
    ( Picture1.paintpicture )

    I was wondering.
    if i CLEAR what is on the picturebox, before re-painting..
    would it save RAM? or memory?

    And how would i go about doing this to only a few pixels

    cause i have
    many squares
    16x16.. is one square
    and i have many squares..

    so how would i CLEAR one square that i select?

  2. #2
    Addicted Member Shrog's Avatar
    Join Date
    Aug 1999
    Location
    Darkest Africa
    Posts
    186
    No, it does not save on resources to clear the picture.

    Each picturebox has two graphic areas. The picture property is where the permanent picture resides. The Image property is where your drawings reside.

    What this means is that if you set the picture property of the box, a copy is also placed in the image property. If you now draw on the picture, you are drawing on the image property. If you "clear" the picture, the picture property is copied over the image property, and you lose your changes. So the Image property will ALWAYS have a picture in it, whether you clear it or not.

    Shrog

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 1999
    Posts
    482
    Ohhh, thanks for the input.

    Lastly, how would i check the picturebox to see if a pixel has been cleared (if the auto redraw is FALSE, and u open another program over it, the image is cleared)

    Insted of setting it true, is there a way to check if a pixel is CLEARED?

    thanks thanks

  4. #4
    Addicted Member Shrog's Avatar
    Join Date
    Aug 1999
    Location
    Darkest Africa
    Posts
    186
    No, pixels don't work that way. When you read the pixel from the picture, it returns the color of that pixel. You cannot tell if it was a different color a few moments ago - it just returns the color that it is at the moment of reading it.

    Shrog


    [Edited by Shrog on 11-27-2000 at 05:08 PM]

Posting Permissions

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



Click Here to Expand Forum to Full Width