beautypg.com

HP Prime Graphing Wireless Calculator User Manual

Page 282

background image

278

Programming in HP PPL

Returns an integer number that can be used as the color

parameter for a drawing function, based on Red-, Green-

and Blue-component values (each 0 to 255).
If Alpha is greater than 128, returns the color flagged as

transparent. There is no alpha channel blending on Prime.
Examples:

RGB(255,0,128) returns 16711808

RECT(RGB(0,0,255)) makes a blue screen

LINE(0,0,8,8,RGB(0,255,0)) draws a green line

Pixels and Cartesian

ARC_P

ARC

Syntax; ARC(G, x, y, r [ , a1, a2, c])

ARC_P(G, x, y, r [ , a1, a2, c])

Draws an arc or circle on G, centered on point x,y, with
radius r and color c starting at angle a1 and ending on
angle a2.
G can be any of the graphics variables and is optional.
The default is G0
r
is given in pixels.
c is optional and if not specified black is used. It should
be specified in this way: #RRGGBB (in the same way as
a color is specified in HTML).
a1 and a2 follow the current angle mode and are
optional. The default is a full circle.
Example:

ARC(0,0,60,0,

π,RGB(255,0,0)) draws a red

semicircle with center at (0,0)—using the current Plot
Setup window—and with a radius of 60 pixels. The
semicircle is drawn counterclockwise from 0 to π.

BLIT_P

BLIT

Syntax: BLIT([trgtGRB, dx1, dy1, dx2, dy2],

srcGRB [ ,sx1, sy1, sx2, sy2, c])

BLIT_P ([trgtGRB, dx1, dy1, dx2, dy2],
srcGRB [ ,sx1, sy1, sx2, sy2, c])