Class to set the cap and joins style for lines that are greater than a single pixel wide.
More...
#include <drawpath.h>
|
enum | JoinStyle { MITRED_JOINS,
ROUND_JOINS,
BEVELLED_JOINS
} |
|
enum | CapStyle { BUTT_CAPS,
ROUND_CAPS,
SQUARE_CAPS,
TRIANGULAR_CAPS
} |
|
Class to set the cap and joins style for lines that are greater than a single pixel wide.
◆ join() [1/2]
void tbx::DrawCapAndJoin::join |
( |
JoinStyle |
style | ) |
|
|
inline |
Set the join style.
If the style is set to MITRED_JOINS the mitre must be set as well.
- Parameters
-
◆ join() [2/2]
JoinStyle tbx::DrawCapAndJoin::join |
( |
| ) |
const |
|
inline |
Get the join style.
- Returns
- the join style
◆ leading_cap() [1/2]
void tbx::DrawCapAndJoin::leading_cap |
( |
CapStyle |
cap_style | ) |
|
|
inline |
Set the leading cap style.
If TRIANGULAR_CAPS is set, the leading cap width and length should also be set.
- Parameters
-
cap_style | new leading cap style |
◆ leading_cap() [2/2]
CapStyle tbx::DrawCapAndJoin::leading_cap |
( |
| ) |
const |
|
inline |
Get the leading cap style.
- Returns
- CapStyle with leading cap style
◆ leading_cap_length() [1/2]
void tbx::DrawCapAndJoin::leading_cap_length |
( |
short |
length | ) |
|
|
inline |
Leading triangular cap length away from the line.
Set this if the leading cap style is TRIANGULAR_CAPS
- Parameters
-
length | cap length (in 256ths of line widths, so 0x100 is 1 linewidth) |
◆ leading_cap_length() [2/2]
short tbx::DrawCapAndJoin::leading_cap_length |
( |
| ) |
const |
|
inline |
Get the leading cap length.
- Returns
- the leading caps length in 256ths of a line width
◆ leading_cap_width() [1/2]
void tbx::DrawCapAndJoin::leading_cap_width |
( |
short |
width | ) |
|
|
inline |
Leading triangular cap width on each side.
Set this if the leading cap style is TRIANGULAR_CAPS
- Parameters
-
width | cap width (in 256ths of line widths, so 0x100 is 1 linewidth) |
◆ leading_cap_width() [2/2]
short tbx::DrawCapAndJoin::leading_cap_width |
( |
| ) |
const |
|
inline |
Get the leading cap width.
- Returns
- the leading caps width in 256ths of a line width
◆ mitre_limit() [1/2]
void tbx::DrawCapAndJoin::mitre_limit |
( |
const Fixed16 & |
limit | ) |
|
|
inline |
Sets the mitre limit.
The mitre limit must be set if the join style is set to MITRED_JOINS.
At any given corner, the mitre length is the distance from the point at which the inner edges of the stroke meet, to the point where the outer edges of the stroke meet. This distance increases as the angle between the lines decreases. If the ratio of the mitre length to the line width exceeds the mitre limit, stroke treats the corner with a bevel join instead of a mitre join.
- Parameters
-
◆ mitre_limit() [2/2]
int tbx::DrawCapAndJoin::mitre_limit |
( |
| ) |
const |
|
inline |
Get the mitre limit.
- Returns
- mitre limit
◆ trailing_cap() [1/2]
void tbx::DrawCapAndJoin::trailing_cap |
( |
CapStyle |
cap_style | ) |
|
|
inline |
Set the trailing cap style.
If TRIANGULAR_CAPS is set, the trailing cap width and length should also be set.
- Parameters
-
cap_style | new trailing cap style |
◆ trailing_cap() [2/2]
CapStyle tbx::DrawCapAndJoin::trailing_cap |
( |
| ) |
const |
|
inline |
Get the trailing cap style.
- Returns
- CapStyle with trailing cap style
◆ trailing_cap_length() [1/2]
void tbx::DrawCapAndJoin::trailing_cap_length |
( |
short |
length | ) |
|
|
inline |
Trailing triangular cap length away from the line.
Set this if the trailing cap style is TRIANGULAR_CAPS
- Parameters
-
length | cap length (in 256ths of line widths, so 0x100 is 1 linewidth) |
◆ trailing_cap_length() [2/2]
short tbx::DrawCapAndJoin::trailing_cap_length |
( |
| ) |
const |
|
inline |
Get the trailing cap length.
- Returns
- the trailing caps length in 256ths of a line width
◆ trailing_cap_width() [1/2]
void tbx::DrawCapAndJoin::trailing_cap_width |
( |
short |
width | ) |
|
|
inline |
Trailing triangular cap width on each side.
Set this if the trailing cap style is TRIANGULAR_CAPS
- Parameters
-
width | cap width (in 256ths of line widths, so 0x100 is 1 linewidth) |
◆ trailing_cap_width() [2/2]
short tbx::DrawCapAndJoin::trailing_cap_width |
( |
| ) |
const |
|
inline |
Get the trailing cap width.
- Returns
- the trailing caps width in 256ths of a line width
The documentation for this class was generated from the following file: