Set the current line dash style
#include <gf/gf.h> void gf_context_set_linedash( gf_context_t context, uint32 line_pat, unsigned line_pat_offset, int line_repeat, unsigned flags );
- The draw context handle.
- A bitmask holding the stipple pattern for broken lines. The bits are consumed in most-significant to least-significant order. A high bit (1) means render the pixel with the foreground color, whereas a low bit (0) means render the pixel with the background color or not at all, depending on the flags parameter.
- The offset into the line pattern, starting at the most-significant bit.
- Specifies how many of the bits in line_pat to use, after which the pattern is repeated. If line_repeat is less than line_pat, then the most-significant bits of line_pat are ignored.
If line_pat has fewer bits than line_repeat, the most significant bits are padded with 0s.
This value cannot be more than 32.
Some hardware have limitations on line repeat values. See the “Hardware Capabilities” appendix for more information.
- Flags that provide additional control over dashing. One value is defined:
- GF_CONTEXT_LINEDASH_BACKFILL — render “off” bits (0) in the pattern in the background color. The default is to treat these pixels as transparent.
This function replaces the current line dashing style. Line dashing lets you apply stipple patterns along the path of polylines to draw lines of varying dashes.
To unset dashing (that is, render solid lines), use gf_context_disable_linedash().
QNX Graphics Framework