Ovals and Lines

Ovals

Ovals are created like rectangles. You create an oval by using a place_oval function and you can give its name as a parameter.  The oval that is drawn will be the one inscribed in the rectangle. Below is a rectangle created with place_rectangle and an oval created by the same points using place_oval:

Graphical user interface

Description automatically generated with low confidence

Note that instead of changing the fill color, border width, and border color after they were placed, all these were set by parameters in the place_rectangle and place_oval commands.

If you want to make the fill or outline transparent use ‘’ as its value as show below:

Text

Description automatically generated with low confidence

Lines

You can draw two kinds of lines in GUI4sher, solid lines are created with place_line and dashed lines are created with place_dashed_lines.

Place_line has you click on the two ends of the line to create it:

Graphical user interface

Description automatically generated with low confidence

Lines can have arrows using the set_arrow method.

A picture containing graphical user interface

Description automatically generated

Since the lower left was the last point clicked on when creating the line, set_arrow(‘last’) put the arrow there.  Set arrow takes these possible arguments:

·        ‘none’ – no arrows

·        ‘first’ – the first point clicked on

·        ‘last’ – the last point clicked on

·        ‘both’ – both ends of the line

Dashed lines are create with place_dashed_line as shown below:

Graphical user interface

Description automatically generated

You can use the set_arrow method or arrow= argument on dashed lines too.  You can use set_outline and set_fill methods on lines to change their color.  Both methods do the same thing.

Text

Description automatically generated

Polygons

The most sophisticated geometric objects you can draw are polygons.  You create them with the place_polygon function.  Like all geometric objects they have name, width, outline, fill parameters and set_name, set_width, set_outline, and set_fill methods.  Creating a polygon requires clicking on all its corners. The first corner is shown as a thick orange dot:

Graphical user interface, application

Description automatically generated

Thereafter, each corner of the polygon you click shows up as a small black dot:

Graphical user interface, text, application

Description automatically generated

When you have clicked on all the corners of the polygon click on the orange dot to finish:

Graphical user interface, application, Word

Description automatically generated

Click here to see how to put text onto your graphics

Contents

·      GUI4sher How To

o   Downloading

o   Starting a new project

·      The Structure of a GUI4sher project

·      Adding Geometric Objects to a GUI4sher Project

o   Geometric Object

o   Rectangles

o   Modifying Colors and Borders

·      Ovals and Lines[SD1] 

o   Ovals

o   Lines

o   Polygons

·      Labels: Putting Words on GUI4sher

·      Buttons: Simple User Input

o   Simple Button

o   Counting Button

o   Check

·      Entering Text

o   Entries

o   Text

o   Creating an App

·      Lists in GUI4sher

o   List for Selecting a String

o   Editable List of Numbers

·       Project Administration

o   Copyright and Thanks

o   Debugging

 


 [SD1]