xxxxxxxxxx
69
/*
* @name Load and Display Image
* @description Images can be loaded and displayed to the screen at their
* actual size or any other size.
* <p><em><span class="small"> To run this example locally, you will need an
* image file, and a running <a href="https://github.com/processing/p5.js/wiki/Local-server">
* local server</a>.</span></em></p>
*/
let img; // Declare variable 'img'.
let photoY=380;
// let txt="sunday";
function setup() {
createCanvas(800, 600);
// txt = loadImage('https://66.media.tumblr.com/f19f097003acf84ed7d183cba72f46f8/tumblr_pwj9t4igNC1xsr2vuo1_540.png'); // Load the image
rizes = loadImage('sunday.jpg'); // Load the image
textFont("Georgia");
textSize(36);
//textAlign(CENTER);
}
function draw() {
background(0);
// Displays the image at its actual size at point (0,0)
//tint('#A4A4A4'); // Tint blue
//translate(width/2,height/2);
//scale(0.5);
//imageMode(CENTER);
// push();
//imageMode(CENTER);
scale(0.4);
// image(rizes,0,0);
// pop();
rotate(10);
textSize(36);
fill(255);
text('sunday',400,300);
// image(txt, 0, photoY);
textSize(32);
text('word', 10, 30);
}
function keyPressed(){
if(keyCode==UP_ARROW){
photoY=photoY-10;
}
if(keyCode==DOWN_ARROW){
photoY=photoY+10;
}
//function mouseClicked() {
//image(kias, 0, 0,);
///}
// Displays the image at point (0, height/2) at half size
//image(cake, mouseX, mouseY,cake.width / 5, cake.height/5);
//text('πήρα το ρίνγκ και μετά το ες μπαν', mouseX, mouseY+20);
}