xxxxxxxxxx
41
// Find out about CS Heroes here: https://drive.google.com/file/d/1eppWYQXiE83f3KIscAadx6wQI1hF_gjQ/view
function preload(){
hero = loadImage('germar_reed.png');
logo = loadImage('csta.png');
}
function setup() {
createCanvas(400, 500);
background("rgb(250,135,9)");
image(hero, 0,100,300,370); //call the image function to load an image, adjust image width, height.
hashtag("#Graphs4Life","brown", "grey", 40); //call the hashtag function to label the poster
about("Germar Reed", "Data Scientist", "aliceblue", "brown"); //call the about function to label the poster
}
function hashtag(message, color, bgcolor, size){
textAlign(CENTER);
noStroke();
fill(bgcolor);
rect(0,0,width,100);
fill(color);
textSize(size);
center_text = text(message,width/2,60);
}
function about(name, job, textcolor, bgcolor){
textAlign(LEFT);
noStroke();
fill(bgcolor);
rect(0,400,400,100);
fill(textcolor);
textSize(30);
text(name, 20 ,435);
textSize(20);
text(job, 20, 470);
image(logo,310,410,80,80);
}