วันพุธที่ 17 ธันวาคม พ.ศ. 2557

ส่วนที่แก้ไขต่างๆจาก bitbucket (ุ7)

 void Function_3_withParameter (int y3) {
-  if (mouseX >=130 && mouseX<=280 && mouseY >=y3+30 && mouseY <=y3+70) {
-    fill (255, 255, 0);
-    rect (80, y3, 300, 150, 10);
-    fill (0);
-    textSize(15);
-    text ("The functions", 120, y3+30);
-    text ("that you declare the parameter", 100, y3+50);
-    text ("because you want different", 100, y3+70);
-    text ("outcome in each parameter value", 100, y3+90);
-  }
+if (mouseX >=130 && mouseX<=280 && mouseY >=y3+30 && mouseY <=y3+70) {
+fill (255, 255, 0);
+rect (80, y3, 300, 150, 10);
+fill (0);
+textSize(15);
+text ("The functions", 120, y3+30);
+text ("that you declare the parameter", 100, y3+50);
+text ("because you want different", 100, y3+70);
+text ("outcome in each parameter value", 100, y3+90);
+}
 }
 
 void Function_MindMap (int y) {
-  stroke (0);
-  strokeWeight(10);
-  line ((width/2)-5, y+45, (width/2)-5, y+100);
-  line ((width/2)-75, y+100, (width/2)+80, y+100);
+stroke (0);
+strokeWeight(10);
+line ((width/2)-5, y+45, (width/2)-5, y+100);
+line ((width/2)-75, y+100, (width/2)+80, y+100);
 
-  line ((width/2)-255, y+140, (width/2)-255, y+210);
-  line ((width/2)-255, y+175, (width/2)-100, y+175);
-  line ((width/2)-100, y+175, (width/2)-100, y+350);
+line ((width/2)-255, y+140, (width/2)-255, y+210);
+line ((width/2)-255, y+175, (width/2)-100, y+175);
+line ((width/2)-100, y+175, (width/2)-100, y+350);
 
-  line ((width/2)+275, y+140, (width/2)+275, y+310);
-  line ((width/2)+275, y+175, (width/2)+95, y+175);
-  line ((width/2)+95, y+175, (width/2)+95, y+205);
+line ((width/2)+275, y+140, (width/2)+275, y+310);
+line ((width/2)+275, y+175, (width/2)+95, y+175);
+line ((width/2)+95, y+175, (width/2)+95, y+205);
 
-  strokeWeight (3);
-  fill (51, 0, 0);
-  ellipse ((width/2), y, 300, 100);
-  fill (255);
-  textSize (40);
-  text ("function", (width/2)-70, y+10);
-  //First Topic
+strokeWeight (3);
+fill (51, 0, 0);
+ellipse ((width/2), y, 300, 100);
+fill (255);
+textSize (40);
+text ("function", (width/2)-70, y+10);
+//First Topic
 
-  fill (102, 0, 153);
-  ellipse ((width/2)-250, y+100, 350, 90);
-  ellipse ((width/2)+250, y+100, 350, 90);
-  fill (255);
-  textSize (30);
-  text ("User Defined Function", (width/2)-410, y+110);
-  text ("System Function", (width/2)+140, y+110);
-  //Second Topic
+fill (102, 0, 153);
+ellipse ((width/2)-250, y+100, 350, 90);
+ellipse ((width/2)+250, y+100, 350, 90);
+fill (255);
+textSize (30);
+text ("User Defined Function", (width/2)-410, y+110);
+text ("System Function", (width/2)+140, y+110);
+//Second Topic
 
-  fill (0, 51, 51);
-  ellipse ((width/2)-300, y+250, 250, 90);
-  ellipse ((width/2)-100, y+350, 250, 90);
-  ellipse ((width/2)+300, y+350, 250, 90);
-  ellipse ((width/2)+100, y+250, 250, 90);
-  fill (255);
-  textSize (25);
-  text ("With Parameter", (width/2)-390, y+260);
-  text ("Without Parameter", (width/2)-210, y+360);
-  text ("With Parameter", (width/2)+10, y+260);
-  text ("Without Parameter", (width/2)+190, y+360);
-  //Thrid Topic
-  noStroke();
+fill (0, 51, 51);
+ellipse ((width/2)-300, y+250, 250, 90);
+ellipse ((width/2)-100, y+350, 250, 90);
+ellipse ((width/2)+300, y+350, 250, 90);
+ellipse ((width/2)+100, y+250, 250, 90);
+fill (255);
+textSize (25);
+text ("With Parameter", (width/2)-390, y+260);
+text ("Without Parameter", (width/2)-210, y+360);
+text ("With Parameter", (width/2)+10, y+260);
+text ("Without Parameter", (width/2)+190, y+360);
+//Thrid Topic
+noStroke();
 }
 void Function_PaintBrush (int PaintX, int PaintY, int PaintR1) {
-  //draw Body Paintbrush
-  stroke (255, 255, 000);
-  strokeWeight (2);
-  fill (102, 051, 000);
-  ellipse (PaintX, PaintY, PaintR1, PaintR1-270);
+//draw Body Paintbrush
+stroke (255, 255, 000);
+strokeWeight (2);
+fill (102, 051, 000);
+ellipse (PaintX, PaintY, PaintR1, PaintR1-270);
 
-  //draw Head Paintbrush
-  noStroke ();
-  fill (204, 153, 102);
-  ellipse (PaintX-150, PaintY, PaintR1-200, PaintR1-250);
-  stroke (255, 255, 153);
+//draw Head Paintbrush
+noStroke ();
+fill (204, 153, 102);
+ellipse (PaintX-150, PaintY, PaintR1-200, PaintR1-250);
+stroke (255, 255, 153);
 
-  //draw Junction
-  stroke (051, 051, 051);
-  strokeWeight (10);
-  line (PaintX-100, PaintY+10, PaintX-100, PaintY-10);
+//draw Junction
+stroke (051, 051, 051);
+strokeWeight (10);
+line (PaintX-100, PaintY+10, PaintX-100, PaintY-10);
 }
 
 void Function_1_move () {
-  Function_MindMap(y);
-  y--;
-  if (y==150) {
-    y++;
-    Function_PaintBrush (width-200, height-50, 300);
-    fill (0);
-    textSize(20);
-    text ("Click mouse left to go to next page", 150, height-45);
-  }
+Function_MindMap(y);
+y--;
+if (y==150) {
+y++;
+Function_PaintBrush (width-200, height-50, 300);
+fill (0);
+textSize(20);
+text ("Click mouse left to go to next page", 150, height-45);
+}
 }
 
 void Function_2_move () {
-  Function_System(y2);
-  y2--;
-  if (y2==200) {
-    y2++;
-    Function_2_withParameter(y2);
-    Function_2_withOutParameter(y2);
-    Function_2_viewSource_withParameter (y2);
-    Function_2_viewSource_withOutParameter (y2);
-    Function_2_codeSample_withParameter (y2);
-    Function_2_codeSample_withOutParameter (y2);
-    Function_2_sample_withParameter ();
-    Function_2_sample_withOutParameter ();
-  }
+Function_System(y2);
+y2--;
+if (y2==200) {
+y2++;
+Function_2_withParameter(y2);
+Function_2_withOutParameter(y2);
+Function_2_viewSource_withParameter (y2);
+Function_2_viewSource_withOutParameter (y2);
+Function_2_codeSample_withParameter (y2);
+Function_2_codeSample_withOutParameter (y2);
+Function_2_sample_withParameter ();
+Function_2_sample_withOutParameter ();
+}
 }
 

ไม่มีความคิดเห็น:

แสดงความคิดเห็น