Skip to main content

First Homework

MY CODE:

<!DOCTYPE HTML>
<html>
<head>
<script>
window.onload = function() {
var canvas = document.getElementById("myCanvas");
var context = canvas.getContext("2d");
////////////////////////////////////// start below this line ˇˇˇˇˇˇˇˇˇˇ

var x1 =50;
var y1 =50;
var x2 =750;
var y2 =500;
var rectx1 = 50;
var recty1 = 100;
var rectwidth1 = 300;
var rectheight1 = 250;
var grd = context.createLinearGradient(rectx1, recty1, rectx1+rectwidth1, recty1+rectheight1);
var rectx2  = 300;
var recty2 = 300;
var rectwidth2 = 200;
var rectheight2 = 300;
var x3= 300;
var y3= 60;
var x4= 100;
var y4= 500;
var rectx3  = 555;
var recty3 = 100;
var rectwidth3 = 150;
var rectheight3 = 150;
var x5= 600;
var y5= 150;
var x6= 550;
var y6= 500;

//orange line
context.beginPath();
  context.moveTo(x3,y4);
  context.lineTo(x1,y6);
  context.lineWidth = 10;
  context.strokeStyle = 'rgb(255,165,0)';
  context.lineCap = 'butt';
  context.stroke();

//light blue line
  context.beginPath();
  context.moveTo(x1,y1);
  context.lineTo(x2,y2);
  context.lineWidth = 5;
  context.strokeStyle = 'rgb(0,250,250)';
  context.lineCap = 'round';
  context.stroke();

//red and yellow rectangle2
  context.beginPath();
context.rect(rectx3,recty1,rectwidth2,rectheight2);
context.lineWidth = 15;
context.strokeStyle = 'rgb(250,250,100)';
context.fillStyle = 'red';
  context.fill();
context.stroke();

//light blue line
  context.beginPath();
  context.moveTo(x1,y5);
  context.lineTo(x2,y3);
  context.lineWidth = 10;
  context.strokeStyle = 'rgb(100,200,250)';
  context.lineCap = 'round';
  context.stroke();

// rectangle 1
  context.beginPath();
context.rect(rectx1,recty1,rectwidth1,rectheight1);
context.lineWidth = 10;
context.strokeStyle = 'rgb(235,280,0)';
// starting gradient color
        grd.addColorStop(0, "rgb(235,281,0)");
        //intermediate color
        grd.addColorStop(0.5, "rgb(193,24,0)");
        // ending color
        grd.addColorStop(1, "rgb(255,100,0)");
context.fillStyle = grd;
context.fill();
context.stroke();


//Simple V line in purple

var x= 50;
var y = 100;
var x1 = 300;
var y1 = 450;
var x2 = 400;
var y2 = 300
var x3 = 500;
var y3 = 450
var x4 = 700;
var y4 = 100
//comment
context.beginPath();
context.moveTo(x, y);
context.lineTo(x1, y1); // move to starting coordinates
context.lineTo(x2, y2); // draw line to following point
context.lineTo(x3, y3)
context.lineTo(x4, y4)
context.lineCap = 'round';
context.lineWidth = 30;// declare the width in pixels of the line
context.strokeStyle = 'rgb(100,0,205)'; // or "#FF0000" // declare the line color in rgb or hexadecimal values

context.stroke();


////////////////////////////////////// end above this line ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ

};
</script>
</head>
<body>
<canvas id="myCanvas" width="800" height="600"></canvas>
</body>
</html>

Comments

Popular posts from this blog

FINAL PORTFOLIO

FMX210 FINAL PORTFOLIO ARTIST STATEMENT:         FMX210 has been a complex yet rewarding class over this past fall semester. This course has taught me the logistics of countless Adobe programs which have bettered my digital media skills. Attached is my portfolio which includes each final project from each program we worked with. My portfolio is themed as red and black with the font Mercurius MT std bold to better the overall composition. Each page is a different project and is done in chronological order from the first unit through the last. I aimed to use InDesign to successfully create a visually appealing portfolio while displaying each of my projects on the consecutive pages, along with a table of contents and an about me page.          My portfolio is crafted in such a way that is visually appealing through the use of color choices, creative fonts, and a simple approach to highlight each project. The theme I chose to create wa...

Business Cards

BUSINESS CARDS ARTSIT STATEMENT:         Above are both sides of the three business cards I have created as a vegan food travel blogger. Each card is similar in its concept but varies by design, color scheme, font, and text. I aimed for each card to be visually appealing while including my logo and the colors I needed to incorporate.         Each business card varies from the next and is based off of the logo and the color scheme of that specific logo. I aimed to create very different styles to highlighted stylistic and visual appeal as it differs by viewer. I also ensured that the front and back correlated with each other to increase visual appeal. Additionally, the fonts and placement of each element add to the overall business card.         Overall, I am happy with the outcome of each business card and am glad that they vary greatly but are all visually appealing. I added gradient to one, quotes, small...

Three Favorite Photoshop CC Tutorials

3 RELEVANT PHOTOSHOP TUTORIALS 1) Get to know photoshop: https://helpx.adobe.com/photoshop/how-to/ps-basics-fundamentals.html?playlist=/services/playlist.helpx/products:SG_PHOTOSHOP_1_1/learn-path:get-started/set-header:ccx-designer/playlist:ccl-get-started-1/en_us.json&ref=helpx.adobe.com 2) How to use the clone tool: https://helpx.adobe.com/photoshop/how-to/clone-stamp-remove-object.html?playlist=/services/playlist.helpx/products:SG_PHOTOSHOP_1_1/learn-path:key-techniques/playlist:topic/set-header:remove-objects-from-photos/en_us.json&ref=helpx.adobe.com 3) Use layer masks to combine images: https://helpx.adobe.com/photoshop/how-to/combine-image-layer-mask.html?playlist=/services/playlist.helpx/products:SG_PHOTOSHOP_1_1/learn-path:key-techniques/set-header:layer-masking-projects/playlist:topic/en_us.json&ref=helpx.adobe.com