EhhLang Help

Ellipse

Creating an Ellipse

You can create an ellipse by using the ellipse keyword followed by the axes and the position of the ellipse. For example, to create and ellipse with axes 100 and 50 at position (300, 100), you can use the following code:

ehh { width: 840 height: 480 background: 0, 0, 0 output: "ellipse.png" } ellipse { position: 300, 100 axes: 100, 50 color: 255, 255, 255 thickness: 5 }

Output:

Ellipse

In the above example, the position keyword is used to specify the position of the ellipse. The axes keyword is used to specify the length of the major and minor axes of the ellipse. The color keyword is used to specify the color of the ellipse and the thickness keyword is used to specify the thickness of the ellipse.

Properties

The ellipse has the following properties:

  • position: The position of the ellipse. The position is specified in the format X, Y.

  • axes: The length of the major and minor axes of the ellipse. The axes are specified in the format X, Y.

  • color: The color of the ellipse. The color is specified in the format R, G, B.

  • thickness: The thickness of the ellipse. The default thickness is 1.

  • angle: The angle of the ellipse. The angle is specified in degrees.

  • startAngle: The start angle of the ellipse. The start angle is specified in degrees.

  • endAngle: The end angle of the ellipse. The end angle is specified in degrees.

  • fillColor: The fill color of the ellipse. The fill color is specified in the format R, G, B. It can be set to no if it is inherited from an ellipse that has fill color and the current object doesn't want to inherit it.

Conclusion

In this article, we have learned about the ellipse and how to create an ellipse using the ellipse keyword. We have also learned about the properties of the ellipse and how to use them to customize the appearance of the ellipse.

Last modified: 25 February 2024