Skip to content

Commit

Permalink
Merge pull request #193 from Divyeshhhh/updatepoly
Browse files Browse the repository at this point in the history
update polygon tutorial
  • Loading branch information
creme332 authored Aug 2, 2024
2 parents b872710 + 8f0b7be commit b95938d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/github/creme332/model/Mode.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public enum Mode {

DRAW_POLYGON_DYNAMIC("Polygon", "Select all vertices, then first vertex again",
loadSVGIcon("/icons/triangle.svg")),
DRAW_REGULAR_POLYGON("Regular Polygon", "Select center, then enter number of vertices",
DRAW_REGULAR_POLYGON("Regular Polygon", "Select two points, then enter number of vertices",
loadSVGIcon("/icons/regular-polygon.svg")),

REFLECT_ABOUT_LINE("Reflect about Line", "Select object to reflect, then line of reflection",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,30 +51,26 @@ public void writeRegularPolygonSection() throws BadLocationException, InvalidPat
boldLarge);

doc.insertString(doc.getLength(),
"\n\n1. Click on the polygon icon (fifth icon from the left) in the menu bar and select the second option in the dropdown menu.\n",
"\n\n1. Click on the polygon icon (fifth icon from the left) in the menu bar and select the second option in the dropdown menu.\n\n",
regular);

insertImage("regular-polygon-icon.png");

doc.insertString(doc.getLength(),
"\n\n2. On your canvas, click on a pixel to select the center of the polygon.",
"\n\n2. Click on the canvas at 2 different points to draw the bottom edge of your polygon. The inclination of your polygon is determined by the angle that your edge makes with the horizontal.",
regular);

doc.insertString(doc.getLength(),
"\n\n3. You will be prompted to enter the number of vertices for your polygon. ",
regular);
doc.insertString(doc.getLength(),
"Your input value must be an integer greater than 2. \n",
"Your input value must be an integer greater than 2. \n\n",
highlightRed);

insertImage("step-3.png");

doc.insertString(doc.getLength(),
"\n\n4. You should now see a newly drawn polygon appear. You can control the side length of the polygon by moving your cursor towards or away from the polygon center.",
regular);

doc.insertString(doc.getLength(),
"\n\n5. To fix the side length, perform one last click on the canvas.\n",
"\n\n4. You should now see your new polygon. You may need to adjust the zoom level of the canvas to see your shape in its entirety. \n\n",
regular);

insertImage("step-4.png");
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b95938d

Please sign in to comment.