Programming Course for Beginners - ZedLX

The Easiest Online Computer Programming Course, for Free

Procedures [13/13]

Here is another way to fix the transparency issue.

The built-in function-procedure hline draws a horizontal line, but only on full pixels. Both coordinates and the length must be of type int.

The getter function floor from type num can be used to convert the coordinates to type int.

The getter function round from type num is best used to convert the length to type int.

The signature of the hline procedure is:

  • void hline(
    • int x,
    • int y,
    • int length,
    • /colorA color
    • )