Operating systems, development tools, and professional services
for connected embedded systems
for connected embedded systems
![]() |
![]() |
![]() |
![]() |
PgDrawArrow(), PgDrawArrowCx()
Draw an arrow that fits inside a given rectangle
Synopsis:
void PgDrawArrow( PhRect_t const *rect,
short margin,
PgColor_t color,
int direction );
void PgDrawArrowCx( void *dc,
PhRect_t const *rect,
short margin,
PgColor_t color,
int direction );
Arguments:
- dc
- PgDrawArrowCx() only. A void pointer to any type of draw context. Examples of draw contexts are:
- a PhDrawContext_t returned by PhDCCreate()
- a PmMemoryContext_t returned by PmMemCreateMC()
- a PpPrintContext_t returned by PpCreatePC()
- a PdOffscreenContext_t returned by PdCreateOffscreenContext()
- rect
- A pointer to a PhRect_t structure that defines the area in which the arrow must fit. If this area is too small to accomodate a tail, the function draws only a triangular arrowhead, it doesn't draw the rectangle itself.
- margin
- The size of the margin, in pixels, to leave inside the rectangle.
- color
- The fill and stroke color to use for the arrow, expressed as a PgColor_t.
- direction
- The direction you want the arrow to point.
One of:
- Pg_BOTTOM
- Pg_LEFT
- Pg_RIGHT
- Pg_TOP
Library:
ph
Description:
These functions call PgDrawPolygon() to draw an arrow that fits inside a given rectangle. PgDrawArrow() works on the current draw context, while you can specify the draw context for PgDrawArrowCx().
These functions use the current dithering and transparency settings for the fill and stroke, and a stroke width of 1. After drawing the arrow, they reset the fill and stroke colors and the stroke width to the values they had when you called the function.
Classification:
Photon
| Safety: | |
|---|---|
| Interrupt handler | No |
| Signal handler | No |
| Thread | No |
See also:
PgColor_t, PgDrawBeveled*(), PgDrawPolygon*(), PhRect_t
"Arcs, ellipses, polygons, and rectangles" in the Raw Drawing and Animation chapter of the Photon Programmer's Guide
![]() |
![]() |
![]() |
![]() |

![[Previous]](../prev.gif)
![[Contents]](../contents.gif)
![[Index]](../keyword_index.gif)
![[Next]](../next.gif)