class PtGrid PtBasic { dash_list; // char array (Pt_ARG_DASH_LIST) dash_scale; // long (Pt_ARG_DASH_SCALE) grid_horizontal; // unsigned short (Pt_ARG_GRID_HORIZONTAL) grid_vertical; // unsigned short (Pt_ARG_GRID_VERTICAL) line_cap; // unsigned short (Pt_ARG_LINE_CAP) line_join; // unsigned short (Pt_ARG_LINE_JOIN) line_width; // long (Pt_ARG_LINE_WIDTH) }
This widget is a grid of horizontal and vertical lines.
![]() | For detailed information, please refer to PtGrid in the Photon documentation. |
This instance variable determines the shape of line ends (mainly visible for wide lines), and may have one of the following values:
| Constant | Description |
|---|---|
| Pg_BUTT_CAP | The default, leaves line capless, with square-cut ends. |
| Pg_ROUND_CAP | Puts on a round cap. |
| Pg_SQUARE_CAP | Puts on a square cap. |
This instance variable determines the shape of line joints (mainly visible for wide lines), and may have one of the following values:
| Constant | Description |
|---|---|
| Pg_MITER_JOIN | Makes a squared-off joint. |
| Pg_ROUND_JOIN | Makes a small-radius rounded joint. |
| Pg_BEVEL_JOIN | Makes a beveled joint. |
| Pg_QROUND_JOIN | Makes a large-radius rounded joint. |
| Pg_BUTT_JOIN | Makes a butt joint (outside line edges don't join). |
This example, ex_PtGrid.g, is included in the product distribution.
#!/usr/cogent/bin/phgamma
/*
* This example demonstrates a PtGrid.
*/
require_lisp("PhotonWidgets.lsp");
PtInit(nil);
win = new(PtWindow);
grid = new(PtGrid);
grid.SetDim(350,350);
grid.fill_color = 0xccddff;
grid.grid_vertical = 12;
grid.grid_horizontal = 20;
grid.line_width = 1;
PtRealizeWidget(win);
PtMainLoop();
Copyright © 1995-2012 by Cogent Real-Time Systems, Inc. All rights reserved.