HP Prime Graphing Wireless Calculator User Manual

Page 284

Advertising
background image

280

Programming in HP PPL

FILLPOLY_P

FILLPOLY

Syntax: FILLPOLY_P([G],{(x

1

, y

1

), (x

2

, y

2

),…(x

n

, y

n

)},

Color, [Alpha])

FILLPOLY([G],{(x

1

, y

1

), (x

2

, y

2

),…(x

n

, y

n

)},

Color, [Alpha])

For the polygon defined by the list of points, fills the
polygon with the color defined by the RGB number Color.
If Alpha is provided as an integer between 0 and 255
inclusive, the polygon is drawn with the corresponding
transparency level. You can use a vector of points instead
of a list; in this case, the points can be expressed as
complex numbers.
Example:

FILLPOLY_P({(20,20), (100, 20), (100,
100), (20, 100)}, #FF, 128) draws a square, 80

pixels on a side, near the upper left of the display, using
the color purple and transparency level 128.

GETPIX_P

GETPIX

Syntax: GETPIX([G], x, y)

GETPIX_P([G], x, y)

Returns the color of the pixel G with coordinates x,y.
G can be any of the graphics variables and is optional.
The default is G0, the current graphic.

GROBH_P

GROBH

Syntax: GROBH(G)

GROBH_P(G)

Returns the height of G.
G can be any of the graphics variables and is optional.
The default is G0.

Advertising