Skip to content

Fill triangle#143

Merged
omckeon merged 4 commits intothoth-tech:mainfrom
sharvani28:sharvani
Aug 22, 2024
Merged

Fill triangle#143
omckeon merged 4 commits intothoth-tech:mainfrom
sharvani28:sharvani

Conversation

@sharvani28
Copy link

@sharvani28 sharvani28 commented Aug 8, 2024

The following code demonstrates how to use the Fill_Triangle function to draw a simple red colour -filled triangle. It creates a triangle with specified coordinates and fills it with red color.

Here is the screenshot of how the Graphics Usage examples page look like.
grpahics page

@netlify
Copy link

netlify bot commented Aug 8, 2024

Deploy Preview for splashkit-io ready!

Name Link
🔨 Latest commit 154c818
🔍 Latest deploy log https://app.netlify.com/sites/splashkit-io/deploys/66c5836ee99324000828d958
😎 Deploy Preview https://deploy-preview-143--splashkit-io.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

@s223126445 s223126445 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR is about Fill Triangle.

Used top-level statements for both codes.
I have tested both codes they are working fine
C#

C#

C++

C++

Copy link

@hugglesfox hugglesfox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of nit picks in the review comments but looks good!

@@ -0,0 +1,3 @@
### Fill Triangle

The following code demonstrates how to use the Fill_Triangle function to draw a simple red colour -filled triangle. It creates a triangle with specified coordinates and fills it with red color. No newline at end of file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it meant to be -filled?

Comment on lines +5 to +14
open_window("Fill triangle Example", 800, 600);
clear_screen();
fill_triangle(COLOR_RED, 100, 100, 200, 200, 300, 100);
refresh_screen();

delay(5000);

close_all_windows();

return 0;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code spacing here is a bit weird. My recommendation would be to group things around the fill_triangle function to emphasize it. E.g.

    open_window("Fill triangle Example", 800, 600);
    clear_screen();

    fill_triangle(COLOR_RED, 100, 100, 200, 200, 300, 100);
    refresh_screen();

    delay(5000);
    close_all_windows();

    return 0;

@sharvani28
Copy link
Author

Made changes as per the suggesstion given by Hayley.

Copy link

@hugglesfox hugglesfox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Looks good!

Copy link

@omckeon omckeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the file names with the ones we updated in the meeting last week.

And then include a screenshot of the example showing on the Graphics Usage examples page in your PR description.

@omckeon
Copy link

omckeon commented Aug 13, 2024

Note for those reviewing usage examples - You need to test this in the browser to show it working there, not just the code separately. (@hugglesfox @s223126445 @sananoureen35 )

@sharvani28
Copy link
Author

Updated the file names and included the screenshot in PR description.

@omckeon omckeon merged commit 154c818 into thoth-tech:main Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants