Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. PImage foto;
  2. PShape sekil;
  3. PFont yazi;
  4. int a = 0;
  5. void setup() {
  6. size(1000, 1000);
  7. foto = loadImage("portre.jpg");
  8. foto.loadPixels();
  9.  
  10. sekil = loadShape("vektor.svg");
  11. yazi = loadFont("Novecentowide-Bold-48.vlw");
  12.  
  13. for(int i=0; i<foto.pixels.length; i++) {
  14. if(hue(foto.pixels[i]) < 60 && saturation(foto.pixels[i]) > 150) {
  15. foto.pixels[i] = 0xFFFFCC00;
  16. }
  17. if(brightness(foto.pixels[i]) < 70) {
  18. foto.pixels[i] = 0xFFFFFFFF;
  19. }
  20. }
  21. foto.updatePixels();
  22. image(foto,0,0);
  23.  
  24. sekil.enableStyle();
  25. shape(sekil,0,0);
  26.  
  27. PShape altsekil = sekil.getChild(3);
  28. fill(0);
  29. altsekil.disableStyle();
  30. shape(altsekil, 300,300);
  31.  
  32. }
  33.  
  34. void draw() {
  35. translate(width/2, height/2);
  36. rotate(radians(10+float(a)/10));
  37. textFont(yazi);
  38. fill(255);
  39. textAlign(LEFT);
  40. //text("HELLO WORLD",100,500);
  41. textAlign(CENTER);
  42. fill(0);
  43. text("HELLO WORLD BU BIR\nUZUN \"YAZIDIR\" EKRANDAN\nTASABILIR",0,a);
  44. fill(255);
  45. text("HELLO WORLD BU BIR\nUZUN \"YAZIDIR\" EKRANDAN\nTASABILIR",5,5+a);
  46. a++;
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement