| Flutter Impeller |

Public Member Functions | Friends | List of all members
impeller::Tessellator::Trigs Class Reference

`#include <tessellator.h>`

## Public Member Functions
| Trigs (Scalar pixel_radius)
size_t | size () const
std::vector< Trig >::iterator | begin () const
std::vector< Trig >::iterator | end () const
const Trig & | operator[] (size_t index) const
size_t | GetSteps () const

## Friends
class | Tessellator

## Detailed Description

Essentially just a vector of Trig objects, but supports storing a reference to either a cached vector or a locally generated vector. The constructor will fill the vector with quarter circular samples for the indicated number of equal divisions if the vector is new.

A given instance of Trigs will always contain at least 2 entries which is the minimum number of samples to traverse a quarter circle in a single step. The first sample will always be (0, 1) and the last sample will always be (1, 0).

Definition at line 48 of file tessellator.h.

## Constructor & Destructor Documentation

## ◆ Trigs()

impeller::Tessellator::Trigs::Trigs | ( | Scalar | pixel_radius | ) |
| explicit

Definition at line 447 of file tessellator.cc.

448 : Tessellator::Trigs(ComputeQuadrantDivisions(pixel_radius)) {}

## Member Function Documentation

## ◆ begin()

std::vector<Trig>::iterator impeller::Tessellator::Trigs::begin | ( |  | ) | const
| inline

Definition at line 54 of file tessellator.h.

54 { return trigs_.begin(); }

## ◆ end()

std::vector<Trig>::iterator impeller::Tessellator::Trigs::end | ( |  | ) | const
| inline

Definition at line 55 of file tessellator.h.

55 { return trigs_.end(); }

Referenced by impeller::StrokePathSegmentReceiver::StrokePathSegmentReceiver().

## ◆ GetSteps()

size_t impeller::Tessellator::Trigs::GetSteps | ( |  | ) | const
| inline

Definition at line 58 of file tessellator.h.

58 { return trigs_.size() - 1u; }

Referenced by impeller::StrokePathSegmentReceiver::RecordArc(), and impeller::testing::TEST().

## ◆ operator[]()

const Trig& impeller::Tessellator::Trigs::operator[] | ( | size_t | index | ) | const
| inline

Definition at line 56 of file tessellator.h.

56 { return trigs_[index]; }

## ◆ size()

size_t impeller::Tessellator::Trigs::size | ( |  | ) | const
| inline

Definition at line 53 of file tessellator.h.

53 { return trigs_.size(); }

Referenced by impeller::StrokeRectGeometry::GetPositionBuffer(), impeller::Tessellator::EllipticalVertexGenerator::GetVertexCount(), and impeller::StrokePathSegmentReceiver::StrokePathSegmentReceiver().

## Friends And Related Function Documentation

## ◆ Tessellator

friend class Tessellator
| friend

Definition at line 61 of file tessellator.h.

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

- impeller/tessellator/tessellator.h
- impeller/tessellator/tessellator.cc