PtPixel

PtPixel -- A set of points.

Synopsis

class PtPixel PtGraphic
{
}
		

Base Classes

PtWidget <-- PtBasic <-- PtGraphic <-- PtPixel

Description

This widget is a group of points, located with respect to an origin point. The origin is a PhPoint, assigned to the origin variable (inherited from PtGraphic). The group of points is defined by an array of PhPoints assigned to the points variable (also inherited from PtGraphic).

Note

For detailed information, please refer to PtPixel in the Photon documentation.

Example

This example, ex_PtPixel.g, is included in the gamma_ph_#_examples_1_QNX4.tgz file available on the Cogent Web Site.

#!/usr/cogent/bin/phgamma

/*
 * This example puts a PtPixel widget with three points
 * into a window, and prints its array of points.
 */

require_lisp("PhotonWidgets.lsp");
PtInit(nil);

win = new(PtWindow);
win.SetDim (100,100);
win.fill_color = 0xffffbb;

p1 = new(PhPoint);
p1.x = 5;
p1.y = 5;

p2 = new(PhPoint);
p2.x = 8;
p2.y = 5;

p3 = new(PhPoint);
p3.x = 5;
p3.y = 8;

o = new(PhPoint);
o.x = 45;
o.y = 45;

pix = new(PtPixel);
pix.points = array(p1,p2,p3);
pix.origin = o;

pretty_princ("PtPixel points:\n",pix.points,"\n");

PtRealizeWidget(win);
PtMainLoop(); 
		

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.