FastUIDraw
Public Member Functions | Friends | List of all members
fastuidraw::ShaderFilledPath::Builder Class Reference

#include <shader_filled_path.hpp>

Inheritance diagram for fastuidraw::ShaderFilledPath::Builder:
Inheritance graph
[legend]

Public Member Functions

void add_path (float tol, const Path &path)
 
void line_to (vec2 pt)
 
void move_to (vec2 pt)
 
void quadratic_to (vec2 ct, vec2 pt)
 

Friends

class ShaderFilledPath
 

Detailed Description

A Builder is the means of specifying the contours for a ShaderFilledPath.

Definition at line 60 of file shader_filled_path.hpp.

Member Function Documentation

◆ add_path()

void fastuidraw::ShaderFilledPath::Builder::add_path ( float  tol,
const Path path 
)

Add the contours from a Path. Each contour of the passed path will start with a move_to().

Parameters
tolwhen approximating an interpolate, the tolerance to use for how close the approximation needs to be
pathPath to add

◆ line_to()

void fastuidraw::ShaderFilledPath::Builder::line_to ( vec2  pt)

Add a line segment connecting the end point of the last curve or line segment of the current contour to a given point.

Parameters
ptend point of the new line segment

◆ move_to()

void fastuidraw::ShaderFilledPath::Builder::move_to ( vec2  pt)

Start a contour. Before starting a new contour the previous contour must be closed by calling line_to() or quadratic_to() connecting to the start point of the previous contour.

Parameters
ptstart point of the new contour

◆ quadratic_to()

void fastuidraw::ShaderFilledPath::Builder::quadratic_to ( vec2  ct,
vec2  pt 
)

Add a quadratic curveconnecting the end point of the last curve or line segment of the current contour

Parameters
ctcontrol point of the quadratic curve
ptend point of the quadratic curve

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