We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, I have 6 different images with different sizes, one of them will be background image and the other ones will be placed to screen randomly within circles. Circle sizes and sizes of 5 images will be same also. And this circles wont overlap eachother.
Please see this image:
Could you please help me, which methods, codes should i use?
Answers
"I can't handle it."
Might help to indicate what is blocking you. We prefer not to give canned solutions to what appears to be homework...
Have you read the tutorials? Some of them explain how to use loadImage() and image(), among other things.
Oh sorry for missunderstanding my english is not good actually. İ know codes what u mean.
But i am having trouble images in circle. I can post them in square without any mask. But i cant post them in circles.
I wrote a sample code here:
You should take a peek @ mask() method:
http://processing.org/reference/PImage_mask_.html
i tried that. but i hhave difference size pics, i get "mask can only used with an image thats the sime size" message. how can i make them same size? i resize images in the program
Use createGraphics() to instantiate a PGraphics w/ same width & height as your image. *-:)
In there, draw an ellipse() as your mask. W/ some effort, I expect it's gonna work! =:)
I am using it also, i see some part of images in circles.
Hi guys, What is wrong with these codes?
mask1.ellipse(x, y,imgs[i].width, imgs[i].height);
Replace x, y, with 0, 0, the variables are used when drawing the result, not when creating the mask.
If i use 0,0 instead of x,y at this time quarter circles are displayed.
ok, first off, don't call loadImage() inside draw() - it's inefficient to read the file every loop. read them once in setup()
the quarter circles things looks like a ellipseMode() problem. read the reference and try some of the alternatives.