CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::Shape::Element Struct Reference

An element is composed of a path and one or more commands to be done on that path. More...

#include <CeresEngine/Graphics/Shape.hpp>

Public Member Functions

 Element (const ElementType type, const BezierPath &path)
 Creates a new element instance.
 

Public Attributes

const ElementType type
 A constant that describes the type of the element.
 
const BezierPathpath
 A reference to an internally cached bezier path object.
 
Paint paint
 The paint to be used to fill or stroke the path.
 
BlendMode blendMode = BlendMode::Normal
 A constant that describes the blending mode for the operation.
 
LineCapStyle lineCapStyle = LineCapStyle::Butt
 The line cap style for the path.
 
LineJoinStyle lineJoinStyle = LineJoinStyle::Miter
 The line join style for the path.
 
double lineWidth = 1.0
 The width of stroked path lines.
 
double miterLimit = 10.0
 The limit at which miter joins are converted to bevel joins.
 

Detailed Description

An element is composed of a path and one or more commands to be done on that path.

If a path is shared by more than one subsequent command, the command can be coalesced into a single element.

Constructor & Destructor Documentation

◆ Element()

CeresEngine::Shape::Element::Element ( const ElementType  type,
const BezierPath path 
)
inline

Creates a new element instance.

Parameters
typeThe element type constant.
pathA const-reference to an internal path.

Member Data Documentation

◆ blendMode

BlendMode CeresEngine::Shape::Element::blendMode = BlendMode::Normal

A constant that describes the blending mode for the operation.

◆ lineCapStyle

LineCapStyle CeresEngine::Shape::Element::lineCapStyle = LineCapStyle::Butt

The line cap style for the path.

◆ lineJoinStyle

LineJoinStyle CeresEngine::Shape::Element::lineJoinStyle = LineJoinStyle::Miter

The line join style for the path.

◆ lineWidth

double CeresEngine::Shape::Element::lineWidth = 1.0

The width of stroked path lines.

The line width defines the thickness of the receiver's stroked path. A width of 0 is interpreted as the thinnest line that can be rendered on a particular device. The actual rendered line width may vary from the specified width by as much as 2 device pixels, depending on the position of the line with respect to the pixel grid and the current anti-aliasing settings. The width of the line may also be affected by scaling factors specified in the current transformation matrix of the active graphics context.

◆ miterLimit

double CeresEngine::Shape::Element::miterLimit = 10.0

The limit at which miter joins are converted to bevel joins.

The miter limit helps you avoid spikes at the junction of two line segments connected by a miter join. If the ratio of the miter length—the diagonal length of the miter join—to the line thickness exceeds the miter limit, the joint is converted to a bevel join.

◆ paint

Paint CeresEngine::Shape::Element::paint

The paint to be used to fill or stroke the path.

◆ path

const BezierPath& CeresEngine::Shape::Element::path

A reference to an internally cached bezier path object.

◆ type

const ElementType CeresEngine::Shape::Element::type

A constant that describes the type of the element.


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