HPS::LinePattern Class Reference

#include <hps.h>

Public Types

enum  Cap : uint32_t { Cap::Butt, Cap::Square, Cap::Round, Cap::Mitre }
 
enum  Default : uint32_t {
  Default::Solid, Default::DashDot, Default::Dashed, Default::Dotted,
  Default::Dash2Dot, Default::Dash3Dot, Default::LongDash, Default::LongDashShortDash,
  Default::LongDash2ShortDash, Default::FineDot
}



 
enum  InsetBehavior : uint32_t { InsetBehavior::Overlap, InsetBehavior::Trim, InsetBehavior::Inline }
 
enum  Join : uint32_t { Join::Mitre, Join::Round, Join::Bevel }
 
enum  Justification : uint32_t { Justification::Center, Justification::Stretch }
 
enum  Modifier : uint32_t { Modifier::GlyphName, Modifier::Enumerated }
 
enum  SizeUnits : uint32_t {
  SizeUnits::ObjectSpace, SizeUnits::SubscreenRelative, SizeUnits::WindowRelative, SizeUnits::WorldSpace,
  SizeUnits::Points, SizeUnits::Pixels, SizeUnits::ScaleFactor
}

 

Detailed Description

The LinePattern class is a concept class for line-pattern-related enum classes.

Member Enumeration Documentation

◆ Cap

enum HPS::LinePattern::Cap : uint32_t
strong

Enumerates the predefined cap types that can be used at the ends of line segments within a line pattern.

Enumerator
Butt 

Line segments will end with a flat cap perpendicular to the line segment vector. This cap will occur immediately at the end of the line segment and will not extend its length.

Square 

Line segments will end with half of a filled square cap whose side is perpendicular to the line segment vector. This cap will extend the length of a line segment, but otherwise will appear the same as the ButtCap.

Round 

Line segments will end with half of a filled circle cap whose diameter is perpendicular to the line segment vector. This cap will extend the length of a line segment.

Mitre 

Line segments will end with a filled triangle cap whose base is perpendicular to the line segment vector. This cap will extend the length of a line segment.

◆ Default

enum HPS::LinePattern::Default : uint32_t
strong

Enumerates the predefined line patterns in Visualize. These can be accessed via the LinePatternKit::GetDefault function and their appearance can be seen here. Hardware acceleration for line patterns is available when the following conditions are met:

  • You are using the DirectX11 or OpenGL2 driver
  • You are using Visualize 2015 or later
  • Segment-level display lists are active
  • The line weight is 1

The following line patterns can be hardware accelerated: Dashed, Dotted, DashDot, Dash2Dot, Dash3Dot, LongDash, FineDot. The pattern does not continue along adjacent edges. The pattern is restarted for each edge.

Enumerator
Solid 

A solid unbroked line pattern.

DashDot 

A repeating pattern of 18 solid pixels, 5 blank pixels, 4 solid pixels, and 5 blank pixels.

Dashed 

A repeating pattern of 10 solid pixels and 6 blank pixels.

Dotted 

A repeating pattern of 5 solid pixels and 3 blank pixels.

Dash2Dot 

A repeating pattern of 15 solid pixels, 4 blank pixels, 3 solid pixels, 3 blank pixels, 3 solid pixels, and 4 blank pixels.

Dash3Dot 

A repeating pattern of 15 solid pixels, 2 blank pixels, 3 solid pixels, 2 blank pixels, 3 solid pixels, 2 blank pixels, 3 solid pixels, and 2 blank pixels.

LongDash 

A repeating pattern of 26 solid pixels and 6 blank pixels.

LongDashShortDash 

A repeating pattern of 100 solid pixels, 10 blank pixels, 20 solid pixels, and 10 blank pixels.

LongDash2ShortDash 

A repeating pattern of 86 solid pixels, 8 blank pixels, 15 solid pixels, 8 blank pixels, 15 solid pixels, and 8 blank pixels.

FineDot 

A repeating pattern of 1 solid pixel and 3 blank pixels.

◆ InsetBehavior

enum HPS::LinePattern::InsetBehavior : uint32_t
strong

Enumerates how glyphs interact with other line pattern elements within a line pattern.

Enumerator
Overlap 

Glyphs will overlap with surrounding line pattern elements. Line pattern elements adjacent to glyphs will not be trimmed.

Trim 

Glyphs will overlap with surrounding line pattern elements. Line pattern elements adjacent to glyphs will be trimmed.

Inline 

Glyphs will not overlap with surrounding line pattern elements, and adjacent line pattern elements will not be trimmed.

◆ Join

enum HPS::LinePattern::Join : uint32_t
strong

Enumerates the types of join to use for a line pattern. Joins will always be mitred at the half angle for the smaller angle defined by two line segments. This enumeration defines what the join will look like for the larger angle defined by two line segments.

Enumerator
Mitre 

The join for the larger angle will be mitred, i.e., the segments will meet at a point at the half angle of the larger angle.

Round 

The join for the larger angle will be rounded, i.e., there will be a circle that subtends the larger angle.

Bevel 

The join for the larger angle will be beveled, i.e., there will be a line that subtends the larger angle.

◆ Justification

enum HPS::LinePattern::Justification : uint32_t
strong

Enumerates the justfication modes for a line pattern. These are used to attempt to make the line pattern appear evenly spaced between end points of a line.

Enumerator
Center 

Attempts to ensure that the first element of the line pattern appears at both the beginning and the end of the line. This will give the best results if the first element in a line pattern makes up at least half the total length of the elements for the line pattern body.

Stretch 

Stretches the pattern and modifies the size of the line pattern elements to ensure even spacing.

◆ Modifier

enum HPS::LinePattern::Modifier : uint32_t
strong

Enumerates the types of joins, start caps, and end caps that can be set when a line pattern attribute is set.

Enumerator
GlyphName 

A glyph was set for the cap or join. The glyph name is valid.

Enumerated 

A predefined (enumerated) cap or join was set. The enumeration type is valid.

◆ SizeUnits

enum HPS::LinePattern::SizeUnits : uint32_t
strong

Enumerates the units used when specifying length, weight and offsets for line patterns.

Enumerator
ObjectSpace 

Object space units ignoring any scaling components in modelling matrices.

SubscreenRelative 

Fraction of the height of the outermost window.

WindowRelative 

Fraction of the height of the local window.

WorldSpace 

Object space units including any scaling components in modelling matrices and cameras.

Points 

Points units typically used for text size. 1 point corresponds to 1/72 inch.

Pixels 

Number of pixels.

ScaleFactor 

Fraction of the default line width. A value of 1 corresponds to 0.1 percent of the screen size.


The documentation for this class was generated from the following file: